| Author |
error in context lookup
|
siddharth paul
Greenhorn
Joined: Apr 30, 2008
Posts: 20
|
|
When i am connecting to Sql server using following code.
I am getting this....
A Reference object looked up from the context "localhost/nodes/localhost/servers/server1" with the name "jdbc/ds1" was sent to the JNDI Naming Manager and an exception resulted.
|
 |
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
|
|
If this code is running inside the container, there's no need to specify parameters when creating the initial context. Try creating the initial context without parameters. Example:
|
Merrill
Consultant, Sima Solutions
|
 |
siddharth paul
Greenhorn
Joined: Apr 30, 2008
Posts: 20
|
|
i ran with.
afraid to say still the same.
Below from WSAD console.
[2/3/09 15:27:22:201 IST] 505ecddf Helpers W NMSV0605W: A Reference object looked up from the context "localhost/nodes/localhost/servers/server1" with the name "jdbc/ds1" was sent to the JNDI Naming Manager and an exception resulted. Reference data follows:
Reference Factory Class Name: com.ibm.websphere.advanced.cm.factory.DataSourceFactory$ResourceReferenceObjectFactory
Reference Factory Class Location URLs: <null>
......
......
Exception data follows:
javax.naming.NamingException: Attempted to use a 4.0 DataSource in EJB 2.0 Module. Invalid configuration.
at com.ibm.ejs.cm.DSFactoryImpl.verifyConfiguration(DSFactoryImpl.java:272)
.....
.....
|
 |
vamsheedhar devarishati
Greenhorn
Joined: Feb 19, 2008
Posts: 25
|
|
Make sure You added ref in Deployment Descriptor like this and make sure it is loaded when jvm starts.
<resource-ref id="ResourceRef_1126121987734">
<description></description>
<res-ref-name>jdbc/localds1</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
After server start up , be fore hitting the app , search for datasorce ...
|
Deva
SCJP, WAS6.0, Sun webservices, IBM ILOG JRules 7.0 Certified
|
 |
 |
|
|
subject: error in context lookup
|
|
|