File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Websphere and the fly likes Oracle 11g Datasource exception when tried to testconnection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Oracle 11g Datasource exception when tried to testconnection" Watch "Oracle 11g Datasource exception when tried to testconnection" New topic
Author

Oracle 11g Datasource exception when tried to testconnection

KasiMurugan Ramasamy
Ranch Hand

Joined: Jan 30, 2005
Posts: 125
Hi,


Iam using websphere 7. Tried to configure datasource.

But i have put the required jar in configured path.
Iam getting the following exception.


2/17/11 11:20:24:539 SGT] 00000014 DataSourceCon E DSRA8040I: Failed to connect to the DataSource. Encountered "": java.lang.ClassNotFoundException: oracle.jdbc.xa.client.OracleXADataSource
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.ibm.ws.rsadapter.DSConfigurationHelper.loadDataSourceClass(DSConfigurationHelper.java:2247)
at com.ibm.ws.rsadapter.DSConfigurationHelper$8.run(DSConfigurationHelper.java:3318)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at


Thanks & Regards
Kasimurugan (SCJP1.4, SCBCD1.3), Preparing SCWCD1.4
Sergey Baranov
Greenhorn

Joined: Aug 27, 2005
Posts: 18

Check the classpath of the jdbc driver. WebSphere can't find jar file containing OracleXADataSource class or jar file doesn't contain it.

Also you need to restart node after new data source was created. try to do it if not did yet.


Sergey Baranov
KasiMurugan Ramasamy
Ranch Hand

Joined: Jan 30, 2005
Posts: 125
Hi Sergey,

Thanks for your reply.
When I configured database provider, I expilictly mentioned full path(including, like /apps/WebSphere/AppServer7/oracle/lib/ojdbc5.jar) of the jar, where the ojdbc.jar is available.

But its not taking the jar.
Sergey Baranov
Greenhorn

Joined: Aug 27, 2005
Posts: 18

Have you tried to restart a Node?
Deepak Pant
Ranch Hand

Joined: Feb 13, 2004
Posts: 443
TestConnection feature works on the node agent process instead of the app server. So you will have to re-start the node everytime you want to test it via that button.

But you are getting class not found exception.

If you are not using any WAS variables and are pointing to the jar directly then check if WAS Unix user can see the jar file.
KasiMurugan Ramasamy
Ranch Hand

Joined: Jan 30, 2005
Posts: 125
Hi,

The issue is resolved. The issue was the ocjdbc.jar. We uploaded the jar to Linux(appserver is running) from windows machine using some software.

That jar was corrupted. This is the reason.

Thank you guys for your response.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Oracle 11g Datasource exception when tried to testconnection