1 Reply Latest reply on Nov 27, 2015 11:09 AM by jimmy001

    Datasource not found

    jimmy001 Apprentice

      Hello,

       

      when deploying a project from the 6.3 workbench, which contains JPA Entites I get the following stacktrace:

       

      Caused by: org.hibernate.engine.jndi.JndiException: Unable to lookup JNDI name [java:jboss/datasources/ExampleDS]

          at org.hibernate.engine.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:117) [hibernate-core-4.3.11.Final.jar:4.3.11.Final]

          at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.configure(DatasourceConnectionProviderImpl.java:115) [hibernate-core-4.3.11.Final.jar:4.3.11.Final]

          at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111) [hibernate-core-4.3.11.Final.jar:4.3.11.Final]

          at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234) [hibernate-core-4.3.11.Final.jar:4.3.11.Final]

          at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206) [hibernate-core-4.3.11.Final.jar:4.3.11.Final]

          at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.buildJdbcConnectionAccess(JdbcServicesImpl.java:260) [hibernate-core-4.3.11.Final.jar:4.3.11.Final]

          at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:94) [hibernate-core-4.3.11.Final.jar:4.3.11.Final]

          at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111) [hibernate-core-4.3.11.Final.jar:4.3.11.Final]

          at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234) [hibernate-core-4.3.11.Final.jar:4.3.11.Final]

          at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206) [hibernate-core-4.3.11.Final.jar:4.3.11.Final]

          at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1887) [hibernate-core-4.3.11.Final.jar:4.3.11.Final]

          at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1845) [hibernate-core-4.3.11.Final.jar:4.3.11.Final]

          at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:857) [hibernate-entitymanager-4.3.11.Final.jar:4.3.11.Final]

          at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850) [hibernate-entitymanager-4.3.11.Final.jar:4.3.11.Final]

          at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:425) [hibernate-core-4.3.11.Final.jar:4.3.11.Final]

          at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:849) [hibernate-entitymanager-4.3.11.Final.jar:4.3.11.Final]

          at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:75) [hibernate-entitymanager-4.3.11.Final.jar:4.3.11.Final]

          ... 78 more

      Caused by: javax.naming.NameNotFoundException: unable to find a bound object at name 'java:jboss/datasources/ExampleDS'

          at bitronix.tm.jndi.BitronixContext.lookup(BitronixContext.java:83)

          at bitronix.tm.jndi.BitronixContext.lookup(BitronixContext.java:67)

          at javax.naming.InitialContext.lookup(InitialContext.java:421) [rt.jar:1.8.0_45]

          at javax.naming.InitialContext.lookup(InitialContext.java:421) [rt.jar:1.8.0_45]

          at org.hibernate.engine.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:114) [hibernate-core-4.3.11.Final.jar:4.3.11.Final]

      I started the workbench by using "ant start.demo.noeclipse".

      I wonder if that has anything to do with the bitronix. Of course there is an ExampleDS. I can see it in the administration console.

      What needs to be done to avoid this error?

       

      Thx for your help