tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Propes, Barry L " <barry.l.pro...@citi.com>
Subject RE: DB connection error -Tomcat 6 config
Date Thu, 18 Mar 2010 23:02:46 GMT
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:Chuck.Caldarale@unisys.com] 
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:barry.l.propes@citi.com]
> 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message