Hi,
I now use NetBeans 6 that have Tomcat 6.0.10.
I have Oracle Express 10g (that work fine)
I had a Tomcat application that worked with Tomcat 5.5 & Netbeans 5 with
this database
Here is the error:
javax.servlet.ServletException:
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of
class '' for connect URL 'jdbc:oracle:thin:@localhost:1521:XE'
Note Tomcat found the URL, so it understood the configuration in context.xml
I googled quite a lot but could not find an answer (lot of people with this
error have an empty URL).
Tomcat 6 changed (no more common/lib) :-(
To check, I tested a direct connection to the database from a JSP page ==>
it works, so the driver work.
I've put the Oracle driver in WEB-INF/lib
I also put it in $catalina_home/lib (tomcat 6 new common/lib ?)
I removed my initial server.xml configuration and put the datasource in
context.xml, like this:
<Context path="/formationjsp" reloadable="true">
<!--
<ResourceLink global="jdbc/dbxe" name="jdbc/dbxe"
type="javax.sql.DataSource"/>
-->
<Resource name="jdbc/dbxe" auth="Container"
type="javax.sql.DataSource"
driverClassname="oracle.jdbc.OracleDriver"
username="jde"
password="jde"
url="jdbc:oracle:thin:@localhost:1521:XE"
/>
</Context>
I commented the old corresponding resource in server.xml, so that I no
longer use server.xml for the database
I changed nothing in the web.xml, it's still like this,
<resource-ref>
<res-ref-name>jdbc/dbxe</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
The source code of course does not change.
I'm confused, it seems tomcat does not find the driver, but it found it when
I did the direct connection in a JSP page, like this,
<%
OracleDataSource ods = new OracleDataSource();
ods.setURL("jdbc:oracle:thin:@localhost:1521:XE");
ods.setUser("jde");
ods.setPassword("jde");
Connection conn = ods.getConnection();
etc...
%>
(with the correct "import" at the beginning of the JSP page...)
Any idea where the driver should be ?
What's going on....?
My application worked before.....
Thanks
JD
--
View this message in context:
http://www.nabble.com/Tomcat-6%2C-JNDI-datasource-no-longer-work-tp14240562p14240562.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]