>>>>>>1. Quadruple-check that you have your JDBC driver only in one place (in
>>>>>>Tomcat's /lib directory) 2. Remove all unnecessary configuration from
>>>>>>>>>>>>your <Resource> element:
>>>>>>just (simple) URL, driver class, username and password, just to get
>>>>>>things started.
>>Good luck,
>>- -chris
Ok, I did this - blew away the 6.0.24 collection, and re-started with 6.0.18.
Using the below reference, I can create an adequate connection in a servlet or
JSP, hitting the DB just fine.
If I try to reference the resource reference in the
webapps/META-INF/context.xml file,
I get the following error:
(on startup, the console shows)
Mar 1, 2010 3:18:05 PM org.apache.catalina.core.NamingContextListener
addResource
WARNING: Failed to register in JMX: javax.naming.NamingException: Could not crea
te resource factory instance [Root exception is java.lang.InstantiationException
: org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory]
Other error snippets in attempts to reference the res-ref data include:
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:852)
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(NamingManager.java:304)
org.apache.naming.NamingContext.lookup(NamingContext.java:793)
java.lang.InstantiationException:
org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory
java.lang.Class.newInstance0(Class.java:340)
java.lang.Class.newInstance(Class.java:308)
org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:98)
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
Looking at the log showed basically the same:
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.InstantiationException:
org.apache.tomcat.dbcp.dbcp.DataSourceConnectionFactory
at java.lang.Class.newInstance0(Class.java:340)
at java.lang.Class.newInstance(Class.java:308)
If I omit the factory reference, TC doesn't seem to like that at all -- didn't
really with the 6.0.24 experiment either.
But I'm open to suggestions if anyone has something I overlooked. FYI, I left
the web.xml file in the webapps folder void of any resource reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]