Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] EclipseLink in Glassfish, roundup

Gordon,

Not sure if you noticed the subsequent announcement...

I noticed -- thanks! That was very quick.

Unfortunately, M4 still throws Exceptions on deployment, NPE this time. The stack trace is attached.

On the LAZY relationship issue: This is a hard one. I spent two days trying to isolate the problem, and didn't succeed. Here are some of my findings:

- Not all LAZY relationships show up empty

- I tracked down the problem in one case to a single line in my code: Just before accessing the list, I retrieve a sibling of the list (referenced by the same entity, otherwise unrelated) from the persistence context. If I /hold/ the reference, the list comes out empty. If I retrieve the entity without holding a pointer to the other entity, the list shows up OK. I couldn't believe this when I encountered it friday night, but it was reproducible monday morning...

- Even more disturbing: The error occurs in a JUnit test where a transaction runs for a rather long time and covers the creation and removal of a lot of entities. If I create 100 entities before accessing the LAZY list, the problem is there, the test fails. If I create 10, the list is OK, all's well. The very same code -- the only difference is the number of entities involved.

- Well then, I thought. Whatever this is, it must be some caching issue. So I set "eclipselink.cache.type.default" to "NONE" and tried again -- and got a StackOverflowError when em.find()ing one of the entities. Scary. I switched back to Essentials and disabled caching for control -- and there it was, the same stack overflow, with none of my classes involved: At least, both of them down consistently, Essentials and EclipseLink.

Of course, I can't be sure I hit the same problem twice with and without the caching, but anyway: I think I should go after the StackOverflow before trying anything else. Is there any sort of mapping known to cause StackOverflow errors at runtime when caching is disabled?

Thanks a lot & greetings from Berlin,

rv

---

[#|2008-02-11T15:08:37.507+0100|WARNING|sun-appserver9.1| javax.enterprise.system.core.classloading| _ThreadID=32;_ThreadName=Thread-104;_RequestID=601205a5- eae6-4e9b-9508-66ee33fe157e;|Exception [EclipseLink-28018] (Eclipse Persistence Services - 1.0 (Build SNAPSHOT - 20080207)): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Predeployment of PersistenceUnit [ormpersistence] failed.
Internal Exception: java.lang.NullPointerException
javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 1.0 (Build SNAPSHOT - 20080207)): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Predeployment of PersistenceUnit [ormpersistence] failed.
Internal Exception: java.lang.NullPointerException
at org .eclipse .persistence .internal .jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:806) at org .eclipse .persistence .jpa .PersistenceProvider .createContainerEntityManagerFactory(PersistenceProvider.java:155) at com .sun .enterprise .server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java: 149) at com .sun .enterprise .server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java: 84) at com .sun .enterprise .server.AbstractLoader.loadPersistenceUnits(AbstractLoader.java:898) at com .sun.enterprise.server.ApplicationLoader.doLoad(ApplicationLoader.java: 184) at com .sun .enterprise .server.TomcatApplicationLoader.doLoad(TomcatApplicationLoader.java:126) at com.sun.enterprise.server.AbstractLoader.load(AbstractLoader.java: 244) at com .sun .enterprise .server.ApplicationManager.applicationDeployed(ApplicationManager.java: 336) at com .sun .enterprise .server.ApplicationManager.applicationDeployed(ApplicationManager.java: 210) at com .sun .enterprise .server.ApplicationManager.applicationDeployed(ApplicationManager.java: 645) at com .sun .enterprise .admin .event .AdminEventMulticaster .invokeApplicationDeployEventListener(AdminEventMulticaster.java:928) at com .sun .enterprise .admin .event .AdminEventMulticaster .handleApplicationDeployEvent(AdminEventMulticaster.java:912) at com .sun .enterprise .admin .event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java: 461) at com .sun .enterprise .admin .event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java: 176) at com .sun .enterprise .admin .server .core .DeploymentNotificationHelper .multicastEvent(DeploymentNotificationHelper.java:308) at com .sun .enterprise .deployment .phasing .DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:226) at com .sun .enterprise .deployment .phasing .ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:298) at com .sun .enterprise .deployment .phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:132) at com .sun .enterprise .deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java: 108) at com .sun .enterprise .deployment .phasing.PEDeploymentService.executePhases(PEDeploymentService.java:919) at com .sun .enterprise .deployment.phasing.PEDeploymentService.start(PEDeploymentService.java: 591) at com .sun .enterprise .deployment.phasing.PEDeploymentService.start(PEDeploymentService.java: 635) at com .sun .enterprise .admin .mbeans.ApplicationsConfigMBean.start(ApplicationsConfigMBean.java:744)
	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:585)
at com .sun .enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java: 375) at com .sun .enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java: 358) at com .sun .enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java: 464) 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: 90)
	at $Proxy1.invoke(Unknown Source)
at com .sun .enterprise .admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java: 304) at com .sun .enterprise .interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174) at com .sun .enterprise .deployment .client .DeploymentClientUtils.startApplication(DeploymentClientUtils.java:145) at com .sun.enterprise.deployment.client.DeployAction.run(DeployAction.java: 537)
	at java.lang.Thread.run(Thread.java:613)
Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 1.0 (Build SNAPSHOT - 20080207)): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Predeployment of PersistenceUnit [ormpersistence] failed.
Internal Exception: java.lang.NullPointerException
at org .eclipse .persistence .exceptions .EntityManagerSetupException .predeployFailed(EntityManagerSetupException.java:203)
	... 45 more
Caused by: java.lang.NullPointerException
at org .eclipse .persistence .internal .jpa.metadata.accessors.OneToOneAccessor.process(OneToOneAccessor.java: 76) at org .eclipse .persistence .internal .jpa .metadata .accessors .RelationshipAccessor.processRelationship(RelationshipAccessor.java:315) at org .eclipse .persistence .internal .jpa .metadata .MetadataProject .processAccessorsWithRelationships(MetadataProject.java:559) at org .eclipse .persistence .internal.jpa.metadata.MetadataProject.process(MetadataProject.java:549) at org .eclipse .persistence .internal .jpa .metadata.MetadataProcessor.processAnnotations(MetadataProcessor.java: 247) at org .eclipse .persistence .internal .jpa .deployment .PersistenceUnitProcessor .processORMetadata(PersistenceUnitProcessor.java:263) at org .eclipse .persistence .internal .jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:763)
	... 44 more
|#]



Back to the top