Hello all, I am new to using WSAD and wondering if it is possible to run a standalone program to lookup a datasource on a WebSphere 3.5 naming server. After having changed the JRE to the plugin.server.jdk's one, the ClassNotFoundException is resolved, but when trying to cast the obj looked up to a DataSource type, it throws a ClassCastException. The jndi name is "jdbc/MyDataSource". It looks like I am getting javax.naming.Reference object. So is it possible to look up a datasource inside of WSAD. Because my standalone program does work outside of WSAD after having installed the IBM JDK.
Joined: Sep 23, 2002
I am still struggling with this problem, when I print out the Object I lookup from WAS3.5, It shows the following: Reference Class Name: com.ibm.ejs.sm.beans.DataSourceBean$Reference Type: driverType Content: JDBC1.0 Type: databaseName Content: @MyDBName:1521:MySID Type: dataSourceName Content: MyDataSourceName Type: driverImplClass Content: oracle.jdbc.driver.OracleDriver Type: driverUrlPrefix Content: jdbc racle:thin Type: minPoolSize Content: 1 Type: maxPoolSize Content: 30 Type: connTimeout Content: 300 Type: idleTimeout Content: 1800 Type: orphanTimeout Content: 1800 Type: description Content: Type: networkProtocol Content: Here is the staack trace if it is any helpful in analyzing the problem: DataSource Lookup Error: java.lang.ClassCastException: javax.naming.Reference java.lang.ClassCastException: javax.naming.Reference at com.ibm.rmi.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:253) at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:136) Please help.