wood burning stoves 2.0
The moose likes Websphere and the fly likes WSAD looking up a  datasource from WAS 3.5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "WSAD looking up a  datasource from WAS 3.5" Watch "WSAD looking up a  datasource from WAS 3.5" New topic

WSAD looking up a datasource from WAS 3.5

Patricia Wu

Joined: Sep 23, 2002
Posts: 5
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.

Please help.
Patricia Wu

Joined: Sep 23, 2002
Posts: 5
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
Type: networkProtocol
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.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: WSAD looking up a datasource from WAS 3.5
It's not a secret anymore!