Hi, i have following problem. I want to connect to a oracle database. i have defined a datasource for the server and i think its correct: JDBC driver list ----------------- Name: Oracle817JdbcDriver Description: Oracle 8.1.7 JDBC 2.0 Implementation class name: oracle.jdbc.pool.OracleConnectionPoolDataSource Url prefix: (none) Class path: F:\Download\Oracle\classes12.zip Datasource ------------- Name: Dsname JNDI name: comp/env/jdbc/oracle/Dsname database name: (...) Default user ID: (...) Default user password: (...) Ressource Properties ----------------------- Name: URL Type: java.lang.String Value: jdbc.oracle:thin:@server:port:databasename Name: user Type: java.lang.String Value: (username) Name: password Type: java.lang.String Value: (password) but... if i test it, i get a StaleConnectionException. can anyone help me? thanks --- [05.12.02 14:25:10:831 GMT+01:00] 600b68af ConnectionPoo X CONM6009E: �ber Datenquelle (cwpDs) konnte keine Verbindung zur Datenbank hergestellt werden. [05.12.02 14:25:11:034 GMT+01:00] 600b68af StaleConnecti A CONM7007I: Folgende SQLException mit ErrorCode 17'002 und SQLState wird einer StaleConnectionException zugeordnet: java.sql.SQLException: E/A-Exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=135295488)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4)))) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:211) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:324) at oracle.jdbc.driver.OracleConnection.(OracleConnection.java:266) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260) at java.sql.DriverManager.getConnection(DriverManager.java:523) at java.sql.DriverManager.getConnection(DriverManager.java:183) at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:111) at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:98) at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:77) at com.ibm.ejs.cm.pool.JDBC1xConnectionFactory.createConnection(JDBC1xConnectionFactory.java:42) at com.ibm.ejs.cm.pool.ConnectionPool.createConnection(ConnectionPool.java:954) at com.ibm.ejs.cm.pool.ConnectionPool.createOrWaitForConnection(ConnectionPool.java:896) at com.ibm.ejs.cm.pool.ConnectionPool.findFreeConnection(ConnectionPool.java:814) at com.ibm.ejs.cm.pool.ConnectionPool.findConnectionForTx(ConnectionPool.java:720) at com.ibm.ejs.cm.pool.ConnectionPool.allocateConnection(ConnectionPool.java:654) at com.ibm.ejs.cm.pool.ConnectionPool.getConnection(ConnectionPool.java:307) ... [ December 05, 2002: Message edited by: Peter Meier ]
Michael Luke
Greenhorn
Joined: Dec 05, 2002
Posts: 3
posted
0
Peter, It looks like you may be defining your global JNDI name incorrectly. If you are using local JNDI references in your code, they have to be declared and bound before you can access your database through them. Here is a paper that may help. It was written for Z/os but does a great job of showing you how to setup your local and global JNDI names in WSAD. http://www-1.ibm.com/support/techdocs/atsmastr.nsf/PubAllNum/WP100270 Good luck, Michael
Peter Meier
Greenhorn
Joined: Dec 05, 2002
Posts: 3
posted
0
Hi Michael I think i've defined the JNDI name correctly. if i change it to an incorrect name i get a "Naming Exception" ...so it must be a problem with the oracle database the database. but thanks for your help