|
when i run a test case then exception occur .
My hibernate-services.xml file as shown :
<server>
<mbean code="org.hibernate.jmx.HibernateService" name="jboss.jca:service=HibernateFactory,name=HibernateFactory">
<depends>jboss.jca:service=RARDeployer</depends>
<!-- Make it deploy ONLY after D.hbm.xml,
mappings/SubAccount.hbm.xml,
mappings/Password.hbm.xml</attribute>-->
<attribute name="JndiName">jdbc/sqlserver</attribute>
<attribute name="Datasource">java:/jdbc/sqlserver</attribute>
<attribute name="Dialect">org.hibernate.dialect.SQLServerDialect</attribute>
<attribute name="TransactionStrategy">org.hibernate.transaction.JTATransactionFactory</attribute>
<attribute name="TransactionManagerLookupStrategy">org.hibernate.transaction.JBossTransactionManagerLookup</attribute>
<attribute name="UseOuterJoin">false</attribute>
<attribute name="ShowSql">false</attribute>
</mbean>
</server>
When i run exception then exception occur is :
Caused by: java.lang.RuntimeException: javax.naming.NameNotFoundException: HibernateFactory not bound
at com_daffodil_blossoms.modules.ServiceLocator.lookUpPersistenceManagerFactory(ServiceLocator.java:60)
at com_daffodil_blossoms.modules.ServiceLocator.getPersistenceManagerFactory(ServiceLocator.java:79)
... 93 more
Caused by: javax.naming.NameNotFoundException: HibernateFactory not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com_daffodil_blossoms.modules.ServiceLocator.lookUpPersistenceManagerFactory(ServiceLocator.java:57)
... 94 more
Pls solve this problem as early as possible .
|