Error creating bean; nested exception is javax.naming.NameNotFoundException: jdbc not bound
Issue
-
Trying to create a bean referencing a datasource via xml as shown below results in the following error:
<bean id="someDataSourceBean" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName"> <value>jdbc/someDatasource</value> </property> <property name="resourceRef"> <value>true</value> </property> </bean> org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'someDataSourceBean' defined in class path resource [someXML.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: jdbc not bound
Environment
- RedHat JBoss Enterprise Web Platform (EWP)
- 5.1.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
