This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Websphere and the fly likes Getting Error in WAS5.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Getting Error in WAS5.1" Watch "Getting Error in WAS5.1" New topic

Getting Error in WAS5.1

Bikash Paul
Ranch Hand

Joined: Dec 04, 2001
Posts: 342
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

We couldn't understand why WAS is looking for "jdbc/Sessions"
Murali Ranga
Ranch Hand

Joined: Dec 16, 2011
Posts: 38 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

Joined: Dec 04, 2001
Posts: 342

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

Joined: Dec 04, 2001
Posts: 342

Can anyone please give some clue on this issue.

I agree. Here's the link:
subject: Getting Error in WAS5.1
It's not a secret anymore!