Hi,
I'm using Hibernate JPA 3.2.1 with Glassfish V1. When I undeploy and deploy a new version of the webapp I got the error below. I have to restart the server instance after each re-deployment of the web application for EntityManagerFactory to be created properly.
Any idea why?
thanks.
Quote:
[#|2007-03-20T17:53:45.482-0700|INFO|sun-appserver-pe9.0|javax.enterprise.system.stream.out|_ThreadID=16;_ThreadName=Thread
-49;|17:53:45,478 FATAL MyEntityManagerFactory: Failed to create EntityManagerFactory for persistence-unit=MyService
javax.persistence.PersistenceException: java.lang.NullPointerException
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:252)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:120)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
at test.common.service.MyEntityManagerFactory.<clinit>(MyEntityManagerFactory.java:28)
at test.common.service.ServiceFactory.close(ServiceFactory.java:40)
at test.mapping.web.controller.MyServletContextListener.contextInitialized(MyServletContextListener.java:2
2)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4236)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4760)
at com.sun.enterprise.web.WebModule.start(WebModule.java:292)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:833)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:817)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:662)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1479)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1143)
at com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:171)
at com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:275)
at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:
954)
at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:941)
at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:448)
at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:160)
at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.ja
va:296)
at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:203)
at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:285)
at com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:119)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:871)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:541)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:585)
at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.start(ApplicationsConfigMBean.java:719)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:353)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:336)
at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:448)
at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:77)
at $Proxy1.invoke(Unknown Source)
at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:297)
at com.sun.enterprise.deployment.client.DeploymentClientUtils.startApplication(DeploymentClientUtils.java:133)
at com.sun.enterprise.deployment.client.DeployAction.run(DeployAction.java:517)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:199)
... 49 more