title: JNDI naming with websphere 7
body: <p>I have an application that uses EJB and JPA2.0 with eclipselink. I have been able to deploy it successfully and the application starts successfully but when i try to access the uri of the webservice i keep getting different errors depending on what i do.</p>
  
  <p>Here is my web.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
  &lt;web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"&gt;
  &lt;servlet&gt;
  &lt;servlet-name&gt;ServletAdaptor&lt;/servlet-name&gt;
  &lt;servlet-class&gt;com.sun.jersey.spi.container.servlet.ServletContainer&lt;/servlet-class&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;ServletAdaptor&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/resources/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  &lt;session-config&gt;
      &lt;session-timeout&gt;
          30
      &lt;/session-timeout&gt;
      &lt;/session-config&gt;
      &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
  &lt;/welcome-file-list&gt;
  &lt;persistence-context-ref&gt;
      &lt;persistence-context-ref-name&gt;persistence/BACPOnline5PU&lt;/persistence-context-ref-name&gt;
      &lt;persistence-unit-name&gt;BACPOnline5PU&lt;/persistence-unit-name&gt;
      &lt;/persistence-context-ref&gt;
      &lt;resource-ref&gt;
      &lt;res-ref-name&gt;UserTransaction&lt;/res-ref-name&gt;
      &lt;res-type&gt;javax.transaction.UserTransaction&lt;/res-type&gt;
      &lt;res-auth&gt;Container&lt;/res-auth&gt;
  &lt;/resource-ref&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>And my persistence.xml is below</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
  &lt;persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"&gt;
  &lt;persistence-unit name="BACPOnline5PU" transaction-type="JTA"&gt;  &lt;provider&gt;org.eclipse.persistence.jpa.PersistenceProvider&lt;/provider&gt;
  &lt;jta-data-source&gt;jdbc/infopool&lt;/jta-data-source&gt;
  &lt;properties/&gt;
  &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>
  
  <p>I have a PersistenceService class that i use to create persistence from my webservices.
  i create my lookup like this</p>
  
  <pre><code>private PersistenceService() { 
      try {
      this.em = (javax.persistence.EntityManager) new InitialContext().lookup("java:comp/env/persistence/BACPOnline5PU");
      this.utx = (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction");
      } catch (NamingException ex) {
          throw new RuntimeException(ex);
      }
      }
  </code></pre>
  
  <p>I get the error below.</p>
  
  <pre><code>java.lang.RuntimeException: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is java.lang.IllegalStateException: EntityManagerFactory has not been created for PU : PuId=BACPOnline5_war#BACPOnline5.war#BACPOnline5PU]
      at com.tavia.service.PersistenceService.&lt;init&gt;(PersistenceService.java:49)
      at com.tavia.service.PersistenceService.&lt;init&gt;(PersistenceService.java:21)
      at com.tavia.service.PersistenceService$1.initialValue(PersistenceService.java:31)
      at com.tavia.service.PersistenceService$1.initialValue(PersistenceService.java:28)
      at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:152)
      at java.lang.ThreadLocal.get(ThreadLocal.java:142)
      at com.tavia.service.PersistenceService.getInstance(PersistenceService.java:59)
      at com.tavia.service.GltmMisCodesResource.get(GltmMisCodesResource.java:64)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
      at java.lang.reflect.Method.invoke(Method.java:611)
      at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:149)
      at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67)
      at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:259)
      at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:83)
      at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:133)
      at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:71)
      at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:990)
      at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:941)
      at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:932)
      at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:384)
      at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:451)
      at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:632)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:939)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
      at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
      at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3935)
      at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
      at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
      at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
      at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
      at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
      at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
      at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
      at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
      at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
      at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
      at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
      at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
      at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
  Caused by: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is java.lang.IllegalStateException: EntityManagerFactory has not been created for PU : PuId=BACPOnline5_war#BACPOnline5.war#BACPOnline5PU]
      at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:1033)
      at com.ibm.ws.naming.urlbase.UrlContextHelper.processBoundObjectForLookup(UrlContextHelper.java:179)
      at com.ibm.ws.naming.java.javaURLContextRoot.processBoundObjectForLookup(javaURLContextRoot.java:408)
      at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1249)
      at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:395)
      at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:220)
      at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:160)
      at javax.naming.InitialContext.lookup(InitialContext.java:436)
      at com.tavia.service.PersistenceService.&lt;init&gt;(PersistenceService.java:46)
      ... 47 more
  Caused by: java.lang.IllegalStateException: EntityManagerFactory has not been created for PU : PuId=BACPOnline5_war#BACPOnline5.war#BACPOnline5PU
      at com.ibm.ws.jpa.management.JPAPUnitInfo.getEntityManagerFactory(JPAPUnitInfo.java:1390)
      at com.ibm.ws.jpa.management.JPAPUnitInfo.getEntityManagerPool(JPAPUnitInfo.java:1673)
      at com.ibm.ws.jpa.management.JPATxEntityManager.&lt;init&gt;(JPATxEntityManager.java:160)
      at com.ibm.ws.jpa.management.JPAComponentImpl.getEntityManager(JPAComponentImpl.java:1043)
      at com.ibm.ws.util.JPAJndiLookupObjectFactory.getObjectInstance(JPAJndiLookupObjectFactory.java:151)
      at javax.naming.spi.NamingManager.getObjectInstanceByFactoryInReference(NamingManager.java:485)
      at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:350)
      at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:927)
      ... 55 more
  
  [10/12/11 12:37:20:693 CEST] 00000014 servlet       E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: Uncaught exception created in one of the service methods of the servlet ServletAdaptor in application BACPOnline5_war. Exception created : java.lang.RuntimeException: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is java.lang.IllegalStateException: EntityManagerFactory has not been created for PU : PuId=BACPOnline5_war#BACPOnline5.war#BACPOnline5PU]
      at com.tavia.service.PersistenceService.&lt;init&gt;(PersistenceService.java:49)
      at com.tavia.service.PersistenceService.&lt;init&gt;(PersistenceService.java:21)
      at com.tavia.service.PersistenceService$1.initialValue(PersistenceService.java:31)
      at com.tavia.service.PersistenceService$1.initialValue(PersistenceService.java:28)
      at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:152)
      at java.lang.ThreadLocal.get(ThreadLocal.java:142)
      at com.tavia.service.PersistenceService.getInstance(PersistenceService.java:59)
      at com.tavia.service.GltmMisCodesResource.get(GltmMisCodesResource.java:64)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
      at java.lang.reflect.Method.invoke(Method.java:611)
      at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:149)
      at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67)
      at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:259)
      at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:83)
      at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:133)
      at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:71)
      at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:990)
      at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:941)
      at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:932)
      at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:384)
      at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:451)
      at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:632)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:939)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
      at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
      at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3935)
      at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
      at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
      at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
      at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
      at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
      at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
      at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
      at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
      at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
      at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
      at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
      at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
      at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
  Caused by: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is java.lang.IllegalStateException: EntityManagerFactory has not been created for PU : PuId=BACPOnline5_war#BACPOnline5.war#BACPOnline5PU]
      at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:1033)
      at com.ibm.ws.naming.urlbase.UrlContextHelper.processBoundObjectForLookup(UrlContextHelper.java:179)
      at com.ibm.ws.naming.java.javaURLContextRoot.processBoundObjectForLookup(javaURLContextRoot.java:408)
      at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1249)
      at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:395)
      at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:220)
      at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:160)
      at javax.naming.InitialContext.lookup(InitialContext.java:436)
      at com.tavia.service.PersistenceService.&lt;init&gt;(PersistenceService.java:46)
      ... 47 more
  Caused by: java.lang.IllegalStateException: EntityManagerFactory has not been created for PU : PuId=BACPOnline5_war#BACPOnline5.war#BACPOnline5PU
      at com.ibm.ws.jpa.management.JPAPUnitInfo.getEntityManagerFactory(JPAPUnitInfo.java:1390)
      at com.ibm.ws.jpa.management.JPAPUnitInfo.getEntityManagerPool(JPAPUnitInfo.java:1673)
      at com.ibm.ws.jpa.management.JPATxEntityManager.&lt;init&gt;(JPATxEntityManager.java:160)
      at com.ibm.ws.jpa.management.JPAComponentImpl.getEntityManager(JPAComponentImpl.java:1043)
      at com.ibm.ws.util.JPAJndiLookupObjectFactory.getObjectInstance(JPAJndiLookupObjectFactory.java:151)
      at javax.naming.spi.NamingManager.getObjectInstanceByFactoryInReference(NamingManager.java:485)
      at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:350)
      at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:927)
      ... 55 more
  
  [10/12/11 12:37:20:693 CEST] 00000014 LocalTranCoor E   WLTC0017E: Resources rolled back due to setRollbackOnly() being called.
  [10/12/11 12:37:20:709 CEST] 00000014 webapp        E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[ServletAdaptor]: java.lang.RuntimeException: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is java.lang.IllegalStateException: EntityManagerFactory has not been created for PU : PuId=BACPOnline5_war#BACPOnline5.war#BACPOnline5PU]
      at com.tavia.service.PersistenceService.&lt;init&gt;(PersistenceService.java:49)
      at com.tavia.service.PersistenceService.&lt;init&gt;(PersistenceService.java:21)
      at com.tavia.service.PersistenceService$1.initialValue(PersistenceService.java:31)
      at com.tavia.service.PersistenceService$1.initialValue(PersistenceService.java:28)
      at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:152)
      at java.lang.ThreadLocal.get(ThreadLocal.java:142)
      at com.tavia.service.PersistenceService.getInstance(PersistenceService.java:59)
      at com.tavia.service.GltmMisCodesResource.get(GltmMisCodesResource.java:64)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
      at java.lang.reflect.Method.invoke(Method.java:611)
      at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:149)
      at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67)
      at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:259)
      at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:83)
      at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:133)
      at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:71)
      at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:990)
      at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:941)
      at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:932)
      at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:384)
      at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:451)
      at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:632)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:939)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
      at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
      at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3935)
      at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
      at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
      at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
      at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
      at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
      at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
      at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
      at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
      at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
      at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
      at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
      at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
      at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
  Caused by: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is java.lang.IllegalStateException: EntityManagerFactory has not been created for PU : PuId=BACPOnline5_war#BACPOnline5.war#BACPOnline5PU]
      at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:1033)
      at com.ibm.ws.naming.urlbase.UrlContextHelper.processBoundObjectForLookup(UrlContextHelper.java:179)
      at com.ibm.ws.naming.java.javaURLContextRoot.processBoundObjectForLookup(javaURLContextRoot.java:408)
      at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1249)
      at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:395)
      at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:220)
      at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:160)
      at javax.naming.InitialContext.lookup(InitialContext.java:436)
      at com.tavia.service.PersistenceService.&lt;init&gt;(PersistenceService.java:46)
      ... 47 more
  Caused by: java.lang.IllegalStateException: EntityManagerFactory has not been created for PU : PuId=BACPOnline5_war#BACPOnline5.war#BACPOnline5PU
      at com.ibm.ws.jpa.management.JPAPUnitInfo.getEntityManagerFactory(JPAPUnitInfo.java:1390)
      at com.ibm.ws.jpa.management.JPAPUnitInfo.getEntityManagerPool(JPAPUnitInfo.java:1673)
      at com.ibm.ws.jpa.management.JPATxEntityManager.&lt;init&gt;(JPATxEntityManager.java:160)
      at com.ibm.ws.jpa.management.JPAComponentImpl.getEntityManager(JPAComponentImpl.java:1043)
      at com.ibm.ws.util.JPAJndiLookupObjectFactory.getObjectInstance(JPAJndiLookupObjectFactory.java:151)
      at javax.naming.spi.NamingManager.getObjectInstanceByFactoryInReference(NamingManager.java:485)
      at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:350)
      at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:927)
  </code></pre>
  
  <p>Thanks</p>