NameNotFoundException: jdbc not bound in JBoss EAP after migration from Tomcat

Solution Verified - Updated -

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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content