3 Replies Latest reply on May 12, 2010 7:05 AM by samavedulark

    Hibernate not bound in jboss 5

    samavedulark

      Hi,

       

      Hibernate not bound to JNDI.

       

      My application is an .sar file so i have an jboss-service.xml

       

       

      server>
      <mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=Hibernate">
        <attribute name="DatasourceName">${jboss.hibernate.datasource}</attribute>
        <attribute name="Dialect">${jboss.hibernate.dialect}</attribute>
      <attribute name="SessionFactoryName">java:/HibernateSessionFactory</attribute>
        <attribute name="CacheProviderClass">org.hibernate.cache.OptimisticTreeCacheProvider2</attribute>
        <attribute name="QueryCacheEnabled">True</attribute>
        <attribute name="ScanForMappingsEnabled">True</attribute>
        </mbean>
        </server>

       

      Below is the error

       

      2010-05-11 19:31:45,507 WARN  [org.jboss.ejb.EjbModule] (main) EJB configured to bypass security. Please verify if this is intended. Bean=PersistenceServiceBean Deployment=vfszip:/D:/jboss-eap-5.0/jboss-as/server/all/deploy-hasingleton/kernel-ear-1.3-SNAPSHOT/persistence-ejb-1.3-SNAPSHOT.jar/

      2010-05-11 19:31:45,679 INFO  [org.jboss.ejb.plugins.local.BaseLocalProxyFactory] (main) Bound EJB LocalHome 'PersistenceServiceBean' to jndi 'PersistenceServiceLocal'

      2010-05-11 19:31:46,914 ERROR [com.gehc.device.db.dao.hibernate.HibernateDAOFactory] (main) Building SessionFactory failed.

      javax.naming.NameNotFoundException: HibernateSessionFactory not bound

      at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)

      at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)

      at org.jnp.server.NamingServer.getObject(NamingServer.java:785)

      at org.jnp.server.NamingServer.lookup(NamingServer.java:443)

      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)

      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)

      at javax.naming.InitialContext.lookup(InitialContext.java:392)

      at com.gehc.device.db.dao.hibernate.HibernateDAOFactory.getSessionFactory(HibernateDAOFactory.java:59)

      at com.gehc.device.db.dao.hibernate.HibernateDAOFactory.getCurrentSession(HibernateDAOFactory.java:112)

      at com.gehc.device.db.dao.hibernate.HibernateDAOFactory.getAdapterInfoDAO(HibernateDAOFactory.java:117)

      at com.gehc.device.kernel.PersistenceServiceBean.getAllAdapterInfo(PersistenceServiceBean.java:291)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:597)

      at org.jboss.invocation.Invocation.performCall(Invocation.java:386)

      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:233)

      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:156)

      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:173)

      at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)

       

      Thanks

      Ravi S