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 Fri, 19 Mar 2010 16:13:31 GMT
Well, that's interesting... 

>>-----Original Message-----
>>From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com] 
>>Sent: Thursday, March 18, 2010 6:13 PM
>>To: Tomcat Users List
>>>Subject: RE: DB connection error -Tomcat 6 config


>>>>And if you remove the factory attribute?

when I remove the I get the following error:
org.apache.jasper.JasperException: An exception occurred processing JSP page /chgctrl_details.jsp
at line 80

77: DataSource ds = (DataSource) envCtx.lookup("jdbc/myoracle");
78:   
79: // Allocate and use a connection from the pool
80:  connection = ds.getConnection();
81: 



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: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load
JDBC driver class 'oracle.jdbc.driver.OracleDriver'
	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 

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver'
	org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1136)
	org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
	org.apache.jsp.chgctrl_005fdetails_jsp._jspService(chgctrl_005fdetails_jsp.java:151)
	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 

java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
	java.net.URLClassLoader$1.run(Unknown Source)
	java.security.AccessController.doPrivileged(Native Method)
	java.net.URLClassLoader.findClass(Unknown Source)
	sun.misc.Launcher$ExtClassLoader.findClass(Unknown Source)
	java.lang.ClassLoader.loadClass(Unknown Source)
	java.lang.ClassLoader.loadClass(Unknown Source)
	java.lang.Class.forName0(Native Method)
	java.lang.Class.forName(Unknown Source)
	org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1130)
	org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
	org.apache.jsp.chgctrl_005fdetails_jsp._jspService(chgctrl_005fdetails_jsp.java:151)
	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)


>>>>Double-check that tomcat-dbcp.jar is in Tomcat's lib directory and nowhere
else, and that the Tomcat userid has at least read access to that jar.  >>>>Might
want to do "jar -tf tomcat-dbcp.jar" to verify that the class really is in there (hard to
believe it wouldn't be).

>>>>> - Chuck

And in doing this, I get this error!!

C:\Program Files\Apache Software Foundation\Tomcat 6.0>jar -tf tomcat.dbcp.jar

java.io.FileNotFoundException: tomcat.dbcp.jar (The system cannot find the file
specified)
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:114)
        at java.util.zip.ZipFile.<init>(ZipFile.java:75)
        at sun.tools.jar.Main.list(Main.java:979)
        at sun.tools.jar.Main.run(Main.java:224)
        at sun.tools.jar.Main.main(Main.java:1149)


And it is in the lib folder!



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