Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting Error in WAS5.1

 
Bikash Paul
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have very old application running on WAS5.1. We used to use properties file to get the DB connection information. Due to some issues now we are trying to use DataSource of WAS.

Accordingly we modified our code to get the DB connection through DataSource. We have used resource-ref to avoid WAS default warning.

Here is the code snippet:


But during running the application we are getting below error:


[1/13/12 16:26:59:545 CST] 214aa0e8 SessionContex E SESN0043E: BackedHashtable: problem obtaining the configured datasource. Ensure that you have properly co
nfigured a datasource. When Session Manager persistence is enabled the Session Manager configuration must contain a valid datasource.
[1/13/12 16:26:59:593 CST] 214aa0e8 SessionContex E Exception is: javax.naming.NameNotFoundException: Context: mspdev23aipdev112a/nodes/mspdev23aipdev112a/se
rvers/server1, name: jdbc/Sessions: First component in name Sessions not found. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDLmg.o
rg/CosNaming/NamingContext/NotFound:1.0


We couldn't understand why WAS is looking for "jdbc/Sessions"
 
Murali Ranga
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1.you have to create datasource from websphere administrative console.I don't know whether WAS5.1 has option to create JNDI from administrative console.
2.Why did you keep ejb code in web.xml for web container ? move the code to ejb-jar.xml
 
Bikash Paul
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

WAS5.1 has option to create JNDI. As I have mentioned earlier that it's a pretty old application and and it's working fine with ejb references in the web.xml file.

And it is also working fine with below connection class:




But the problem is WAS throwing default warning message in the log file due to absence of resource-ref.


So to avoid that warning message we introduced resource-ref and after we started getting below exception in the log file.



Could you please give us some clue why WAS is looking for 'jdbc/sessions'.
 
Bikash Paul
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can anyone please give some clue on this issue.

Thanks,
-Bikash
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic