It seems that my Tomcat 6.0.28 has run into some problems. I was running an Servlet/JSP project in Eclipse today. And I found that its throwing some errors. I have made a post in the JDBC section as well.
http://www.coderanch.com/t/476480/JDBC/java/Unable-Load-Driver At first i thought that i must coded something wrong but it seems that all third party classes which need JARS to be added in the Classpath are causing the same problem!!! Now even the POI API is causing issues. although i have all the JARS added in the Classpath of the project.
Such libraries should be added to the WEB-INF/lib folder of the web app that uses them, not to Tomcat's lib folder.
well ulf.but most of the time[i experienced] it is not loaded by container. what could be the problem?.[example, i was tried this by jdbc-connector.jar]
Joined: Mar 22, 2005
So, *is* the library in the WEB-INF/lib folder, and did you restart the web app after placing it there? Earlier you were talking about "classpath of the project" which sounds like an Eclipse thing that is irrelevant to Tomcat.
JDBC jars SHOULD usually be placed in TOMCAT_HOME/lib. Application-specific resources such as Apache POI SHOULD usually be placed in the WAR's WEB-INF/lib folder, since they're not intended to be server-shared resources nor to be accessible from subsystems outside the webapp (like JDBC connection pools).
Customer surveys are for companies who didn't pay proper attention to begin with.
Somnath Mallick wrote:Some idiot had deleted the lib folder from the WEB-INF over the weekend!
Anyway thanks for that Idiot. because i get more clarification from this topic .
Joined: May 18, 2011
Caused by: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.xa.client.OracleXADataSource'
... 71 more
Caused by: java.lang.ClassNotFoundException: oracle.jdbc.xa.client.OracleXADataSource
at java.security.AccessController.doPrivileged(Native Method)
at java.lang.Class.forName0(Native Method)
My data sources and transactionmanager are declared in context.xml, and the beans that are failing to create is part of a Spring context of the application.
I am seeing the error above will all the transaction and oracle driver located in by WEB-INF/lib We do not want to have anything in tomcat/lib