If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Db2 vs Websphere 5.0 datasource Issue

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-30-03, 00:37
lalith lalith is offline
Registered User
 
Join Date: Oct 2003
Posts: 3
Db2 vs Websphere 5.0 datasource Issue

Hi All,
I could configure a Datsource in Websphere 5.0 which access the Db2 database.
What am doing is, accesing the Db2 data from an EJB via this datasource.

I am running Websphere 5.0 (upgraded with the patch) and Db2 version 8.1 on Windows.
Also am using the Type 4 jdbc driver (db2jcc.jar).
The App server and Db server are running on two different machines.

The program is working, but it gives the following exception in the SystemOut.log

[10/30/03 11:15:12:992 LKT] 241dfcfb SessionContex W SESN0038E: BackedHashtable:getConnection - database error. If a SQLException has occurred then refer to the appropriate database documentation for your environment. Also, ensure that you have properly configured a datasource for Session Manager.
[10/30/03 11:15:23:367 LKT] 241dfcfb SessionContex E SESN0043E: BackedHashtable: problem obtaining the configured datasource. Ensure that you have properly configured a datasource. When Session Manager persistence is enabled the Session Manager configuration must contain a valid datasource.
[10/30/03 11:15:23:367 LKT] 241dfcfb SessionContex E Exception is: javax.naming.NameNotFoundException: jdbc/Sessions. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.do_ resolve_complete_info(WsnOptimizedNamingImpl.java: 964)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBa se.resolve_complete_info(WsnOptimizedNamingImplBas e.java:1383)
at com.ibm.WsnOptimizedNaming._NamingContextStub.reso lve_complete_info(Unknown Source)
at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve (CNContextImpl.java:3534)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(C NContextImpl.java:1565)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(C NContextImpl.java:1525)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNC ontextImpl.java:1225)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCt x.java:132)
at javax.naming.InitialContext.lookup(InitialContext. java:359)
at com.ibm.ws.webcontainer.httpsession.BackedHashtabl e.getDataSource(BackedHashtable.java:458)
at com.ibm.ws.webcontainer.httpsession.BackedHashtabl e.getConnection(BackedHashtable.java:1025)
at com.ibm.ws.webcontainer.httpsession.BackedHashtabl e.performInvalidation(BackedHashtable.java:3012)
at
Reply With Quote
  #2 (permalink)  
Old 10-30-03, 08:04
egandone egandone is offline
Registered User
 
Join Date: Oct 2003
Posts: 5
Re: Db2 vs Websphere 5.0 datasource Issue

It looks like you have session persistence turned on but haven't defined a Datasource for it to use. By default it looks for one named jdbc/Sessions. So the solution is to either define the data source or turn off session persistence.

Hope this helps.
- Egan

Quote:
Originally posted by lalith
Hi All,
I could configure a Datsource in Websphere 5.0 which access the Db2 database.
What am doing is, accesing the Db2 data from an EJB via this datasource.

I am running Websphere 5.0 (upgraded with the patch) and Db2 version 8.1 on Windows.
Also am using the Type 4 jdbc driver (db2jcc.jar).
The App server and Db server are running on two different machines.

The program is working, but it gives the following exception in the SystemOut.log

[10/30/03 11:15:12:992 LKT] 241dfcfb SessionContex W SESN0038E: BackedHashtable:getConnection - database error. If a SQLException has occurred then refer to the appropriate database documentation for your environment. Also, ensure that you have properly configured a datasource for Session Manager.
[10/30/03 11:15:23:367 LKT] 241dfcfb SessionContex E SESN0043E: BackedHashtable: problem obtaining the configured datasource. Ensure that you have properly configured a datasource. When Session Manager persistence is enabled the Session Manager configuration must contain a valid datasource.
[10/30/03 11:15:23:367 LKT] 241dfcfb SessionContex E Exception is: javax.naming.NameNotFoundException: jdbc/Sessions. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.do_ resolve_complete_info(WsnOptimizedNamingImpl.java: 964)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBa se.resolve_complete_info(WsnOptimizedNamingImplBas e.java:1383)
at com.ibm.WsnOptimizedNaming._NamingContextStub.reso lve_complete_info(Unknown Source)
at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve (CNContextImpl.java:3534)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(C NContextImpl.java:1565)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(C NContextImpl.java:1525)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNC ontextImpl.java:1225)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCt x.java:132)
at javax.naming.InitialContext.lookup(InitialContext. java:359)
at com.ibm.ws.webcontainer.httpsession.BackedHashtabl e.getDataSource(BackedHashtable.java:458)
at com.ibm.ws.webcontainer.httpsession.BackedHashtabl e.getConnection(BackedHashtable.java:1025)
at com.ibm.ws.webcontainer.httpsession.BackedHashtabl e.performInvalidation(BackedHashtable.java:3012)
at
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On