James Cochrane
asked on
Tomcat admin error Exception retrieving attribute 'driverClassName'
I use the http://localhost:8080/admin to configure datasources and I always get the following error:
org.apache.jasper.JasperEx ception: Exception retrieving attribute 'driverClassName'
at org.apache.jasper.servlet. JspServlet Wrapper.se rvice(JspS ervletWrap per.java:2 54)
at org.apache.jasper.servlet. JspServlet .serviceJs pFile(JspS ervlet.jav a:295)
at org.apache.jasper.servlet. JspServlet .service(J spServlet. java:241)
at javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 853)
at org.apache.catalina.core.A pplication Dispatcher .invoke(Ap plicationD ispatcher. java:684)
at org.apache.catalina.core.A pplication Dispatcher .doForward (Applicati onDispatch er.java:43 2)
at org.apache.catalina.core.A pplication Dispatcher .forward(A pplication Dispatcher .java:356)
at org.apache.struts.action.A ctionServl et.process ActionForw ard(Action Servlet.ja va:1759)
at org.apache.struts.action.A ctionServl et.process (ActionSer vlet.java: 1596)
at org.apache.struts.action.A ctionServl et.doGet(A ctionServl et.java:49 2)
at javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 740)
at javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 853)
at org.apache.catalina.core.A pplication Dispatcher .invoke(Ap plicationD ispatcher. java:684)
at org.apache.catalina.core.A pplication Dispatcher .doForward (Applicati onDispatch er.java:43 2)
at org.apache.catalina.core.A pplication Dispatcher .forward(A pplication Dispatcher .java:356)
at org.apache.struts.action.A ctionServl et.process ActionForw ard(Action Servlet.ja va:1759)
at org.apache.struts.action.A ctionServl et.process (ActionSer vlet.java: 1596)
at org.apache.struts.action.A ctionServl et.doGet(A ctionServl et.java:49 2)
at javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 740)
at javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 853)
at org.apache.catalina.core.A pplication FilterChai n.internal DoFilter(A pplication FilterChai n.java:247 )
at org.apache.catalina.core.A pplication FilterChai n.doFilter (Applicati onFilterCh ain.java:1 93)
at org.apache.catalina.core.S tandardWra pperValve. invoke(Sta ndardWrapp erValve.ja va:256)
at org.apache.catalina.core.S tandardPip eline$Stan dardPipeli neValveCon text.invok eNext(Stan dardPipeli ne.java:64 3)
at org.apache.catalina.core.S tandardPip eline.invo ke(Standar dPipeline. java:480)
at org.apache.catalina.core.C ontainerBa se.invoke( ContainerB ase.java:9 95)
at org.apache.catalina.core.S tandardCon textValve. invoke(Sta ndardConte xtValve.ja va:191)
at org.apache.catalina.core.S tandardPip eline$Stan dardPipeli neValveCon text.invok eNext(Stan dardPipeli ne.java:64 3)
at org.apache.catalina.authen ticator.Au thenticato rBase.invo ke(Authent icatorBase .java:551)
at org.apache.catalina.core.S tandardPip eline$Stan dardPipeli neValveCon text.invok eNext(Stan dardPipeli ne.java:64 1)
at org.apache.catalina.core.S tandardPip eline.invo ke(Standar dPipeline. java:480)
at org.apache.catalina.core.C ontainerBa se.invoke( ContainerB ase.java:9 95)
at org.apache.catalina.core.S tandardCon text.invok e(Standard Context.ja va:2415)
at org.apache.catalina.core.S tandardHos tValve.inv oke(Standa rdHostValv e.java:180 )
at org.apache.catalina.core.S tandardPip eline$Stan dardPipeli neValveCon text.invok eNext(Stan dardPipeli ne.java:64 3)
at org.apache.catalina.valves .ErrorDisp atcherValv e.invoke(E rrorDispat cherValve. java:171)
at org.apache.catalina.core.S tandardPip eline$Stan dardPipeli neValveCon text.invok eNext(Stan dardPipeli ne.java:64 1)
at org.apache.catalina.valves .ErrorRepo rtValve.in voke(Error ReportValv e.java:172 )
at org.apache.catalina.core.S tandardPip eline$Stan dardPipeli neValveCon text.invok eNext(Stan dardPipeli ne.java:64 1)
at org.apache.catalina.core.S tandardPip eline.invo ke(Standar dPipeline. java:480)
at org.apache.catalina.core.C ontainerBa se.invoke( ContainerB ase.java:9 95)
at org.apache.catalina.core.S tandardEng ineValve.i nvoke(Stan dardEngine Valve.java :174)
at org.apache.catalina.core.S tandardPip eline$Stan dardPipeli neValveCon text.invok eNext(Stan dardPipeli ne.java:64 3)
at org.apache.catalina.core.S tandardPip eline.invo ke(Standar dPipeline. java:480)
at org.apache.catalina.core.C ontainerBa se.invoke( ContainerB ase.java:9 95)
at org.apache.coyote.tomcat4. CoyoteAdap ter.servic e(CoyoteAd apter.java :223)
at org.apache.coyote.http11.H ttp11Proce ssor.proce ss(Http11P rocessor.j ava:594)
at org.apache.coyote.http11.H ttp11Proto col$Http11 Connection Handler.pr ocessConne ction(Http 11Protocol .java:392)
at org.apache.tomcat.util.net .TcpWorker Thread.run It(PoolTcp Endpoint.j ava:565)
at org.apache.tomcat.util.thr eads.Threa dPool$Cont rolRunnabl e.run(Thre adPool.jav a:619)
at java.lang.Thread.run(Threa d.java:536 )
I have various machines that I use and they all get the same error. The connection works as I am able to retrieve database information (MS SQLServer 2000) from my web pages. I haven't been able to find any information about this error anywhere. I do not typically update the server.xml manually, I use the admin tool.
Thank you,
Jim Cochrane
org.apache.jasper.JasperEx
at org.apache.jasper.servlet.
at org.apache.jasper.servlet.
at org.apache.jasper.servlet.
at javax.servlet.http.HttpSer
at org.apache.catalina.core.A
at org.apache.catalina.core.A
at org.apache.catalina.core.A
at org.apache.struts.action.A
at org.apache.struts.action.A
at org.apache.struts.action.A
at javax.servlet.http.HttpSer
at javax.servlet.http.HttpSer
at org.apache.catalina.core.A
at org.apache.catalina.core.A
at org.apache.catalina.core.A
at org.apache.struts.action.A
at org.apache.struts.action.A
at org.apache.struts.action.A
at javax.servlet.http.HttpSer
at javax.servlet.http.HttpSer
at org.apache.catalina.core.A
at org.apache.catalina.core.A
at org.apache.catalina.core.S
at org.apache.catalina.core.S
at org.apache.catalina.core.S
at org.apache.catalina.core.C
at org.apache.catalina.core.S
at org.apache.catalina.core.S
at org.apache.catalina.authen
at org.apache.catalina.core.S
at org.apache.catalina.core.S
at org.apache.catalina.core.C
at org.apache.catalina.core.S
at org.apache.catalina.core.S
at org.apache.catalina.core.S
at org.apache.catalina.valves
at org.apache.catalina.core.S
at org.apache.catalina.valves
at org.apache.catalina.core.S
at org.apache.catalina.core.S
at org.apache.catalina.core.C
at org.apache.catalina.core.S
at org.apache.catalina.core.S
at org.apache.catalina.core.S
at org.apache.catalina.core.C
at org.apache.coyote.tomcat4.
at org.apache.coyote.http11.H
at org.apache.coyote.http11.H
at org.apache.tomcat.util.net
at org.apache.tomcat.util.thr
at java.lang.Thread.run(Threa
I have various machines that I use and they all get the same error. The connection works as I am able to retrieve database information (MS SQLServer 2000) from my web pages. I haven't been able to find any information about this error anywhere. I do not typically update the server.xml manually, I use the admin tool.
Thank you,
Jim Cochrane
ASKER
Hi,
Sorry for the delay in answering. I suddendly had more pressing fires to put out.
My SQL Server jar files are in my common/lib directory. I am able create a new context, add a JNDI connection copy into the appropriate context and even view the newly created context. When I change the context name to the one that I need, in this case /tdp, it gives me that server error.
I am successfully able to use the JNDI connection below. It's when I try to make changes or access it within the admin tool that I run into trouble. Even when I copy the block for the context and change it to the appropriate name I get the error.
Here is the portion of server.xml:
<Context className="org.apache.cata lina.core. StandardCo ntext" cachingAllowed="true" charsetMapperClass="org.ap ache.catal ina.util.C harsetMapp er" cookies="true" crossContext="true" debug="0" displayName="TDP Demo Area" docBase="c:\Tomcat\webapps \tdp" mapperClass="org.apache.ca talina.cor e.Standard ContextMap per" path="/tdp" privileged="false" reloadable="true" swallowOutput="false" useNaming="true" wrapperClass="org.apache.c atalina.co re.Standar dWrapper">
<Resource auth="Container" description="DB Connection" name="jdbc/MSSQLTDP" scope="Shareable" type="javax.sql.DataSource "/>
<Resource auth="Container" name="jdbc/MSTDPDB" scope="Shareable" type="javax.sql.DataSource "/>
<Resource auth="Container" description="DB Connection" name="jdbc/TestDB" scope="Shareable" type="javax.sql.DataSource "/>
<ResourceParams name="jdbc/MSTDPDB">
<parameter>
<name>maxWait</name>
<value>5000</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>10</value>
</parameter>
<parameter>
<name>password</name>
<value>place1XHolder</valu e>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:microsoft:sqls erver://lo calhost:14 33;Databas e=tdp</val ue>
</parameter>
<parameter>
<name>driverClassName</nam e>
<value>com.microsoft.jdbc. sqlserver. SQLServerD river</val ue>
</parameter>
<parameter>
<name>maxIdle</name>
<value>4</value>
</parameter>
<parameter>
<name>username</name>
<value>webuser</value>
</parameter>
</ResourceParams>
</Context>
Sorry for the delay in answering. I suddendly had more pressing fires to put out.
My SQL Server jar files are in my common/lib directory. I am able create a new context, add a JNDI connection copy into the appropriate context and even view the newly created context. When I change the context name to the one that I need, in this case /tdp, it gives me that server error.
I am successfully able to use the JNDI connection below. It's when I try to make changes or access it within the admin tool that I run into trouble. Even when I copy the block for the context and change it to the appropriate name I get the error.
Here is the portion of server.xml:
<Context className="org.apache.cata
<Resource auth="Container" description="DB Connection" name="jdbc/MSSQLTDP" scope="Shareable" type="javax.sql.DataSource
<Resource auth="Container" name="jdbc/MSTDPDB" scope="Shareable" type="javax.sql.DataSource
<Resource auth="Container" description="DB Connection" name="jdbc/TestDB" scope="Shareable" type="javax.sql.DataSource
<ResourceParams name="jdbc/MSTDPDB">
<parameter>
<name>maxWait</name>
<value>5000</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>10</value>
</parameter>
<parameter>
<name>password</name>
<value>place1XHolder</valu
</parameter>
<parameter>
<name>url</name>
<value>jdbc:microsoft:sqls
</parameter>
<parameter>
<name>driverClassName</nam
<value>com.microsoft.jdbc.
</parameter>
<parameter>
<name>maxIdle</name>
<value>4</value>
</parameter>
<parameter>
<name>username</name>
<value>webuser</value>
</parameter>
</ResourceParams>
</Context>
What Tomcat version are you using?
ASKER
4.1.24
DOes the problem happens when you administrate Tomcat, or during your application runtime?
I saw these 2 links:
http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg104787.html
http://archives.real-time.com/pipermail/tomcat-devel/2002-September/039380.html
Both describe problems similar to yours.
Just to make sure - if you deploy the same context anywhere it works, but if path of the context is /tdp you get the error?
I saw these 2 links:
http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg104787.html
http://archives.real-time.com/pipermail/tomcat-devel/2002-September/039380.html
Both describe problems similar to yours.
Just to make sure - if you deploy the same context anywhere it works, but if path of the context is /tdp you get the error?
ASKER
It only happens in the administration. There are various contexts that work and others that don't. /tdp happens to be one that doesn't. The ones that I usually don't need are the ones that usually work. I don't know how Tomcat figures out which ones I need! LOL.
I'll check out those links.
Thanks,
Jim
I'll check out those links.
Thanks,
Jim
Can you run a find on the server.xml and find if there is a /tdp context?
Maybe the admin console didn't clean the server.xml properly.
Also, try to make the web-apps directory does not contain a tdp file.
Maybe the admin console didn't clean the server.xml properly.
Also, try to make the web-apps directory does not contain a tdp file.
ASKER
The server.xml does have a /tdp context. The XML segment that I sent you is from server.xml. I am not sure what you mean by your last comment.
Thanks
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Techboud, did this work?
ASKER
At first it seemed it did. But then it started happening again and I didn't alter server.xml manually. I've resolved to just changing the XML files at this point.
Which XML files?
ASKER
server.xml
So editing the server.xml file helps?
ASKER
My application works fine. It is when trying to use the JDBC congurator of the admin tool that gives the error. I have no choice but to manually edit the server.xml file as that is the only way I can configure my settings properly, at least with respect to JDBC.
You can try to report this bug at Tomcat's site.
Also, did you place the JDBC driver JAR files in your shared\lib or \lib directories?