Hi,
I am trying to set up a datasouce for an Oracle 8 database.
Unfortunately, I get the following error when I try to get a connection:
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (ORA-00911: invalid character)
I have the following setup:
JDBC DRIVER:
I have put classes12.zip renamed to classes12.jar
in $CATALINA_HOME/common/lib.
$CATALINA_HOME/conf/context.xml contains:
<Context>
<Resource
auth="Container"
description="DB Connection"
name="jdbc/testDB"
type="javax.sql.DataSource"
password="test"
driverClassName="oracle.jdbc.driver.OracleDriver"
maxIdle="2"
maxWait="5000"
username="test"
url="jdbc:oracle:thin:@grad.berkeley.edu:1521:GD1T"
maxActive="4"/>
<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
</Context>
WEB.XML contains:
<resource-ref>
<description>
Test Database
</description>
<res-ref-name>
jdbc/testDB
</res-ref-name>
<res-type>
javax.sql.DataSource
</res-type>
<res-auth>
Container
</res-auth>
</resource-ref>
THE CODE:
Context ctx = new InitialContext();
Context envContext = (Context)ctx.lookup("java:/comp/env");
ds =(javax.sql.DataSource) envContext.lookup( "jdbc/testDB");
try {
System.out.println("GLOWUtil.isAuthorized - try first
getConnection...");
conn = ds.getConnection();
} catch (java.sql.SQLException ee) {
System.out.println("GLOWUtil.isAuthorized - first getConnection:" + ee);
System.out.println("GLOWUtil.isAuthorized - try second
getConnection...");
try {
conn = ds.getConnection();
} catch (java.sql.SQLException eee) {
System.out.println("GLOWUtil.isAuthorized - second
getConnection:" + eee);
return isAuthorized;
}
}
THE COMPLETE ERROR MESSAGE:
GLOWUtil.isAuthorized - first
getConnection:org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (ORA-00911: invalid character)
GLOWUtil.isAuthorized - try second getConnection...
GLOWUtil.isAuthorized - second
getConnection:org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (ORA-00911: invalid character)
Any suggestions would be much appreciated.
Thanks,
Judy
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]