Solved

Tomcat admin error Exception retrieving attribute 'driverClassName'

Posted on 2003-12-06
16
692 Views
Last Modified: 2007-12-19
I use the http://localhost:8080/admin to configure datasources and I always get the following error:

org.apache.jasper.JasperException: Exception retrieving attribute 'driverClassName'
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
      at org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1759)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1596)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
      at org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1759)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1596)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:551)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
      at java.lang.Thread.run(Thread.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
0
Comment
Question by:techhound
  • 9
  • 7
16 Comments
 
LVL 9

Expert Comment

by:vzilka
ID: 9889825
Can you print a portion of your server.xml file, the one that specifies the definition of the data source (was the creation of the data source successful?)

Also, did you place the JDBC driver JAR files in your shared\lib or \lib directories?
0
 

Author Comment

by:techhound
ID: 9898237
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.catalina.core.StandardContext" cachingAllowed="true" charsetMapperClass="org.apache.catalina.util.CharsetMapper" cookies="true" crossContext="true" debug="0" displayName="TDP Demo Area" docBase="c:\Tomcat\webapps\tdp" mapperClass="org.apache.catalina.core.StandardContextMapper" path="/tdp" privileged="false" reloadable="true" swallowOutput="false" useNaming="true" wrapperClass="org.apache.catalina.core.StandardWrapper">
          <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</value>
            </parameter>
            <parameter>
              <name>url</name>
              <value>jdbc:microsoft:sqlserver://localhost:1433;Database=tdp</value>
            </parameter>
            <parameter>
              <name>driverClassName</name>
              <value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value>
            </parameter>
            <parameter>
              <name>maxIdle</name>
              <value>4</value>
            </parameter>
            <parameter>
              <name>username</name>
              <value>webuser</value>
            </parameter>
          </ResourceParams>
        </Context>
0
 
LVL 9

Expert Comment

by:vzilka
ID: 9910715
What Tomcat version are you using?
0
 

Author Comment

by:techhound
ID: 9911985
4.1.24
0
 
LVL 9

Expert Comment

by:vzilka
ID: 9912105
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?
0
 

Author Comment

by:techhound
ID: 9912141
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
0
 
LVL 9

Expert Comment

by:vzilka
ID: 9912181
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.
0
 

Author Comment

by:techhound
ID: 9919309
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
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 9

Accepted Solution

by:
vzilka earned 500 total points
ID: 9919355
My though is that maybe your server.xml file is not in a correct state. It doesn't make sense that the admin utility doesn't allow you to add a datasource for a context "TDP" and does allow it for a context "CDP".
It means that there is something wrong with the existing definition of your TDP context.
Try to take a fresh tomcat installation, do not put the WAR file in the WEBAPPS directory, and then do everything from the admin console.
0
 
LVL 9

Expert Comment

by:vzilka
ID: 10225780
Techboud, did this work?
0
 

Author Comment

by:techhound
ID: 10412049
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.  
0
 
LVL 9

Expert Comment

by:vzilka
ID: 10412714
Which XML files?
0
 

Author Comment

by:techhound
ID: 10412744
server.xml
0
 
LVL 9

Expert Comment

by:vzilka
ID: 10412771
So editing the server.xml file helps?
0
 

Author Comment

by:techhound
ID: 10412885
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.
0
 
LVL 9

Expert Comment

by:vzilka
ID: 10413188
You can try to report this bug at Tomcat's site.
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Convert websphere application server default chained Certificates from 1024 to 2048 keysize or higher size and also you can change signatureAlgorithm . Please make sure Websphere Application Server fixpack 7.0.0.23 or Above. The following steps a…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now