[jboss-user] [JBoss/Spring Integration] - Unable to lookup datasource in jboss 4.2.2 with spring 2.0.8

suneetshah do-not-reply at jboss.com
Sun Apr 27 08:23:14 EDT 2008


ello,

I have trying to use the datasource in my JBoss 4.2.2 server, but I am getting the error below. I have tried a number of permutations on the jndi name in the applicationcontext.xml file, but none seem to work.

Any suggestions would be greatly appreciated.

My jboss xxxDS.xml file look like:

<local-tx-datasource>
  |     <jndi-name>oracleDS</jndi-name>

My applicationcontext.xml has the following value:


  | <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
  | 		<property name="jndiName">oracleDS</property>
  | 
  | </bean>
  | 

I have also tried:
java:OracleDS
java:/oracleDS

All of them result in the following exception:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: oracleDS not bound
  | Caused by:
  | javax.naming.NameNotFoundException: oracleDS not bound
  |         at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
  |         at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
  |         at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
  |         at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
  |         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
  |         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
  |         at javax.naming.InitialContext.lookup(InitialContext.java:351)
  |         at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147056#4147056

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147056



More information about the jboss-user mailing list