Solved

Tomcat admin error Exception retrieving attribute 'driverClassName'

Posted on 2003-12-06
16
700 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 

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
 
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

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 …
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

756 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