This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Getting Error in WAS5.1" Watch "Getting Error in WAS5.1" New topic
Author

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
rg/CosNaming/NamingContext/NotFound:1.0


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

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

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

Joined: Dec 04, 2001
Posts: 342
Hi,

Can anyone please give some clue on this issue.

Thanks,
-Bikash
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting Error in WAS5.1
 
Similar Threads
web.xml hard work
Sample web.xml.. may be useful for SCWCD Ranchers
server side processing error
server side processing error
web.xml causes 404 error