• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Websphere 5 Datasource Problem

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have created a datasource using admin console. The Test Connection on the admin console is working fne. When I hit the servlet, it throws the following error in the SystemOut.log of my Application Server.

10/11/06 15:39:06:025 CDT] 4aa09b3a SystemOut O Naming Exception : javax.naming.NameNotFoundException: jdbc/VANTestDataSource [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound]

I was struggling for this since last 2 weeks, it would be a great help if you can help me to resolve this issue.
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now why would you wait two weeks? Struggle is important, but a week of struggle is good enough.

Okay, looks like a JNDI problem. What is the ACTUAL name your datasource is bound to your JNDI server with? You don't know? Well, find out.

WebSphere provides a utility called dumpnamespace.sh, or .bat, depending on your operating system. Use that utiliy to dump your namespace, and see the actual name used by the datasource to bind itself to the JNDI server. Then, ue this name during the lookup.

Of course, you shouldn't be using that actual name in code, but rather, a resource reference, so once you get it working with the acutal name, use a reference instead. Here's a little tutorial on JNDI naming with WebSphere, which includes information on resource reference, and topology dependent JNDI names:

http://www.technicalfacilitation.com/get.php?link=naming

What development environment are you using? WebSphere Studio Application Developer (WSAD) and IBM's Rational Application Developer(IRAD) both provide a JNDI Exlporer. While it's designed to connect to the local test envirnoment, you can change the URL/PORT to connect to and explore any JNDI server. I would HIGHLY recomment attacking your application server with this JNDI explorer tool. You can type JNDI names directly into it, and find out if the JNDI name you're using is valid or not. Any name that works in the JNDI explorer will work in your running code.

Good luck. If you still have problems, post again, and in less than two weeks time. Include a little info on your environment, such as version, development environment, and OS.

Cheers!

-Cameron McKenzie
 
It's never done THAT before. Explain it to me tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic