This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Other Application Frameworks and the fly likes Weblogic JNDI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Weblogic JNDI" Watch "Weblogic JNDI" New topic
Author

Weblogic JNDI

Yoo-Jin Lee
Ranch Hand

Joined: Nov 01, 2000
Posts: 119
Hi,

I'm trying to setup a JNDI datasource in Spring's applicationContext.xml file but I get the following error:



I'm using Spring 1.2, Hibernate 3, MySql, and Weblogic 8.1.

My applicationContext.xml file:



I know the JNDI name is valid because I can get a connection in a main code.


Any ideas?

thanks in advance.

Yoo-Jin
J Weite
Greenhorn

Joined: Jun 01, 2005
Posts: 1
I had two issues when trying to do the same. The first was the provider complaining that I didn't have a usable context. I fixed this by explicitly creating a JndiTemplate and configuring it with the usual JNDI context stuff. (Maybe because I'm running Weblogic at port 7011???)

At this point, I started getting the same error you did. On a long shot, I dropped the resource-ref param so that JndiObjectFactoryBean wouldn't supplement my jndiName with "java:comp/env/", since I don't supply this myself when manually getting a datasource. It worked. In the end, my key beans looks like this:



Maybe it'll work for you too...
 
 
subject: Weblogic JNDI