NameNotFoundException: jdbc not bound in JBoss EAP after migration from Tomcat
Issue
- Error starting the server
-
Migrating Spring Application from Tomcat to JBoss EAP
ERROR [org.springframework.web.context.ContextLoader] (main) Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ear.context' defined in class path resource [myconfig/spring-files/beanRefContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.ClassPathXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mySessionFactory' defined in class path resource [myconfig/spring-files/my-db-context.xml]: Invocation of init method failed; nested exception is org.springframework.jndi.JndiLookupFailureException: JndiObjectTargetSource failed to obtain new target object; nested exception is javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: jdbc not bound]
Environment
- JBoss Enterprise Application Platform (EAP)
- 5.x
- 4.x
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.
