File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Websphere and the fly likes Websphere 5.1 orac database access problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Websphere 5.1 orac database access problem" Watch "Websphere 5.1 orac database access problem" New topic

Websphere 5.1 orac database access problem

Ratan Kumar
Ranch Hand

Joined: Jul 19, 2006
Posts: 67
I have created the Oracle datasource in WSAD IE 5.1

datasource : mydb
database name: mydb
jndi name : jdbc/mydb
servername :
port no : 1522
URL : jdbc

Now when I try to run the application on Websphere 5.1 Integration Test Environment, I get the following exception trace:

J2CA0122I: Resource reference jdbc/mydb could not be located, so default values of the following are used: [Resource-ref settings]

Begin backtrace for nested exception
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection

Can anybody tell me,what is the problem and how I can solve that?

Thanks Ratan
Brian Hennessy
Ranch Hand

Joined: Oct 24, 2005
Posts: 57
Hi Ratan
The J2CA0122I message I think is just a warning if you perform a JNDI lookup without a resource being defined in your deployment descriptor as a resource-ref. (using ENC java:comp/env/your_resource_ref_name).

The SQL exception you've experienced ,are you sure that the port number for Oracle is correct its normally 1521 and you have it as 1522. Maybe you configured this at installation but it might be worth performing a netstat -a on the host machine running the Oracle DB.
I agree. Here's the link:
subject: Websphere 5.1 orac database access problem
It's not a secret anymore!