Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] OneToOne AND ManyToOne Mapping works with FetchType.EAGER but not with FetchType.LAZY -> Exception when deploying (SGES 2.1)

It would be interesting to know if any specific mappings cause this issue. If you make all your mappings eager and gradually switch the mappings to LAZY, it should be possible to identify one or two mappings that cause this issue.

Posting the definition of those mappings should help in identifying the issue.

-Tom

zebhed wrote:
Ok, I have got one more exception in my log that I have not seen (too many
exceptions). Maybe it is helpful:

java.lang.NullPointerException
	at
org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getMethodReturnType(PrivilegedAccessHelper.java:300)
	at
org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.getGetMethodReturnType(MethodAttributeAccessor.java:104)
	at
org.eclipse.persistence.mappings.ForeignReferenceMapping.validateBeforeInitialization(ForeignReferenceMapping.java:1317)
	at
org.eclipse.persistence.descriptors.ClassDescriptor.validateBeforeInitialization(ClassDescriptor.java:4783)
	at
org.eclipse.persistence.descriptors.ClassDescriptor.preInitialize(ClassDescriptor.java:2909)
	at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:416)
	at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:396)
	at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:641)
	at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:594)
	at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:209)
	at
org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:246)
	at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:69)
	at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:118)
	at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:112)
	at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:100)
	at
com.sun.jdo.spi.persistence.support.ejb.ejbc.PersistenceProcessor.loadPersistenceUnitBundle(PersistenceProcessor.java:573)
	at
com.sun.jdo.spi.persistence.support.ejb.ejbc.PersistenceProcessor.createTablesInDB(PersistenceProcessor.java:421)
	at
com.sun.jdo.spi.persistence.support.ejb.ejbc.PersistenceProcessor.processAppBundle(PersistenceProcessor.java:287)
	at
com.sun.jdo.spi.persistence.support.ejb.ejbc.PersistenceProcessor.processApplication(PersistenceProcessor.java:189)
	at
com.sun.jdo.spi.persistence.support.ejb.ejbc.DeploymentEventListenerImpl.processApplication(DeploymentEventListenerImpl.java:211)
	at
com.sun.jdo.spi.persistence.support.ejb.ejbc.DeploymentEventListenerImpl.processEvent(DeploymentEventListenerImpl.java:172)
	at
com.sun.jdo.spi.persistence.support.ejb.ejbc.DeploymentEventListenerImpl.notifyDeploymentEvent(DeploymentEventListenerImpl.java:122)
	at
com.sun.enterprise.deployment.backend.DeploymentEventManager.notifyDeploymentEvent(DeploymentEventManager.java:79)
	at
com.sun.enterprise.deployment.backend.AppDeployer.postDeploy(AppDeployer.java:401)
	at
com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:260)
	at
com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:148)
	at
com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:208)
	at
com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
	at
com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:966)
	at
com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:283)
	at
com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:835)
	at
com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:187)
	at
com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:225)

-------

And I once again have to correct myself. I do not have to change ALL
OneToOne and ManyToOne mappings from lazy to eager. In my application there
are still a few lazy OneToOne and ManyToOne mappings left and the
application deploys fine. But I cannot identify a pattern that leads to this
very odd behavior.
-------

If I find out more I will post it here. In the meantime, all help is
welcome.


Back to the top