Ok, Chuck,
I blew the other 6.x build (0.18 and 0.24) away and moved it to Tomcat 6.0.26.
Installed and reconfigured the context.xml an web.xml files in their respective
directories under the webapps/[webapp]/ folder.
I configured it with the proper factory reference below and now get the error:
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:401)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
javax.servlet.ServletException: javax.naming.NamingException: Could not create
resource factory instance [Root exception is java.lang.InstantiationException:
org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory]
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:862)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
org.apache.jsp.chgctrl_005fdetails_jsp._jspService(chgctrl_005fdetails_jsp.java:949)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
javax.naming.NamingException: Could not create resource factory instance [Root
exception is java.lang.InstantiationException:
org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory]
org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:102)
javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
org.apache.naming.NamingContext.lookup(NamingContext.java:793)
org.apache.naming.NamingContext.lookup(NamingContext.java:140)
org.apache.naming.NamingContext.lookup(NamingContext.java:781)
org.apache.naming.NamingContext.lookup(NamingContext.java:153)
org.apache.jsp.chgctrl_005fdetails_jsp._jspService(chgctrl_005fdetails_jsp.java:148)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
A look at the logs basically reveals the same:
root cause
java.lang.InstantiationException:
org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory
java.lang.Class.newInstance0(Unknown Source)
java.lang.Class.newInstance(Unknown Source)
org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:98)
javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
org.apache.naming.NamingContext.lookup(NamingContext.java:793)
org.apache.naming.NamingContext.lookup(NamingContext.java:140)
org.apache.naming.NamingContext.lookup(NamingContext.java:781)
org.apache.naming.NamingContext.lookup(NamingContext.java:153)
org.apache.jsp.chgctrl_005fdetails_jsp._jspService(chgctrl_005fdetails_jsp.java:148)
Again, I wonder if the <Resource> is being seen.
-----Original Message-----
From: Caldarale, Charles R [mailto:[email protected]]
Sent: Thursday, March 18, 2010 3:17 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config
> From: Propes, Barry L [mailto:[email protected]]
> Subject: RE: DB connection error -Tomcat 6 config
>
> Good point...I'll switch back to
> factory="org.apache.tomcat.dbcp.DataSourceConnectionFactory"
Again, that factory reference is incorrect - there's no such class. If you
insist on specifying one, and you want to use Tomcat's factory, the value is
"org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory" (note the additional
.dbcp in the proper setting).
All the symptoms point to your <Resource> element being ignored. Check that
you don't have a <Context> element in conf/Catalina/[host]/chngctrl.xml that's
overriding the one in the webapps/chngctrl/META-INF/context.xml file.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]