Tomcat, Java & Oracle9. org.apache.naming.NamingContext lookup

diridam

New Member
I am using Tomcat and Java (through Eclipse) and Oracle Database 9.2.1I am getting\[code\]org.apache.naming.NamingContext lookupWARNING: Unexpected exception resolving referencejava.sql.SQLException: oracle.jdbc.OracleDriverat org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:243)\[/code\]My code iscontext.xml\[code\]<Resource type="javax.sql.DataSource" auth="Container"name="jdbc/charmDB"factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"driverClassName="oracle.jdbc.OracleDriver"url="jdbc:oracle:thin:@localhost:1521:db"username="db" password="db" maxActive="20" maxIdle="10" /><Resource name="jdbc/charmDB" auth="Container"type="javax.sql.DataSource"description="My Database"/>\[/code\]Java code\[code\]InitialContext ic = new InitialContext();DataSource ds = (DataSource) ic.lookup("java:comp/env/jdbc/charmDB");Connection con = ds.getConnection();\[/code\]Does anyone know what's wrong?Thanks!
 
Back
Top