Can't deploy when using LAZY, can deply when using EAGER

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

Can't deploy when using LAZY, can deply when using EAGER

by Michael Bar-Sinai :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello All,

I develop a large JEE app, with eclipselink as the JPA provider. I switched from Toplink Essentials, where the application had no problem deploying; with eclipselink I get all kinds of Null Pointer Exceptions when I deploy the app. The problem seems to boil down to three relationships between objects. When I make them EAGER, the application deploys. When they're LAZY, it doesn't. I followed this thread, but they did not come to any conclusions. I did find more info in the logs, though.

The setup:

(Please view in a fixed-width font such as Courier. Some other classes are omitted.)
                 E +-------------------+ P
        +----------|EMailResourceBundle|---------------+
       *|P       1 +-------------------+ *             |
+-------------+      ^1                                |L1
|EMailResource|      |                           L1 +------------------+
+-------------+      |               +--------------|                  |
                     |               |              |BeeriprintCustomer|
                     |               |              |                  |
                     |              L|*             +------------------+
L Lazy               |   L +-------------+              P|*
E Eager              +-----|EMailTemplate|---------------+
P Problem -              * +-------------+L1
   Should be lazy,
   Works only when eager
1/* multiplicity

Whenever I turn any of the links marked "P" to LAZY, I get an NPE while deploying. Here's a sample, where I turned the link between EMailResource and EMailResourceBundle to LAZY:

[#|2009-09-14T08:32:38.562+0300|CONFIG|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA.connection|_ThreadID=16;_ThreadName=Thread-639;|Connected: jdbc:sqlserver://localhost:1433;responseBuffering=full;encrypt=false;databaseName=eBIll;selectMethod=direct;trustServerCertificate=false;lastUpdateCount=true;
	User: glassfish
	Database: Microsoft SQL Server  Version: 9.00.3042
	Driver: Microsoft SQL Server 2005 JDBC Driver  Version: 1.2.2828.100|#]

[#|2009-09-14T08:32:38.640+0300|SEVERE|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA|_ThreadID=16;_ThreadName=Thread-639;_RequestID=faa6e914-cf3b-4c99-a1ed-8f29f110e9f8;|
Local Exception Stack: 
Exception [EclipseLink-0] (Eclipse Persistence Services - 1.1.2.v20090612-r4475): org.eclipse.persistence.exceptions.IntegrityException
Descriptor Exceptions: 
---------------------------------------------------------

Exception [EclipseLink-60] (Eclipse Persistence Services - 1.1.2.v20090612-r4475): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The method [_persistence_setparentBundle_vh] or [_persistence_getparentBundle_vh] is not defined in the object [il.co.beeriprint.ebill.email.templates.EMailResource].
Internal Exception: java.lang.NoSuchMethodException: il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
Mapping: org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
Descriptor: RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource --> [DatabaseTable(EMAILRESOURCE)])

Runtime Exceptions: 
---------------------------------------------------------

java.lang.NullPointerException

	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:477)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
	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)

Descriptor Exceptions: 
---------------------------------------------------------


Local Exception Stack: 
Exception [EclipseLink-60] (Eclipse Persistence Services - 1.1.2.v20090612-r4475): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The method [_persistence_setparentBundle_vh] or [_persistence_getparentBundle_vh] is not defined in the object [il.co.beeriprint.ebill.email.templates.EMailResource].
Internal Exception: java.lang.NoSuchMethodException: il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
Mapping: org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
Descriptor: RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource --> [DatabaseTable(EMAILRESOURCE)])
	at org.eclipse.persistence.exceptions.DescriptorException.noSuchMethodWhileInitializingAttributesInMethodAccessor(DescriptorException.java:1143)
	at org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.initializeAttributes(MethodAttributeAccessor.java:151)
	at org.eclipse.persistence.mappings.DatabaseMapping.preInitialize(DatabaseMapping.java:1094)
	at org.eclipse.persistence.mappings.ForeignReferenceMapping.preInitialize(ForeignReferenceMapping.java:744)
	at org.eclipse.persistence.mappings.ObjectReferenceMapping.preInitialize(ObjectReferenceMapping.java:863)
	at org.eclipse.persistence.descriptors.ClassDescriptor.preInitialize(ClassDescriptor.java:3192)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:429)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
	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)
Caused by: java.lang.NoSuchMethodException: il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
	at java.lang.Class.getDeclaredMethod(Class.java:1937)
	at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.findMethod(PrivilegedAccessHelper.java:59)
	at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getMethod(PrivilegedAccessHelper.java:226)
	at org.eclipse.persistence.internal.helper.Helper.getDeclaredMethod(Helper.java:965)
	at org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.initializeAttributes(MethodAttributeAccessor.java:144)
	... 31 more

Runtime Exceptions: 
---------------------------------------------------------


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:1373)
	at org.eclipse.persistence.descriptors.ClassDescriptor.validateBeforeInitialization(ClassDescriptor.java:5123)
	at org.eclipse.persistence.descriptors.ClassDescriptor.preInitialize(ClassDescriptor.java:3198)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:429)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
	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)
|#]

[#|2009-09-14T08:32:38.640+0300|SEVERE|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA.ejb|_ThreadID=16;_ThreadName=Thread-639;_RequestID=faa6e914-cf3b-4c99-a1ed-8f29f110e9f8;|
Local Exception Stack: 
Exception [EclipseLink-0] (Eclipse Persistence Services - 1.1.2.v20090612-r4475): org.eclipse.persistence.exceptions.IntegrityException
Descriptor Exceptions: 
---------------------------------------------------------

Exception [EclipseLink-60] (Eclipse Persistence Services - 1.1.2.v20090612-r4475): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The method [_persistence_setparentBundle_vh] or [_persistence_getparentBundle_vh] is not defined in the object [il.co.beeriprint.ebill.email.templates.EMailResource].
Internal Exception: java.lang.NoSuchMethodException: il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
Mapping: org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
Descriptor: RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource --> [DatabaseTable(EMAILRESOURCE)])

Runtime Exceptions: 
---------------------------------------------------------

java.lang.NullPointerException

	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:477)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
	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)

IMHO, this looks like eclipselink finds the classes before it adds the _persistence_* methods, thus causing an NPE.

Setup:
  • Windows Server 2003R2
  • Sun GlassFish Enterprise Server v2.1 (9.1.1) (build b60e-fcs)
  • Eclipse Persistence Services - 1.1.2.v20090612-r4475

Any solutions would be highly appreciated. I have all the logs and will be very willing to help solve this.

Thanks in advance,
Michael Bar-Sinai


Re: Can't deploy when using LAZY, can deply when using EAGER

by tware :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Michael,

   I am not sure if there are any issues with the way GlassFish handles this,
but I can try to help you from an EclipseLink point of view.

   The first thing to do is to see if static weaving helps:

http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_%28ELUG%29#How_to_Configure_Static_Weaving_for_JPA_Entities

   This will help us to isolate whether you are seeing an issue related to
classloaders or an issue related to persistence unit configuration.

-Tom

Michael Bar-Sinai wrote:

> Hello All,
>
> I develop a large JEE app, with eclipselink as the JPA provider. I
> switched from Toplink Essentials, where the application had no problem
> deploying; with eclipselink I get all kinds of Null Pointer Exceptions
> when I deploy the app. The problem seems to boil down to three
> relationships between objects. When I make them EAGER, the application
> deploys. When they're LAZY, it doesn't. I followed this thread
> <http://www.nabble.com/OneToOne-Mapping-works-with-FetchType.EAGER-but-not-with-FetchType.LAZY--%3E-Exception-when-deploying-%28SGES-2.1%29-p21711849.html>,
> but they did not come to any conclusions. I did find more info in the
> logs, though.
>
> The setup:
>
> (Please view in a fixed-width font such as Courier. Some other classes are omitted.)
>                  E +-------------------+ P
>         +----------|EMailResourceBundle|---------------+
>        *|P       1 +-------------------+ *             |
> +-------------+      ^1                                |L1
> |EMailResource|      |                           L1 +------------------+
> +-------------+      |               +--------------|                  |
>                      |               |              |BeeriprintCustomer|
>                      |               |              |                  |
>                      |              L|*             +------------------+
> L Lazy               |   L +-------------+              P|*
> E Eager              +-----|EMailTemplate|---------------+
> P Problem -              * +-------------+L1
>    Should be lazy,
>    Works only when eager
> 1/* multiplicity
>
> Whenever I turn any of the links marked "P" to LAZY, I get an NPE while
> deploying. Here's a sample, where I turned the link between
> EMailResource and EMailResourceBundle to LAZY:
>
> [#|2009-09-14T08:32:38.562+0300|CONFIG|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA.connection|_ThreadID=16;_ThreadName=Thread-639;|Connected: jdbc:sqlserver://localhost:1433;responseBuffering=full;encrypt=false;databaseName=eBIll;selectMethod=direct;trustServerCertificate=false;lastUpdateCount=true;
> User: glassfish
> Database: Microsoft SQL Server  Version: 9.00.3042
> Driver: Microsoft SQL Server 2005 JDBC Driver  Version: 1.2.2828.100|#]
>
> [#|2009-09-14T08:32:38.640+0300|SEVERE|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA|_ThreadID=16;_ThreadName=Thread-639;_RequestID=faa6e914-cf3b-4c99-a1ed-8f29f110e9f8;|
> Local Exception Stack:
> Exception [EclipseLink-0] (Eclipse Persistence Services - 1.1.2.v20090612-r4475): org.eclipse.persistence.exceptions.IntegrityException
> Descriptor Exceptions:
> ---------------------------------------------------------
>
> Exception [EclipseLink-60] (Eclipse Persistence Services - 1.1.2.v20090612-r4475): org.eclipse.persistence.exceptions.DescriptorException
> Exception Description: The method [_persistence_setparentBundle_vh] or [_persistence_getparentBundle_vh] is not defined in the object [il.co.beeriprint.ebill.email.templates.EMailResource].
> Internal Exception: java.lang.NoSuchMethodException: il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
> Mapping: org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
> Descriptor: RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource --> [DatabaseTable(EMAILRESOURCE)])
>
> Runtime Exceptions:
> ---------------------------------------------------------
>
> java.lang.NullPointerException
>
> at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:477)
> at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
> at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
> at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
> at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
> at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
> at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
> at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
> at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
> 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)
>
> Descriptor Exceptions:
> ---------------------------------------------------------
>
>
> Local Exception Stack:
> Exception [EclipseLink-60] (Eclipse Persistence Services - 1.1.2.v20090612-r4475): org.eclipse.persistence.exceptions.DescriptorException
> Exception Description: The method [_persistence_setparentBundle_vh] or [_persistence_getparentBundle_vh] is not defined in the object [il.co.beeriprint.ebill.email.templates.EMailResource].
> Internal Exception: java.lang.NoSuchMethodException: il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
> Mapping: org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
> Descriptor: RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource --> [DatabaseTable(EMAILRESOURCE)])
> at org.eclipse.persistence.exceptions.DescriptorException.noSuchMethodWhileInitializingAttributesInMethodAccessor(DescriptorException.java:1143)
> at org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.initializeAttributes(MethodAttributeAccessor.java:151)
> at org.eclipse.persistence.mappings.DatabaseMapping.preInitialize(DatabaseMapping.java:1094)
> at org.eclipse.persistence.mappings.ForeignReferenceMapping.preInitialize(ForeignReferenceMapping.java:744)
> at org.eclipse.persistence.mappings.ObjectReferenceMapping.preInitialize(ObjectReferenceMapping.java:863)
> at org.eclipse.persistence.descriptors.ClassDescriptor.preInitialize(ClassDescriptor.java:3192)
> at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:429)
> at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
> at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
> at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
> at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
> at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
> at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
> at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
> at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
> 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)
> Caused by: java.lang.NoSuchMethodException: il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
> at java.lang.Class.getDeclaredMethod(Class.java:1937)
> at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.findMethod(PrivilegedAccessHelper.java:59)
> at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getMethod(PrivilegedAccessHelper.java:226)
> at org.eclipse.persistence.internal.helper.Helper.getDeclaredMethod(Helper.java:965)
> at org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.initializeAttributes(MethodAttributeAccessor.java:144)
> ... 31 more
>
> Runtime Exceptions:
> ---------------------------------------------------------
>
>
> 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:1373)
> at org.eclipse.persistence.descriptors.ClassDescriptor.validateBeforeInitialization(ClassDescriptor.java:5123)
> at org.eclipse.persistence.descriptors.ClassDescriptor.preInitialize(ClassDescriptor.java:3198)
> at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:429)
> at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
> at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
> at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
> at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
> at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
> at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
> at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
> at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
> 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)
> |#]
>
> [#|2009-09-14T08:32:38.640+0300|SEVERE|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA.ejb|_ThreadID=16;_ThreadName=Thread-639;_RequestID=faa6e914-cf3b-4c99-a1ed-8f29f110e9f8;|
> Local Exception Stack:
> Exception [EclipseLink-0] (Eclipse Persistence Services - 1.1.2.v20090612-r4475): org.eclipse.persistence.exceptions.IntegrityException
> Descriptor Exceptions:
> ---------------------------------------------------------
>
> Exception [EclipseLink-60] (Eclipse Persistence Services - 1.1.2.v20090612-r4475): org.eclipse.persistence.exceptions.DescriptorException
> Exception Description: The method [_persistence_setparentBundle_vh] or [_persistence_getparentBundle_vh] is not defined in the object [il.co.beeriprint.ebill.email.templates.EMailResource].
> Internal Exception: java.lang.NoSuchMethodException: il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
> Mapping: org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
> Descriptor: RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource --> [DatabaseTable(EMAILRESOURCE)])
>
> Runtime Exceptions:
> ---------------------------------------------------------
>
> java.lang.NullPointerException
>
> at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:477)
> at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
> at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
> at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
> at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
> at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
> at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
> at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
> at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
> 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)
>
>
> IMHO, this looks like eclipselink finds the classes before it adds the
> _persistence_* methods, thus causing an NPE.
>
> Setup:
>
>     * Windows Server 2003R2
>     * Sun GlassFish Enterprise Server v2.1 (9.1.1) (build b60e-fcs)
>     * Eclipse Persistence Services - 1.1.2.v20090612-r4475
>
> Any solutions would be highly appreciated. I have all the logs and will
> be very willing to help solve this.
>
> Thanks in advance,
> Michael Bar-Sinai
>
>
> ------------------------------------------------------------------------
> View this message in context: Can't deploy when using LAZY, can deply
> when using EAGER
> <http://www.nabble.com/Can%27t-deploy-when-using-LAZY%2C-can-deply-when-using-EAGER-tp25433376p25433376.html>
> Sent from the EclipseLink - Users mailing list archive
> <http://www.nabble.com/EclipseLink---Users-f26658.html> at Nabble.com.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@...
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Re: Can't deploy when using LAZY, can deply when using EAGER

by Michael Bar-Sinai :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Tom,
Thanks for your reply. I tried static weaving using the following command (I had to improvise a bit, as the command in the wiki does not really run as is  )

% java -cp eclipselink.jar;avax.persistence_1.0.0.v200905011740.jar org.eclipse.persistence.tools.weaving.jpa.StaticWeave -persistenceinfo eBill-ejb.jar -classpath eBill-ejb.jar eBill-ejb.jar eBill-ejb-w.jar

I did not get any errors, but the weaved ejb is  394KB, while the original is 809KB.

The deployment failed over the expansion of the archive, so I guess something did go wrong here.

I'm not sure how to use the ant task, as this is a Netbeans project.

Any ideas?

Michael

On Mon, Sep 14, 2009 at 11:25 PM, Tom Ware <tom.ware@...> wrote:
Hi Michael,

 I am not sure if there are any issues with the way GlassFish handles this, but I can try to help you from an EclipseLink point of view.

 The first thing to do is to see if static weaving helps:

http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_%28ELUG%29#How_to_Configure_Static_Weaving_for_JPA_Entities

 This will help us to isolate whether you are seeing an issue related to classloaders or an issue related to persistence unit configuration.

-Tom

Michael Bar-Sinai wrote:
Hello All,

I develop a large JEE app, with eclipselink as the JPA provider. I switched from Toplink Essentials, where the application had no problem deploying; with eclipselink I get all kinds of Null Pointer Exceptions when I deploy the app. The problem seems to boil down to three relationships between objects. When I make them EAGER, the application deploys. When they're LAZY, it doesn't. I followed this thread <http://www.nabble.com/OneToOne-Mapping-works-with-FetchType.EAGER-but-not-with-FetchType.LAZY--%3E-Exception-when-deploying-%28SGES-2.1%29-p21711849.html>, but they did not come to any conclusions. I did find more info in the logs, though.


The setup:

(Please view in a fixed-width font such as Courier. Some other classes are omitted.)
                E +-------------------+ P
       +----------|EMailResourceBundle|---------------+
      *|P       1 +-------------------+ *             |
+-------------+      ^1                                |L1
|EMailResource|      |                           L1 +------------------+
+-------------+      |               +--------------|                  |
                    |               |              |BeeriprintCustomer|
                    |               |              |                  |
                    |              L|*             +------------------+
L Lazy               |   L +-------------+              P|*
E Eager              +-----|EMailTemplate|---------------+
P Problem -              * +-------------+L1
  Should be lazy,
  Works only when eager
1/* multiplicity

Whenever I turn any of the links marked "P" to LAZY, I get an NPE while deploying. Here's a sample, where I turned the link between EMailResource and EMailResourceBundle to LAZY:

[#|2009-09-14T08:32:38.562+0300|CONFIG|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA.connection|_ThreadID=16;_ThreadName=Thread-639;|Connected: jdbc:sqlserver://localhost:1433;responseBuffering=full;encrypt=false;databaseName=eBIll;selectMethod=direct;trustServerCertificate=false;lastUpdateCount=true;
       User: glassfish
       Database: Microsoft SQL Server  Version: 9.00.3042
       Driver: Microsoft SQL Server 2005 JDBC Driver  Version: 1.2.2828.100|#]

[#|2009-09-14T08:32:38.640+0300|SEVERE|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA|_ThreadID=16;_ThreadName=Thread-639;_RequestID=faa6e914-cf3b-4c99-a1ed-8f29f110e9f8;|
Local Exception Stack: Exception [EclipseLink-0] (Eclipse Persistence Services - 1.1.2.v20090612-r4475): org.eclipse.persistence.exceptions.IntegrityException
Descriptor Exceptions: ---------------------------------------------------------

Exception [EclipseLink-60] (Eclipse Persistence Services - 1.1.2.v20090612-r4475): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The method [_persistence_setparentBundle_vh] or [_persistence_getparentBundle_vh] is not defined in the object [il.co.beeriprint.ebill.email.templates.EMailResource].
Internal Exception: java.lang.NoSuchMethodException: il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
Mapping: org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
Descriptor: RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource --> [DatabaseTable(EMAILRESOURCE)])

Runtime Exceptions: ---------------------------------------------------------

java.lang.NullPointerException

       at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:477)
       at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
       at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
       at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
       at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
       at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
       at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
       at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
       at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
       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)

Descriptor Exceptions: ---------------------------------------------------------


Local Exception Stack: Exception [EclipseLink-60] (Eclipse Persistence Services - 1.1.2.v20090612-r4475): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The method [_persistence_setparentBundle_vh] or [_persistence_getparentBundle_vh] is not defined in the object [il.co.beeriprint.ebill.email.templates.EMailResource].
Internal Exception: java.lang.NoSuchMethodException: il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
Mapping: org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
Descriptor: RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource --> [DatabaseTable(EMAILRESOURCE)])
       at org.eclipse.persistence.exceptions.DescriptorException.noSuchMethodWhileInitializingAttributesInMethodAccessor(DescriptorException.java:1143)
       at org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.initializeAttributes(MethodAttributeAccessor.java:151)
       at org.eclipse.persistence.mappings.DatabaseMapping.preInitialize(DatabaseMapping.java:1094)
       at org.eclipse.persistence.mappings.ForeignReferenceMapping.preInitialize(ForeignReferenceMapping.java:744)
       at org.eclipse.persistence.mappings.ObjectReferenceMapping.preInitialize(ObjectReferenceMapping.java:863)
       at org.eclipse.persistence.descriptors.ClassDescriptor.preInitialize(ClassDescriptor.java:3192)
       at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:429)
       at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
       at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
       at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
       at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
       at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
       at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
       at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
       at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
       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)
Caused by: java.lang.NoSuchMethodException: il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
       at java.lang.Class.getDeclaredMethod(Class.java:1937)
       at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.findMethod(PrivilegedAccessHelper.java:59)
       at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getMethod(PrivilegedAccessHelper.java:226)
       at org.eclipse.persistence.internal.helper.Helper.getDeclaredMethod(Helper.java:965)
       at org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.initializeAttributes(MethodAttributeAccessor.java:144)
       ... 31 more

Runtime Exceptions: ---------------------------------------------------------


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:1373)
       at org.eclipse.persistence.descriptors.ClassDescriptor.validateBeforeInitialization(ClassDescriptor.java:5123)
       at org.eclipse.persistence.descriptors.ClassDescriptor.preInitialize(ClassDescriptor.java:3198)
       at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:429)
       at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
       at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
       at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
       at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
       at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
       at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
       at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
       at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
       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)
|#]

[#|2009-09-14T08:32:38.640+0300|SEVERE|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA.ejb|_ThreadID=16;_ThreadName=Thread-639;_RequestID=faa6e914-cf3b-4c99-a1ed-8f29f110e9f8;|
Local Exception Stack: Exception [EclipseLink-0] (Eclipse Persistence Services - 1.1.2.v20090612-r4475): org.eclipse.persistence.exceptions.IntegrityException
Descriptor Exceptions: ---------------------------------------------------------

Exception [EclipseLink-60] (Eclipse Persistence Services - 1.1.2.v20090612-r4475): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The method [_persistence_setparentBundle_vh] or [_persistence_getparentBundle_vh] is not defined in the object [il.co.beeriprint.ebill.email.templates.EMailResource].
Internal Exception: java.lang.NoSuchMethodException: il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
Mapping: org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
Descriptor: RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource --> [DatabaseTable(EMAILRESOURCE)])

Runtime Exceptions: ---------------------------------------------------------

java.lang.NullPointerException

       at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:477)
       at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
       at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
       at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
       at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
       at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
       at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
       at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
       at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
       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)


IMHO, this looks like eclipselink finds the classes before it adds the _persistence_* methods, thus causing an NPE.

Setup:

   * Windows Server 2003R2
   * Sun GlassFish Enterprise Server v2.1 (9.1.1) (build b60e-fcs)
   * Eclipse Persistence Services - 1.1.2.v20090612-r4475

Any solutions would be highly appreciated. I have all the logs and will be very willing to help solve this.

Thanks in advance,
Michael Bar-Sinai


------------------------------------------------------------------------
View this message in context: Can't deploy when using LAZY, can deply when using EAGER <http://www.nabble.com/Can%27t-deploy-when-using-LAZY%2C-can-deply-when-using-EAGER-tp25433376p25433376.html>
Sent from the EclipseLink - Users mailing list archive <http://www.nabble.com/EclipseLink---Users-f26658.html> at Nabble.com.


------------------------------------------------------------------------

_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Re: Can't deploy when using LAZY, can deply when using EAGER

by tware :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Michael,

   I see a typo in your command line: it should be javax.persistence (not
avax.persistence)

   What is the contents of your eBill-ejb.jar?  META-INF/persistence.xml? your
domain classes?  Anything else?

-Tom

Michael Bar-sinai wrote:

> Hi Tom,
> Thanks for your reply. I tried static weaving using the following
> command (I had to improvise a bit, as the command in the wiki does not
> really run as is  )
>
> % java -cp
> eclipselink.jar;avax.persistence_1.0.0.v200905011740.jar org.eclipse.persistence.tools.weaving.jpa.StaticWeave
> -persistenceinfo eBill-ejb.jar -classpath eBill-ejb.jar eBill-ejb.jar
> eBill-ejb-w.jar
>
> I did not get any errors, but the weaved ejb is  394KB, while the
> original is 809KB.
>
> The deployment failed over the expansion of the archive, so I guess
> something did go wrong here.
>
> I'm not sure how to use the ant task, as this is a Netbeans project.
>
> Any ideas?
>
> Michael
>
> On Mon, Sep 14, 2009 at 11:25 PM, Tom Ware <tom.ware@...
> <mailto:tom.ware@...>> wrote:
>
>     Hi Michael,
>
>      I am not sure if there are any issues with the way GlassFish
>     handles this, but I can try to help you from an EclipseLink point of
>     view.
>
>      The first thing to do is to see if static weaving helps:
>
>     http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_%28ELUG%29#How_to_Configure_Static_Weaving_for_JPA_Entities
>
>      This will help us to isolate whether you are seeing an issue
>     related to classloaders or an issue related to persistence unit
>     configuration.
>
>     -Tom
>
>     Michael Bar-Sinai wrote:
>
>         Hello All,
>
>         I develop a large JEE app, with eclipselink as the JPA provider.
>         I switched from Toplink Essentials, where the application had no
>         problem deploying; with eclipselink I get all kinds of Null
>         Pointer Exceptions when I deploy the app. The problem seems to
>         boil down to three relationships between objects. When I make
>         them EAGER, the application deploys. When they're LAZY, it
>         doesn't. I followed this thread
>         <http://www.nabble.com/OneToOne-Mapping-works-with-FetchType.EAGER-but-not-with-FetchType.LAZY--%3E-Exception-when-deploying-%28SGES-2.1%29-p21711849.html>,
>         but they did not come to any conclusions. I did find more info
>         in the logs, though.
>
>
>         The setup:
>
>         (Please view in a fixed-width font such as Courier. Some other
>         classes are omitted.)
>                         E +-------------------+ P
>                +----------|EMailResourceBundle|---------------+
>               *|P       1 +-------------------+ *             |
>         +-------------+      ^1                                |L1
>         |EMailResource|      |                           L1
>         +------------------+
>         +-------------+      |               +--------------|          
>                |
>                             |               |            
>          |BeeriprintCustomer|
>                             |               |              |            
>              |
>                             |              L|*            
>         +------------------+
>         L Lazy               |   L +-------------+              P|*
>         E Eager              +-----|EMailTemplate|---------------+
>         P Problem -              * +-------------+L1
>           Should be lazy,
>           Works only when eager
>         1/* multiplicity
>
>         Whenever I turn any of the links marked "P" to LAZY, I get an
>         NPE while deploying. Here's a sample, where I turned the link
>         between EMailResource and EMailResourceBundle to LAZY:
>
>         [#|2009-09-14T08:32:38.562+0300|CONFIG|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA.connection|_ThreadID=16;_ThreadName=Thread-639;|Connected:
>         jdbc:sqlserver://localhost:1433;responseBuffering=full;encrypt=false;databaseName=eBIll;selectMethod=direct;trustServerCertificate=false;lastUpdateCount=true;
>                User: glassfish
>                Database: Microsoft SQL Server  Version: 9.00.3042
>                Driver: Microsoft SQL Server 2005 JDBC Driver  Version:
>         1.2.2828.100|#]
>
>         [#|2009-09-14T08:32:38.640+0300|SEVERE|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA|_ThreadID=16;_ThreadName=Thread-639;_RequestID=faa6e914-cf3b-4c99-a1ed-8f29f110e9f8;|
>         Local Exception Stack: Exception [EclipseLink-0] (Eclipse
>         Persistence Services - 1.1.2.v20090612-r4475):
>         org.eclipse.persistence.exceptions.IntegrityException
>         Descriptor Exceptions:
>         ---------------------------------------------------------
>
>         Exception [EclipseLink-60] (Eclipse Persistence Services -
>         1.1.2.v20090612-r4475):
>         org.eclipse.persistence.exceptions.DescriptorException
>         Exception Description: The method
>         [_persistence_setparentBundle_vh] or
>         [_persistence_getparentBundle_vh] is not defined in the object
>         [il.co.beeriprint.ebill.email.templates.EMailResource].
>         Internal Exception: java.lang.NoSuchMethodException:
>         il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
>         Mapping:
>         org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
>         Descriptor:
>         RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource
>         --> [DatabaseTable(EMAILRESOURCE)])
>
>         Runtime Exceptions:
>         ---------------------------------------------------------
>
>         java.lang.NullPointerException
>
>                at
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:477)
>                at
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
>                at
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
>                at
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
>                at
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
>                at
>         org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
>                at
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
>                at
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
>                at
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
>                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)
>
>         Descriptor Exceptions:
>         ---------------------------------------------------------
>
>
>         Local Exception Stack: Exception [EclipseLink-60] (Eclipse
>         Persistence Services - 1.1.2.v20090612-r4475):
>         org.eclipse.persistence.exceptions.DescriptorException
>         Exception Description: The method
>         [_persistence_setparentBundle_vh] or
>         [_persistence_getparentBundle_vh] is not defined in the object
>         [il.co.beeriprint.ebill.email.templates.EMailResource].
>         Internal Exception: java.lang.NoSuchMethodException:
>         il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
>         Mapping:
>         org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
>         Descriptor:
>         RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource
>         --> [DatabaseTable(EMAILRESOURCE)])
>                at
>         org.eclipse.persistence.exceptions.DescriptorException.noSuchMethodWhileInitializingAttributesInMethodAccessor(DescriptorException.java:1143)
>                at
>         org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.initializeAttributes(MethodAttributeAccessor.java:151)
>                at
>         org.eclipse.persistence.mappings.DatabaseMapping.preInitialize(DatabaseMapping.java:1094)
>                at
>         org.eclipse.persistence.mappings.ForeignReferenceMapping.preInitialize(ForeignReferenceMapping.java:744)
>                at
>         org.eclipse.persistence.mappings.ObjectReferenceMapping.preInitialize(ObjectReferenceMapping.java:863)
>                at
>         org.eclipse.persistence.descriptors.ClassDescriptor.preInitialize(ClassDescriptor.java:3192)
>                at
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:429)
>                at
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
>                at
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
>                at
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
>                at
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
>                at
>         org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
>                at
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
>                at
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
>                at
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
>                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)
>         Caused by: java.lang.NoSuchMethodException:
>         il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
>                at java.lang.Class.getDeclaredMethod(Class.java:1937)
>                at
>         org.eclipse.persistence.internal.security.PrivilegedAccessHelper.findMethod(PrivilegedAccessHelper.java:59)
>                at
>         org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getMethod(PrivilegedAccessHelper.java:226)
>                at
>         org.eclipse.persistence.internal.helper.Helper.getDeclaredMethod(Helper.java:965)
>                at
>         org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.initializeAttributes(MethodAttributeAccessor.java:144)
>                ... 31 more
>
>         Runtime Exceptions:
>         ---------------------------------------------------------
>
>
>         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:1373)
>                at
>         org.eclipse.persistence.descriptors.ClassDescriptor.validateBeforeInitialization(ClassDescriptor.java:5123)
>                at
>         org.eclipse.persistence.descriptors.ClassDescriptor.preInitialize(ClassDescriptor.java:3198)
>                at
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:429)
>                at
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
>                at
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
>                at
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
>                at
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
>                at
>         org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
>                at
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
>                at
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
>                at
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
>                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)
>         |#]
>
>         [#|2009-09-14T08:32:38.640+0300|SEVERE|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA.ejb|_ThreadID=16;_ThreadName=Thread-639;_RequestID=faa6e914-cf3b-4c99-a1ed-8f29f110e9f8;|
>         Local Exception Stack: Exception [EclipseLink-0] (Eclipse
>         Persistence Services - 1.1.2.v20090612-r4475):
>         org.eclipse.persistence.exceptions.IntegrityException
>         Descriptor Exceptions:
>         ---------------------------------------------------------
>
>         Exception [EclipseLink-60] (Eclipse Persistence Services -
>         1.1.2.v20090612-r4475):
>         org.eclipse.persistence.exceptions.DescriptorException
>         Exception Description: The method
>         [_persistence_setparentBundle_vh] or
>         [_persistence_getparentBundle_vh] is not defined in the object
>         [il.co.beeriprint.ebill.email.templates.EMailResource].
>         Internal Exception: java.lang.NoSuchMethodException:
>         il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
>         Mapping:
>         org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
>         Descriptor:
>         RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource
>         --> [DatabaseTable(EMAILRESOURCE)])
>
>         Runtime Exceptions:
>         ---------------------------------------------------------
>
>         java.lang.NullPointerException
>
>                at
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:477)
>                at
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
>                at
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
>                at
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
>                at
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
>                at
>         org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
>                at
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
>                at
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
>                at
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
>                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)
>
>
>         IMHO, this looks like eclipselink finds the classes before it
>         adds the _persistence_* methods, thus causing an NPE.
>
>         Setup:
>
>            * Windows Server 2003R2
>            * Sun GlassFish Enterprise Server v2.1 (9.1.1) (build b60e-fcs)
>            * Eclipse Persistence Services - 1.1.2.v20090612-r4475
>
>         Any solutions would be highly appreciated. I have all the logs
>         and will be very willing to help solve this.
>
>         Thanks in advance,
>         Michael Bar-Sinai
>
>
>         ------------------------------------------------------------------------
>         View this message in context: Can't deploy when using LAZY, can
>         deply when using EAGER
>         <http://www.nabble.com/Can%27t-deploy-when-using-LAZY%2C-can-deply-when-using-EAGER-tp25433376p25433376.html>
>         Sent from the EclipseLink - Users mailing list archive
>         <http://www.nabble.com/EclipseLink---Users-f26658.html> at
>         Nabble.com.
>
>
>         ------------------------------------------------------------------------
>
>         _______________________________________________
>         eclipselink-users mailing list
>         eclipselink-users@... <mailto:eclipselink-users@...>
>         https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>     _______________________________________________
>     eclipselink-users mailing list
>     eclipselink-users@... <mailto:eclipselink-users@...>
>     https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@...
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Re: Can't deploy when using LAZY, can deply when using EAGER

by Michael Bar-Sinai :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Tom,
The typo is only in the command I posted here... I actually renamed that jar to have a shorter name.
eBill-Ejb.jar has the domain classes and the META-INF/persistence.xml file, as well as other classes. 
Is it possible that the static weaver fails like the one in the application server? It there any -verbose flag I can use?

The contents of persistence.xml follows:
<?xml version="1.0" encoding="UTF-8"?>
<persistence-unit name="eBill-PU-JTA" transaction-type="JTA">
<description>
Normal use PU - used in most EJB actions.
</description>
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>jdbc/eBill</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
      <!--
-->
<property name="eclipselink.ddl-generation" value="create-tables"/>
<property name="eclipselink.logging.level" value="FINE"/>
<property name="eclipselink.jdbc.native-sql" value="true"/>
<property name="eclipselink.target-server" value="SunAS9"/>
<property name="eclipselink.target-database" value="SQLServer"/>
<property name="eclipselink.weaving" value="static" />
</properties>
</persistence-unit>
<persistence-unit name="eBill-PU-RL" transaction-type="RESOURCE_LOCAL">
<description>
Used for when we need to do fine-grained TXN control, e.g. when doing mass deletion.
</description>
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<non-jta-data-source>jdbc/eBill</non-jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="toplink.target-database" value="SQLServer"/>
<property name="eclipselink.target-server" value="SunAS9"/>
</properties>
</persistence-unit>
</persistence>

Thanks,
Michael


On Tue, Sep 15, 2009 at 6:12 PM, Tom Ware <tom.ware@...> wrote:
Hi Michael,

 I see a typo in your command line: it should be javax.persistence (not avax.persistence)

 What is the contents of your eBill-ejb.jar?  META-INF/persistence.xml? your domain classes?  Anything else?

-Tom

Michael Bar-sinai wrote:
Hi Tom,
Thanks for your reply. I tried static weaving using the following command (I had to improvise a bit, as the command in the wiki does not really run as is  )

% java -cp eclipselink.jar;avax.persistence_1.0.0.v200905011740.jar org.eclipse.persistence.tools.weaving.jpa.StaticWeave -persistenceinfo eBill-ejb.jar -classpath eBill-ejb.jar eBill-ejb.jar eBill-ejb-w.jar

I did not get any errors, but the weaved ejb is  394KB, while the original is 809KB.

The deployment failed over the expansion of the archive, so I guess something did go wrong here.

I'm not sure how to use the ant task, as this is a Netbeans project.

Any ideas?

Michael

On Mon, Sep 14, 2009 at 11:25 PM, Tom Ware <tom.ware@... <mailto:tom.ware@...>> wrote:

   Hi Michael,

    I am not sure if there are any issues with the way GlassFish
   handles this, but I can try to help you from an EclipseLink point of
   view.

    The first thing to do is to see if static weaving helps:

   http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_%28ELUG%29#How_to_Configure_Static_Weaving_for_JPA_Entities

    This will help us to isolate whether you are seeing an issue
   related to classloaders or an issue related to persistence unit
   configuration.

   -Tom

   Michael Bar-Sinai wrote:

       Hello All,

       I develop a large JEE app, with eclipselink as the JPA provider.
       I switched from Toplink Essentials, where the application had no
       problem deploying; with eclipselink I get all kinds of Null
       Pointer Exceptions when I deploy the app. The problem seems to
       boil down to three relationships between objects. When I make
       them EAGER, the application deploys. When they're LAZY, it
       doesn't. I followed this thread
       <http://www.nabble.com/OneToOne-Mapping-works-with-FetchType.EAGER-but-not-with-FetchType.LAZY--%3E-Exception-when-deploying-%28SGES-2.1%29-p21711849.html>,
       but they did not come to any conclusions. I did find more info
       in the logs, though.


       The setup:

       (Please view in a fixed-width font such as Courier. Some other
       classes are omitted.)
                       E +-------------------+ P
              +----------|EMailResourceBundle|---------------+
             *|P       1 +-------------------+ *             |
       +-------------+      ^1                                |L1
       |EMailResource|      |                           L1
       +------------------+
       +-------------+      |               +--------------|                         |
                           |               |                     |BeeriprintCustomer|
                           |               |              |                         |
                           |              L|*                    +------------------+
       L Lazy               |   L +-------------+              P|*
       E Eager              +-----|EMailTemplate|---------------+
       P Problem -              * +-------------+L1
         Should be lazy,
         Works only when eager
       1/* multiplicity

       Whenever I turn any of the links marked "P" to LAZY, I get an
       NPE while deploying. Here's a sample, where I turned the link
       between EMailResource and EMailResourceBundle to LAZY:

       [#|2009-09-14T08:32:38.562+0300|CONFIG|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA.connection|_ThreadID=16;_ThreadName=Thread-639;|Connected:
       jdbc:sqlserver://localhost:1433;responseBuffering=full;encrypt=false;databaseName=eBIll;selectMethod=direct;trustServerCertificate=false;lastUpdateCount=true;
              User: glassfish
              Database: Microsoft SQL Server  Version: 9.00.3042
              Driver: Microsoft SQL Server 2005 JDBC Driver  Version:
       1.2.2828.100|#]

       [#|2009-09-14T08:32:38.640+0300|SEVERE|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA|_ThreadID=16;_ThreadName=Thread-639;_RequestID=faa6e914-cf3b-4c99-a1ed-8f29f110e9f8;|
       Local Exception Stack: Exception [EclipseLink-0] (Eclipse
       Persistence Services - 1.1.2.v20090612-r4475):
       org.eclipse.persistence.exceptions.IntegrityException
       Descriptor Exceptions:
       ---------------------------------------------------------

       Exception [EclipseLink-60] (Eclipse Persistence Services -
       1.1.2.v20090612-r4475):
       org.eclipse.persistence.exceptions.DescriptorException
       Exception Description: The method
       [_persistence_setparentBundle_vh] or
       [_persistence_getparentBundle_vh] is not defined in the object
       [il.co.beeriprint.ebill.email.templates.EMailResource].
       Internal Exception: java.lang.NoSuchMethodException:
       il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
       Mapping:
       org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
       Descriptor:
       RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource
       --> [DatabaseTable(EMAILRESOURCE)])

       Runtime Exceptions:
       ---------------------------------------------------------

       java.lang.NullPointerException

              at
       org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:477)
              at
       org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
              at
       org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
              at
       org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
              at
       org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
              at
       org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
              at
       org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
              at
       org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
              at
       org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
              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)

       Descriptor Exceptions:
       ---------------------------------------------------------


       Local Exception Stack: Exception [EclipseLink-60] (Eclipse
       Persistence Services - 1.1.2.v20090612-r4475):
       org.eclipse.persistence.exceptions.DescriptorException
       Exception Description: The method
       [_persistence_setparentBundle_vh] or
       [_persistence_getparentBundle_vh] is not defined in the object
       [il.co.beeriprint.ebill.email.templates.EMailResource].
       Internal Exception: java.lang.NoSuchMethodException:
       il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
       Mapping:
       org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
       Descriptor:
       RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource
       --> [DatabaseTable(EMAILRESOURCE)])
              at
       org.eclipse.persistence.exceptions.DescriptorException.noSuchMethodWhileInitializingAttributesInMethodAccessor(DescriptorException.java:1143)
              at
       org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.initializeAttributes(MethodAttributeAccessor.java:151)
              at
       org.eclipse.persistence.mappings.DatabaseMapping.preInitialize(DatabaseMapping.java:1094)
              at
       org.eclipse.persistence.mappings.ForeignReferenceMapping.preInitialize(ForeignReferenceMapping.java:744)
              at
       org.eclipse.persistence.mappings.ObjectReferenceMapping.preInitialize(ObjectReferenceMapping.java:863)
              at
       org.eclipse.persistence.descriptors.ClassDescriptor.preInitialize(ClassDescriptor.java:3192)
              at
       org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:429)
              at
       org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
              at
       org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
              at
       org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
              at
       org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
              at
       org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
              at
       org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
              at
       org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
              at
       org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
              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)
       Caused by: java.lang.NoSuchMethodException:
       il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
              at java.lang.Class.getDeclaredMethod(Class.java:1937)
              at
       org.eclipse.persistence.internal.security.PrivilegedAccessHelper.findMethod(PrivilegedAccessHelper.java:59)
              at
       org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getMethod(PrivilegedAccessHelper.java:226)
              at
       org.eclipse.persistence.internal.helper.Helper.getDeclaredMethod(Helper.java:965)
              at
       org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.initializeAttributes(MethodAttributeAccessor.java:144)
              ... 31 more

       Runtime Exceptions:
       ---------------------------------------------------------


       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:1373)
              at
       org.eclipse.persistence.descriptors.ClassDescriptor.validateBeforeInitialization(ClassDescriptor.java:5123)
              at
       org.eclipse.persistence.descriptors.ClassDescriptor.preInitialize(ClassDescriptor.java:3198)
              at
       org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:429)
              at
       org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
              at
       org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
              at
       org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
              at
       org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
              at
       org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
              at
       org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
              at
       org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
              at
       org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
              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)
       |#]

       [#|2009-09-14T08:32:38.640+0300|SEVERE|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA.ejb|_ThreadID=16;_ThreadName=Thread-639;_RequestID=faa6e914-cf3b-4c99-a1ed-8f29f110e9f8;|
       Local Exception Stack: Exception [EclipseLink-0] (Eclipse
       Persistence Services - 1.1.2.v20090612-r4475):
       org.eclipse.persistence.exceptions.IntegrityException
       Descriptor Exceptions:
       ---------------------------------------------------------

       Exception [EclipseLink-60] (Eclipse Persistence Services -
       1.1.2.v20090612-r4475):
       org.eclipse.persistence.exceptions.DescriptorException
       Exception Description: The method
       [_persistence_setparentBundle_vh] or
       [_persistence_getparentBundle_vh] is not defined in the object
       [il.co.beeriprint.ebill.email.templates.EMailResource].
       Internal Exception: java.lang.NoSuchMethodException:
       il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
       Mapping:
       org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
       Descriptor:
       RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource
       --> [DatabaseTable(EMAILRESOURCE)])

       Runtime Exceptions:
       ---------------------------------------------------------

       java.lang.NullPointerException

              at
       org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:477)
              at
       org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
              at
       org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
              at
       org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
              at
       org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
              at
       org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
              at
       org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
              at
       org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
              at
       org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
              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)


       IMHO, this looks like eclipselink finds the classes before it
       adds the _persistence_* methods, thus causing an NPE.

       Setup:

          * Windows Server 2003R2
          * Sun GlassFish Enterprise Server v2.1 (9.1.1) (build b60e-fcs)
          * Eclipse Persistence Services - 1.1.2.v20090612-r4475

       Any solutions would be highly appreciated. I have all the logs
       and will be very willing to help solve this.

       Thanks in advance,
       Michael Bar-Sinai


       ------------------------------------------------------------------------
       View this message in context: Can't deploy when using LAZY, can
       deply when using EAGER
       <http://www.nabble.com/Can%27t-deploy-when-using-LAZY%2C-can-deply-when-using-EAGER-tp25433376p25433376.html>
       Sent from the EclipseLink - Users mailing list archive
       <http://www.nabble.com/EclipseLink---Users-f26658.html> at
       Nabble.com.


       ------------------------------------------------------------------------

       _______________________________________________
       eclipselink-users mailing list
       eclipselink-users@... <mailto:eclipselink-users@...>

       https://dev.eclipse.org/mailman/listinfo/eclipselink-users

   _______________________________________________
   eclipselink-users mailing list
   eclipselink-users@... <mailto:eclipselink-users@...>

   https://dev.eclipse.org/mailman/listinfo/eclipselink-users



------------------------------------------------------------------------

_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Re: Can't deploy when using LAZY, can deply when using EAGER

by tware :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Michael,

   The only thing you can do to make things more verbose to to increase the
logging level to FINEST.

   How big is your persistence unit?  How difficult would it be to actually list
the classes in your persistence.xml rather than use
<exclude-unlisted-classes>false</exclude-unlisted-classes>?

   What is missing from your weaved jar?  (You say it is about half the size of
your unweaved jar.)  Are the missing classes part of your persistence unit, or
they among the "other classes" you mention below?  If they are from the
persistence unit, can you provide an example of one of the classes that is missing?

   Another thing to try is to see if running the weaver against a
persistence.xml that contains only one of your persistence units makes any
difference.

-Tom

Michael Bar-sinai wrote:

> Hi Tom,
> The typo is only in the command I posted here... I actually renamed that
> jar to have a shorter name.
> eBill-Ejb.jar has the domain classes and the META-INF/persistence.xml
> file, as well as other classes.
> Is it possible that the static weaver fails like the one in the
> application server? It there any -verbose flag I can use?
>
> The contents of persistence.xml follows:
> <?xml version="1.0" encoding="UTF-8"?>
> <persistence version="1.0"
> xmlns="http://java.sun.com/xml/ns/persistence"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/persistence 
> http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
> <persistence-unit name="eBill-PU-JTA" transaction-type="JTA">
> <description>
> Normal use PU - used in most EJB actions.
> </description>
> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
> <jta-data-source>jdbc/eBill</jta-data-source>
> <exclude-unlisted-classes>false</exclude-unlisted-classes>
> <properties>
>       <!--
> -->
> <property name="eclipselink.ddl-generation" value="create-tables"/>
> <property name="eclipselink.logging.level" value="FINE"/>
> <property name="eclipselink.jdbc.native-sql" value="true"/>
> <property name="eclipselink.target-server" value="SunAS9"/>
> <property name="eclipselink.target-database" value="SQLServer"/>
> <property name="eclipselink.weaving" value="static" />
> </properties>
> </persistence-unit>
> <persistence-unit name="eBill-PU-RL" transaction-type="RESOURCE_LOCAL">
> <description>
> Used for when we need to do fine-grained TXN control, e.g. when doing
> mass deletion.
> </description>
> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
> <non-jta-data-source>jdbc/eBill</non-jta-data-source>
> <exclude-unlisted-classes>false</exclude-unlisted-classes>
> <properties>
> <property name="toplink.target-database" value="SQLServer"/>
> <property name="eclipselink.target-server" value="SunAS9"/>
> </properties>
> </persistence-unit>
> </persistence>
>
> Thanks,
> Michael
>
>
> On Tue, Sep 15, 2009 at 6:12 PM, Tom Ware <tom.ware@...
> <mailto:tom.ware@...>> wrote:
>
>     Hi Michael,
>
>      I see a typo in your command line: it should be javax.persistence
>     (not avax.persistence)
>
>      What is the contents of your eBill-ejb.jar?
>      META-INF/persistence.xml? your domain classes?  Anything else?
>
>     -Tom
>
>     Michael Bar-sinai wrote:
>
>         Hi Tom,
>         Thanks for your reply. I tried static weaving using the
>         following command (I had to improvise a bit, as the command in
>         the wiki does not really run as is  )
>
>         % java -cp
>         eclipselink.jar;avax.persistence_1.0.0.v200905011740.jar
>         org.eclipse.persistence.tools.weaving.jpa.StaticWeave
>         -persistenceinfo eBill-ejb.jar -classpath eBill-ejb.jar
>         eBill-ejb.jar eBill-ejb-w.jar
>
>         I did not get any errors, but the weaved ejb is  394KB, while
>         the original is 809KB.
>
>         The deployment failed over the expansion of the archive, so I
>         guess something did go wrong here.
>
>         I'm not sure how to use the ant task, as this is a Netbeans project.
>
>         Any ideas?
>
>         Michael
>
>         On Mon, Sep 14, 2009 at 11:25 PM, Tom Ware <tom.ware@...
>         <mailto:tom.ware@...> <mailto:tom.ware@...
>         <mailto:tom.ware@...>>> wrote:
>
>            Hi Michael,
>
>             I am not sure if there are any issues with the way GlassFish
>            handles this, but I can try to help you from an EclipseLink
>         point of
>            view.
>
>             The first thing to do is to see if static weaving helps:
>
>          
>          http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_%28ELUG%29#How_to_Configure_Static_Weaving_for_JPA_Entities
>
>             This will help us to isolate whether you are seeing an issue
>            related to classloaders or an issue related to persistence unit
>            configuration.
>
>            -Tom
>
>            Michael Bar-Sinai wrote:
>
>                Hello All,
>
>                I develop a large JEE app, with eclipselink as the JPA
>         provider.
>                I switched from Toplink Essentials, where the application
>         had no
>                problem deploying; with eclipselink I get all kinds of Null
>                Pointer Exceptions when I deploy the app. The problem
>         seems to
>                boil down to three relationships between objects. When I make
>                them EAGER, the application deploys. When they're LAZY, it
>                doesn't. I followed this thread
>              
>          <http://www.nabble.com/OneToOne-Mapping-works-with-FetchType.EAGER-but-not-with-FetchType.LAZY--%3E-Exception-when-deploying-%28SGES-2.1%29-p21711849.html>,
>                but they did not come to any conclusions. I did find more
>         info
>                in the logs, though.
>
>
>                The setup:
>
>                (Please view in a fixed-width font such as Courier. Some
>         other
>                classes are omitted.)
>                                E +-------------------+ P
>                       +----------|EMailResourceBundle|---------------+
>                      *|P       1 +-------------------+ *             |
>                +-------------+      ^1                                |L1
>                |EMailResource|      |                           L1
>                +------------------+
>                +-------------+      |               +--------------|    
>                             |
>                                    |               |                    
>         |BeeriprintCustomer|
>                                    |               |              |    
>                             |
>                                    |              L|*                  
>          +------------------+
>                L Lazy               |   L +-------------+              P|*
>                E Eager              +-----|EMailTemplate|---------------+
>                P Problem -              * +-------------+L1
>                  Should be lazy,
>                  Works only when eager
>                1/* multiplicity
>
>                Whenever I turn any of the links marked "P" to LAZY, I get an
>                NPE while deploying. Here's a sample, where I turned the link
>                between EMailResource and EMailResourceBundle to LAZY:
>
>              
>          [#|2009-09-14T08:32:38.562+0300|CONFIG|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA.connection|_ThreadID=16;_ThreadName=Thread-639;|Connected:
>              
>          jdbc:sqlserver://localhost:1433;responseBuffering=full;encrypt=false;databaseName=eBIll;selectMethod=direct;trustServerCertificate=false;lastUpdateCount=true;
>                       User: glassfish
>                       Database: Microsoft SQL Server  Version: 9.00.3042
>                       Driver: Microsoft SQL Server 2005 JDBC Driver
>          Version:
>                1.2.2828.100|#]
>
>              
>          [#|2009-09-14T08:32:38.640+0300|SEVERE|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA|_ThreadID=16;_ThreadName=Thread-639;_RequestID=faa6e914-cf3b-4c99-a1ed-8f29f110e9f8;|
>                Local Exception Stack: Exception [EclipseLink-0] (Eclipse
>                Persistence Services - 1.1.2.v20090612-r4475):
>                org.eclipse.persistence.exceptions.IntegrityException
>                Descriptor Exceptions:
>                ---------------------------------------------------------
>
>                Exception [EclipseLink-60] (Eclipse Persistence Services -
>                1.1.2.v20090612-r4475):
>                org.eclipse.persistence.exceptions.DescriptorException
>                Exception Description: The method
>                [_persistence_setparentBundle_vh] or
>                [_persistence_getparentBundle_vh] is not defined in the
>         object
>                [il.co.beeriprint.ebill.email.templates.EMailResource].
>                Internal Exception: java.lang.NoSuchMethodException:
>              
>          il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
>                Mapping:
>              
>          org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
>                Descriptor:
>              
>          RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource
>                --> [DatabaseTable(EMAILRESOURCE)])
>
>                Runtime Exceptions:
>                ---------------------------------------------------------
>
>                java.lang.NullPointerException
>
>                       at
>              
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:477)
>                       at
>              
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
>                       at
>              
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
>                       at
>              
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
>                       at
>              
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
>                       at
>              
>          org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
>                       at
>              
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
>                       at
>              
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
>                       at
>              
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
>                       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)
>
>                Descriptor Exceptions:
>                ---------------------------------------------------------
>
>
>                Local Exception Stack: Exception [EclipseLink-60] (Eclipse
>                Persistence Services - 1.1.2.v20090612-r4475):
>                org.eclipse.persistence.exceptions.DescriptorException
>                Exception Description: The method
>                [_persistence_setparentBundle_vh] or
>                [_persistence_getparentBundle_vh] is not defined in the
>         object
>                [il.co.beeriprint.ebill.email.templates.EMailResource].
>                Internal Exception: java.lang.NoSuchMethodException:
>              
>          il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
>                Mapping:
>              
>          org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
>                Descriptor:
>              
>          RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource
>                --> [DatabaseTable(EMAILRESOURCE)])
>                       at
>              
>          org.eclipse.persistence.exceptions.DescriptorException.noSuchMethodWhileInitializingAttributesInMethodAccessor(DescriptorException.java:1143)
>                       at
>              
>          org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.initializeAttributes(MethodAttributeAccessor.java:151)
>                       at
>              
>          org.eclipse.persistence.mappings.DatabaseMapping.preInitialize(DatabaseMapping.java:1094)
>                       at
>              
>          org.eclipse.persistence.mappings.ForeignReferenceMapping.preInitialize(ForeignReferenceMapping.java:744)
>                       at
>              
>          org.eclipse.persistence.mappings.ObjectReferenceMapping.preInitialize(ObjectReferenceMapping.java:863)
>                       at
>              
>          org.eclipse.persistence.descriptors.ClassDescriptor.preInitialize(ClassDescriptor.java:3192)
>                       at
>              
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:429)
>                       at
>              
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
>                       at
>              
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
>                       at
>              
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
>                       at
>              
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
>                       at
>              
>          org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
>                       at
>              
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
>                       at
>              
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
>                       at
>              
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
>                       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)
>                Caused by: java.lang.NoSuchMethodException:
>              
>          il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
>                       at java.lang.Class.getDeclaredMethod(Class.java:1937)
>                       at
>              
>          org.eclipse.persistence.internal.security.PrivilegedAccessHelper.findMethod(PrivilegedAccessHelper.java:59)
>                       at
>              
>          org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getMethod(PrivilegedAccessHelper.java:226)
>                       at
>              
>          org.eclipse.persistence.internal.helper.Helper.getDeclaredMethod(Helper.java:965)
>                       at
>              
>          org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.initializeAttributes(MethodAttributeAccessor.java:144)
>                       ... 31 more
>
>                Runtime Exceptions:
>                ---------------------------------------------------------
>
>
>                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:1373)
>                       at
>              
>          org.eclipse.persistence.descriptors.ClassDescriptor.validateBeforeInitialization(ClassDescriptor.java:5123)
>                       at
>              
>          org.eclipse.persistence.descriptors.ClassDescriptor.preInitialize(ClassDescriptor.java:3198)
>                       at
>              
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:429)
>                       at
>              
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
>                       at
>              
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
>                       at
>              
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
>                       at
>              
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
>                       at
>              
>          org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
>                       at
>              
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
>                       at
>              
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
>                       at
>              
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
>                       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)
>                |#]
>
>              
>          [#|2009-09-14T08:32:38.640+0300|SEVERE|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA.ejb|_ThreadID=16;_ThreadName=Thread-639;_RequestID=faa6e914-cf3b-4c99-a1ed-8f29f110e9f8;|
>                Local Exception Stack: Exception [EclipseLink-0] (Eclipse
>                Persistence Services - 1.1.2.v20090612-r4475):
>                org.eclipse.persistence.exceptions.IntegrityException
>                Descriptor Exceptions:
>                ---------------------------------------------------------
>
>                Exception [EclipseLink-60] (Eclipse Persistence Services -
>                1.1.2.v20090612-r4475):
>                org.eclipse.persistence.exceptions.DescriptorException
>                Exception Description: The method
>                [_persistence_setparentBundle_vh] or
>                [_persistence_getparentBundle_vh] is not defined in the
>         object
>                [il.co.beeriprint.ebill.email.templates.EMailResource].
>                Internal Exception: java.lang.NoSuchMethodException:
>              
>          il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
>                Mapping:
>              
>          org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
>                Descriptor:
>              
>          RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource
>                --> [DatabaseTable(EMAILRESOURCE)])
>
>                Runtime Exceptions:
>                ---------------------------------------------------------
>
>                java.lang.NullPointerException
>
>                       at
>              
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:477)
>                       at
>              
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
>                       at
>              
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
>                       at
>              
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
>                       at
>              
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
>                       at
>              
>          org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
>                       at
>              
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
>                       at
>              
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
>                       at
>              
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
>                       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)
>
>
>                IMHO, this looks like eclipselink finds the classes before it
>                adds the _persistence_* methods, thus causing an NPE.
>
>                Setup:
>
>                   * Windows Server 2003R2
>                   * Sun GlassFish Enterprise Server v2.1 (9.1.1) (build
>         b60e-fcs)
>                   * Eclipse Persistence Services - 1.1.2.v20090612-r4475
>
>                Any solutions would be highly appreciated. I have all the
>         logs
>                and will be very willing to help solve this.
>
>                Thanks in advance,
>                Michael Bar-Sinai
>
>
>              
>          ------------------------------------------------------------------------
>                View this message in context: Can't deploy when using
>         LAZY, can
>                deply when using EAGER
>              
>          <http://www.nabble.com/Can%27t-deploy-when-using-LAZY%2C-can-deply-when-using-EAGER-tp25433376p25433376.html>
>                Sent from the EclipseLink - Users mailing list archive
>                <http://www.nabble.com/EclipseLink---Users-f26658.html> at
>                Nabble.com.
>
>
>              
>          ------------------------------------------------------------------------
>
>                _______________________________________________
>                eclipselink-users mailing list
>                eclipselink-users@...
>         <mailto:eclipselink-users@...>
>         <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>>
>
>                https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>            _______________________________________________
>            eclipselink-users mailing list
>            eclipselink-users@...
>         <mailto:eclipselink-users@...>
>         <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>>
>
>            https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>
>
>         ------------------------------------------------------------------------
>
>         _______________________________________________
>         eclipselink-users mailing list
>         eclipselink-users@... <mailto:eclipselink-users@...>
>         https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>     _______________________________________________
>     eclipselink-users mailing list
>     eclipselink-users@... <mailto:eclipselink-users@...>
>     https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@...
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Re: Can't deploy when using LAZY, can deply when using EAGER

by Michael Bar-Sinai :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Tom,
The persistence unit holds about 20 classes, and is quite dynamic at the moment.

The ejb file is corrupt. For example, the top-level dir looks like this:
il (dir, base package)
META-INF (dir)
eBill-Common.jar (75K, the original is 275K)
META-INF (file, size = 0)

I'll see if I can get anything new by using FINEST.

Michael


On Wed, Sep 16, 2009 at 4:17 PM, Tom Ware <tom.ware@...> wrote:
Hi Michael,

 The only thing you can do to make things more verbose to to increase the logging level to FINEST.

 How big is your persistence unit?  How difficult would it be to actually list the classes in your persistence.xml rather than use <exclude-unlisted-classes>false</exclude-unlisted-classes>?

 What is missing from your weaved jar?  (You say it is about half the size of your unweaved jar.)  Are the missing classes part of your persistence unit, or they among the "other classes" you mention below?  If they are from the persistence unit, can you provide an example of one of the classes that is missing?

 Another thing to try is to see if running the weaver against a persistence.xml that contains only one of your persistence units makes any difference.


-Tom

Michael Bar-sinai wrote:
Hi Tom,

The typo is only in the command I posted here... I actually renamed that jar to have a shorter name.
eBill-Ejb.jar has the domain classes and the META-INF/persistence.xml file, as well as other classes. Is it possible that the static weaver fails like the one in the application server? It there any -verbose flag I can use?

The contents of persistence.xml follows:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="eBill-PU-JTA" transaction-type="JTA">
<description>
Normal use PU - used in most EJB actions.
</description>
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>jdbc/eBill</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
     <!--
-->
<property name="eclipselink.ddl-generation" value="create-tables"/>
<property name="eclipselink.logging.level" value="FINE"/>
<property name="eclipselink.jdbc.native-sql" value="true"/>
<property name="eclipselink.target-server" value="SunAS9"/>
<property name="eclipselink.target-database" value="SQLServer"/>
<property name="eclipselink.weaving" value="static" />
</properties>
</persistence-unit>
<persistence-unit name="eBill-PU-RL" transaction-type="RESOURCE_LOCAL">
<description>
Used for when we need to do fine-grained TXN control, e.g. when doing mass deletion.
</description>
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<non-jta-data-source>jdbc/eBill</non-jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="toplink.target-database" value="SQLServer"/>
<property name="eclipselink.target-server" value="SunAS9"/>
</properties>
</persistence-unit>
</persistence>

Thanks,
Michael


On Tue, Sep 15, 2009 at 6:12 PM, Tom Ware <tom.ware@... <mailto:tom.ware@...>> wrote:

   Hi Michael,

    I see a typo in your command line: it should be javax.persistence
   (not avax.persistence)

    What is the contents of your eBill-ejb.jar?
    META-INF/persistence.xml? your domain classes?  Anything else?

   -Tom

   Michael Bar-sinai wrote:

       Hi Tom,
       Thanks for your reply. I tried static weaving using the
       following command (I had to improvise a bit, as the command in
       the wiki does not really run as is  )

       % java -cp
       eclipselink.jar;avax.persistence_1.0.0.v200905011740.jar
       org.eclipse.persistence.tools.weaving.jpa.StaticWeave
       -persistenceinfo eBill-ejb.jar -classpath eBill-ejb.jar
       eBill-ejb.jar eBill-ejb-w.jar

       I did not get any errors, but the weaved ejb is  394KB, while
       the original is 809KB.

       The deployment failed over the expansion of the archive, so I
       guess something did go wrong here.

       I'm not sure how to use the ant task, as this is a Netbeans project.

       Any ideas?

       Michael

       On Mon, Sep 14, 2009 at 11:25 PM, Tom Ware <tom.ware@...
       <mailto:tom.ware@...> <mailto:tom.ware@...

       <mailto:tom.ware@...>>> wrote:

          Hi Michael,

           I am not sure if there are any issues with the way GlassFish
          handles this, but I can try to help you from an EclipseLink
       point of
          view.

           The first thing to do is to see if static weaving helps:

                http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_%28ELUG%29#How_to_Configure_Static_Weaving_for_JPA_Entities

           This will help us to isolate whether you are seeing an issue
          related to classloaders or an issue related to persistence unit
          configuration.

          -Tom

          Michael Bar-Sinai wrote:

              Hello All,

              I develop a large JEE app, with eclipselink as the JPA
       provider.
              I switched from Toplink Essentials, where the application
       had no
              problem deploying; with eclipselink I get all kinds of Null
              Pointer Exceptions when I deploy the app. The problem
       seems to
              boil down to three relationships between objects. When I make
              them EAGER, the application deploys. When they're LAZY, it
              doesn't. I followed this thread
                    <http://www.nabble.com/OneToOne-Mapping-works-with-FetchType.EAGER-but-not-with-FetchType.LAZY--%3E-Exception-when-deploying-%28SGES-2.1%29-p21711849.html>,
              but they did not come to any conclusions. I did find more
       info
              in the logs, though.


              The setup:

              (Please view in a fixed-width font such as Courier. Some
       other
              classes are omitted.)
                              E +-------------------+ P
                     +----------|EMailResourceBundle|---------------+
                    *|P       1 +-------------------+ *             |
              +-------------+      ^1                                |L1
              |EMailResource|      |                           L1
              +------------------+
              +-------------+      |               +--------------|                                |
                                  |               |                            |BeeriprintCustomer|
                                  |               |              |                                |
                                  |              L|*                           +------------------+
              L Lazy               |   L +-------------+              P|*
              E Eager              +-----|EMailTemplate|---------------+
              P Problem -              * +-------------+L1
                Should be lazy,
                Works only when eager
              1/* multiplicity

              Whenever I turn any of the links marked "P" to LAZY, I get an
              NPE while deploying. Here's a sample, where I turned the link
              between EMailResource and EMailResourceBundle to LAZY:

                    [#|2009-09-14T08:32:38.562+0300|CONFIG|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA.connection|_ThreadID=16;_ThreadName=Thread-639;|Connected:
                    jdbc:sqlserver://localhost:1433;responseBuffering=full;encrypt=false;databaseName=eBIll;selectMethod=direct;trustServerCertificate=false;lastUpdateCount=true;
                     User: glassfish
                     Database: Microsoft SQL Server  Version: 9.00.3042
                     Driver: Microsoft SQL Server 2005 JDBC Driver
        Version:
              1.2.2828.100|#]

                    [#|2009-09-14T08:32:38.640+0300|SEVERE|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA|_ThreadID=16;_ThreadName=Thread-639;_RequestID=faa6e914-cf3b-4c99-a1ed-8f29f110e9f8;|
              Local Exception Stack: Exception [EclipseLink-0] (Eclipse
              Persistence Services - 1.1.2.v20090612-r4475):
              org.eclipse.persistence.exceptions.IntegrityException
              Descriptor Exceptions:
              ---------------------------------------------------------

              Exception [EclipseLink-60] (Eclipse Persistence Services -
              1.1.2.v20090612-r4475):
              org.eclipse.persistence.exceptions.DescriptorException
              Exception Description: The method
              [_persistence_setparentBundle_vh] or
              [_persistence_getparentBundle_vh] is not defined in the
       object
              [il.co.beeriprint.ebill.email.templates.EMailResource].
              Internal Exception: java.lang.NoSuchMethodException:
                    il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
              Mapping:
                    org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
              Descriptor:
                    RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource
              --> [DatabaseTable(EMAILRESOURCE)])

              Runtime Exceptions:
              ---------------------------------------------------------

              java.lang.NullPointerException

                     at
                    org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:477)
                     at
                    org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
                     at
                    org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
                     at
                    org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
                     at
                    org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
                     at
                    org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
                     at
                    org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
                     at
                    org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
                     at
                    org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
                     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)

              Descriptor Exceptions:
              ---------------------------------------------------------


              Local Exception Stack: Exception [EclipseLink-60] (Eclipse
              Persistence Services - 1.1.2.v20090612-r4475):
              org.eclipse.persistence.exceptions.DescriptorException
              Exception Description: The method
              [_persistence_setparentBundle_vh] or
              [_persistence_getparentBundle_vh] is not defined in the
       object
              [il.co.beeriprint.ebill.email.templates.EMailResource].
              Internal Exception: java.lang.NoSuchMethodException:
                    il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
              Mapping:
                    org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
              Descriptor:
                    RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource
              --> [DatabaseTable(EMAILRESOURCE)])
                     at
                    org.eclipse.persistence.exceptions.DescriptorException.noSuchMethodWhileInitializingAttributesInMethodAccessor(DescriptorException.java:1143)
                     at
                    org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.initializeAttributes(MethodAttributeAccessor.java:151)
                     at
                    org.eclipse.persistence.mappings.DatabaseMapping.preInitialize(DatabaseMapping.java:1094)
                     at
                    org.eclipse.persistence.mappings.ForeignReferenceMapping.preInitialize(ForeignReferenceMapping.java:744)
                     at
                    org.eclipse.persistence.mappings.ObjectReferenceMapping.preInitialize(ObjectReferenceMapping.java:863)
                     at
                    org.eclipse.persistence.descriptors.ClassDescriptor.preInitialize(ClassDescriptor.java:3192)
                     at
                    org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:429)
                     at
                    org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
                     at
                    org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
                     at
                    org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
                     at
                    org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
                     at
                    org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
                     at
                    org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
                     at
                    org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
                     at
                    org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
                     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)
              Caused by: java.lang.NoSuchMethodException:
                    il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
                     at java.lang.Class.getDeclaredMethod(Class.java:1937)
                     at
                    org.eclipse.persistence.internal.security.PrivilegedAccessHelper.findMethod(PrivilegedAccessHelper.java:59)
                     at
                    org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getMethod(PrivilegedAccessHelper.java:226)
                     at
                    org.eclipse.persistence.internal.helper.Helper.getDeclaredMethod(Helper.java:965)
                     at
                    org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.initializeAttributes(MethodAttributeAccessor.java:144)
                     ... 31 more

              Runtime Exceptions:
              ---------------------------------------------------------


              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:1373)
                     at
                    org.eclipse.persistence.descriptors.ClassDescriptor.validateBeforeInitialization(ClassDescriptor.java:5123)
                     at
                    org.eclipse.persistence.descriptors.ClassDescriptor.preInitialize(ClassDescriptor.java:3198)
                     at
                    org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:429)
                     at
                    org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
                     at
                    org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
                     at
                    org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
                     at
                    org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
                     at
                    org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
                     at
                    org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
                     at
                    org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
                     at
                    org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
                     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)
              |#]

                    [#|2009-09-14T08:32:38.640+0300|SEVERE|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA.ejb|_ThreadID=16;_ThreadName=Thread-639;_RequestID=faa6e914-cf3b-4c99-a1ed-8f29f110e9f8;|
              Local Exception Stack: Exception [EclipseLink-0] (Eclipse
              Persistence Services - 1.1.2.v20090612-r4475):
              org.eclipse.persistence.exceptions.IntegrityException
              Descriptor Exceptions:
              ---------------------------------------------------------

              Exception [EclipseLink-60] (Eclipse Persistence Services -
              1.1.2.v20090612-r4475):
              org.eclipse.persistence.exceptions.DescriptorException
              Exception Description: The method
              [_persistence_setparentBundle_vh] or
              [_persistence_getparentBundle_vh] is not defined in the
       object
              [il.co.beeriprint.ebill.email.templates.EMailResource].
              Internal Exception: java.lang.NoSuchMethodException:
                    il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
              Mapping:
                    org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
              Descriptor:
                    RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource
              --> [DatabaseTable(EMAILRESOURCE)])

              Runtime Exceptions:
              ---------------------------------------------------------

              java.lang.NullPointerException

                     at
                    org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:477)
                     at
                    org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
                     at
                    org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
                     at
                    org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
                     at
                    org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
                     at
                    org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
                     at
                    org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
                     at
                    org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
                     at
                    org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
                     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)


              IMHO, this looks like eclipselink finds the classes before it
              adds the _persistence_* methods, thus causing an NPE.

              Setup:

                 * Windows Server 2003R2
                 * Sun GlassFish Enterprise Server v2.1 (9.1.1) (build
       b60e-fcs)
                 * Eclipse Persistence Services - 1.1.2.v20090612-r4475

              Any solutions would be highly appreciated. I have all the
       logs
              and will be very willing to help solve this.

              Thanks in advance,
              Michael Bar-Sinai


                    ------------------------------------------------------------------------
              View this message in context: Can't deploy when using
       LAZY, can
              deply when using EAGER
                    <http://www.nabble.com/Can%27t-deploy-when-using-LAZY%2C-can-deply-when-using-EAGER-tp25433376p25433376.html>
              Sent from the EclipseLink - Users mailing list archive
              <http://www.nabble.com/EclipseLink---Users-f26658.html> at
              Nabble.com.


                    ------------------------------------------------------------------------

              _______________________________________________
              eclipselink-users mailing list
              eclipselink-users@...
       <mailto:eclipselink-users@...>
       <mailto:eclipselink-users@...
       <mailto:eclipselink-users@...>>

              https://dev.eclipse.org/mailman/listinfo/eclipselink-users

          _______________________________________________
          eclipselink-users mailing list
          eclipselink-users@...
       <mailto:eclipselink-users@...>
       <mailto:eclipselink-users@...
       <mailto:eclipselink-users@...>>

          https://dev.eclipse.org/mailman/listinfo/eclipselink-users



       ------------------------------------------------------------------------

       _______________________________________________
       eclipselink-users mailing list
       eclipselink-users@... <mailto:eclipselink-users@...>
       https://dev.eclipse.org/mailman/listinfo/eclipselink-users

   _______________________________________________
   eclipselink-users mailing list
   eclipselink-users@... <mailto:eclipselink-users@...>
   https://dev.eclipse.org/mailman/listinfo/eclipselink-users



------------------------------------------------------------------------

_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Re: Can't deploy when using LAZY, can deply when using EAGER

by tware :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Michael,

   The static weaving processor will not handle nested jar files.  You may have
to do a slight reconfiguration to have weaving work.  Try pulling the nested jar
files out and ensuring they are listed in the classpath argument provided to the
static weaver.

-Tom

Michael Bar-sinai wrote:

> Hi Tom,
> The persistence unit holds about 20 classes, and is quite dynamic at the
> moment.
>
> The ejb file is corrupt. For example, the top-level dir looks like this:
> il (dir, base package)
> META-INF (dir)
> eBill-Common.jar (75K, the original is 275K)
> META-INF (file, size = 0)
>
> I'll see if I can get anything new by using FINEST.
>
> Michael
>
>
> On Wed, Sep 16, 2009 at 4:17 PM, Tom Ware <tom.ware@...
> <mailto:tom.ware@...>> wrote:
>
>     Hi Michael,
>
>      The only thing you can do to make things more verbose to to
>     increase the logging level to FINEST.
>
>      How big is your persistence unit?  How difficult would it be to
>     actually list the classes in your persistence.xml rather than use
>     <exclude-unlisted-classes>false</exclude-unlisted-classes>?
>
>      What is missing from your weaved jar?  (You say it is about half
>     the size of your unweaved jar.)  Are the missing classes part of
>     your persistence unit, or they among the "other classes" you mention
>     below?  If they are from the persistence unit, can you provide an
>     example of one of the classes that is missing?
>
>      Another thing to try is to see if running the weaver against a
>     persistence.xml that contains only one of your persistence units
>     makes any difference.
>
>
>     -Tom
>
>     Michael Bar-sinai wrote:
>
>         Hi Tom,
>
>         The typo is only in the command I posted here... I actually
>         renamed that jar to have a shorter name.
>         eBill-Ejb.jar has the domain classes and the
>         META-INF/persistence.xml file, as well as other classes. Is it
>         possible that the static weaver fails like the one in the
>         application server? It there any -verbose flag I can use?
>
>         The contents of persistence.xml follows:
>         <?xml version="1.0" encoding="UTF-8"?>
>         <persistence version="1.0"
>         xmlns="http://java.sun.com/xml/ns/persistence"
>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>         xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
>         http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
>         <persistence-unit name="eBill-PU-JTA" transaction-type="JTA">
>         <description>
>         Normal use PU - used in most EJB actions.
>         </description>
>         <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
>         <jta-data-source>jdbc/eBill</jta-data-source>
>         <exclude-unlisted-classes>false</exclude-unlisted-classes>
>         <properties>
>              <!--
>         -->
>         <property name="eclipselink.ddl-generation" value="create-tables"/>
>         <property name="eclipselink.logging.level" value="FINE"/>
>         <property name="eclipselink.jdbc.native-sql" value="true"/>
>         <property name="eclipselink.target-server" value="SunAS9"/>
>         <property name="eclipselink.target-database" value="SQLServer"/>
>         <property name="eclipselink.weaving" value="static" />
>         </properties>
>         </persistence-unit>
>         <persistence-unit name="eBill-PU-RL"
>         transaction-type="RESOURCE_LOCAL">
>         <description>
>         Used for when we need to do fine-grained TXN control, e.g. when
>         doing mass deletion.
>         </description>
>         <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
>         <non-jta-data-source>jdbc/eBill</non-jta-data-source>
>         <exclude-unlisted-classes>false</exclude-unlisted-classes>
>         <properties>
>         <property name="toplink.target-database" value="SQLServer"/>
>         <property name="eclipselink.target-server" value="SunAS9"/>
>         </properties>
>         </persistence-unit>
>         </persistence>
>
>         Thanks,
>         Michael
>
>
>         On Tue, Sep 15, 2009 at 6:12 PM, Tom Ware <tom.ware@...
>         <mailto:tom.ware@...> <mailto:tom.ware@...
>         <mailto:tom.ware@...>>> wrote:
>
>            Hi Michael,
>
>             I see a typo in your command line: it should be
>         javax.persistence
>            (not avax.persistence)
>
>             What is the contents of your eBill-ejb.jar?
>             META-INF/persistence.xml? your domain classes?  Anything else?
>
>            -Tom
>
>            Michael Bar-sinai wrote:
>
>                Hi Tom,
>                Thanks for your reply. I tried static weaving using the
>                following command (I had to improvise a bit, as the
>         command in
>                the wiki does not really run as is  )
>
>                % java -cp
>                eclipselink.jar;avax.persistence_1.0.0.v200905011740.jar
>                org.eclipse.persistence.tools.weaving.jpa.StaticWeave
>                -persistenceinfo eBill-ejb.jar -classpath eBill-ejb.jar
>                eBill-ejb.jar eBill-ejb-w.jar
>
>                I did not get any errors, but the weaved ejb is  394KB, while
>                the original is 809KB.
>
>                The deployment failed over the expansion of the archive, so I
>                guess something did go wrong here.
>
>                I'm not sure how to use the ant task, as this is a
>         Netbeans project.
>
>                Any ideas?
>
>                Michael
>
>                On Mon, Sep 14, 2009 at 11:25 PM, Tom Ware
>         <tom.ware@... <mailto:tom.ware@...>
>                <mailto:tom.ware@... <mailto:tom.ware@...>>
>         <mailto:tom.ware@... <mailto:tom.ware@...>
>
>                <mailto:tom.ware@...
>         <mailto:tom.ware@...>>>> wrote:
>
>                   Hi Michael,
>
>                    I am not sure if there are any issues with the way
>         GlassFish
>                   handles this, but I can try to help you from an
>         EclipseLink
>                point of
>                   view.
>
>                    The first thing to do is to see if static weaving helps:
>
>                        
>         http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_%28ELUG%29#How_to_Configure_Static_Weaving_for_JPA_Entities
>
>                    This will help us to isolate whether you are seeing
>         an issue
>                   related to classloaders or an issue related to
>         persistence unit
>                   configuration.
>
>                   -Tom
>
>                   Michael Bar-Sinai wrote:
>
>                       Hello All,
>
>                       I develop a large JEE app, with eclipselink as the JPA
>                provider.
>                       I switched from Toplink Essentials, where the
>         application
>                had no
>                       problem deploying; with eclipselink I get all
>         kinds of Null
>                       Pointer Exceptions when I deploy the app. The problem
>                seems to
>                       boil down to three relationships between objects.
>         When I make
>                       them EAGER, the application deploys. When they're
>         LAZY, it
>                       doesn't. I followed this thread
>                            
>         <http://www.nabble.com/OneToOne-Mapping-works-with-FetchType.EAGER-but-not-with-FetchType.LAZY--%3E-Exception-when-deploying-%28SGES-2.1%29-p21711849.html>,
>                       but they did not come to any conclusions. I did
>         find more
>                info
>                       in the logs, though.
>
>
>                       The setup:
>
>                       (Please view in a fixed-width font such as
>         Courier. Some
>                other
>                       classes are omitted.)
>                                       E +-------------------+ P
>                            
>          +----------|EMailResourceBundle|---------------+
>                             *|P       1 +-------------------+ *        
>             |
>                       +-------------+      ^1                          
>              |L1
>                       |EMailResource|      |                           L1
>                       +------------------+
>                       +-------------+      |              
>         +--------------|                                |
>                                           |               |            
>                        |BeeriprintCustomer|
>                                           |               |            
>          |                                |
>                                           |              L|*            
>                       +------------------+
>                       L Lazy               |   L +-------------+        
>              P|*
>                       E Eager            
>          +-----|EMailTemplate|---------------+
>                       P Problem -              * +-------------+L1
>                         Should be lazy,
>                         Works only when eager
>                       1/* multiplicity
>
>                       Whenever I turn any of the links marked "P" to
>         LAZY, I get an
>                       NPE while deploying. Here's a sample, where I
>         turned the link
>                       between EMailResource and EMailResourceBundle to LAZY:
>
>                            
>         [#|2009-09-14T08:32:38.562+0300|CONFIG|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA.connection|_ThreadID=16;_ThreadName=Thread-639;|Connected:
>                            
>         jdbc:sqlserver://localhost:1433;responseBuffering=full;encrypt=false;databaseName=eBIll;selectMethod=direct;trustServerCertificate=false;lastUpdateCount=true;
>                              User: glassfish
>                              Database: Microsoft SQL Server  Version:
>         9.00.3042
>                              Driver: Microsoft SQL Server 2005 JDBC Driver
>                 Version:
>                       1.2.2828.100|#]
>
>                            
>         [#|2009-09-14T08:32:38.640+0300|SEVERE|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA|_ThreadID=16;_ThreadName=Thread-639;_RequestID=faa6e914-cf3b-4c99-a1ed-8f29f110e9f8;|
>                       Local Exception Stack: Exception [EclipseLink-0]
>         (Eclipse
>                       Persistence Services - 1.1.2.v20090612-r4475):
>                       org.eclipse.persistence.exceptions.IntegrityException
>                       Descriptor Exceptions:
>                      
>         ---------------------------------------------------------
>
>                       Exception [EclipseLink-60] (Eclipse Persistence
>         Services -
>                       1.1.2.v20090612-r4475):
>                       org.eclipse.persistence.exceptions.DescriptorException
>                       Exception Description: The method
>                       [_persistence_setparentBundle_vh] or
>                       [_persistence_getparentBundle_vh] is not defined
>         in the
>                object
>                      
>         [il.co.beeriprint.ebill.email.templates.EMailResource].
>                       Internal Exception: java.lang.NoSuchMethodException:
>                            
>         il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
>                       Mapping:
>                            
>         org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
>                       Descriptor:
>                            
>         RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource
>                       --> [DatabaseTable(EMAILRESOURCE)])
>
>                       Runtime Exceptions:
>                      
>         ---------------------------------------------------------
>
>                       java.lang.NullPointerException
>
>                              at
>                            
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:477)
>                              at
>                            
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
>                              at
>                            
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
>                              at
>                            
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
>                              at
>                            
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
>                              at
>                            
>         org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
>                              at
>                            
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
>                              at
>                            
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
>                              at
>                            
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
>                              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)
>
>                       Descriptor Exceptions:
>                      
>         ---------------------------------------------------------
>
>
>                       Local Exception Stack: Exception [EclipseLink-60]
>         (Eclipse
>                       Persistence Services - 1.1.2.v20090612-r4475):
>                       org.eclipse.persistence.exceptions.DescriptorException
>                       Exception Description: The method
>                       [_persistence_setparentBundle_vh] or
>                       [_persistence_getparentBundle_vh] is not defined
>         in the
>                object
>                      
>         [il.co.beeriprint.ebill.email.templates.EMailResource].
>                       Internal Exception: java.lang.NoSuchMethodException:
>                            
>         il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
>                       Mapping:
>                            
>         org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
>                       Descriptor:
>                            
>         RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource
>                       --> [DatabaseTable(EMAILRESOURCE)])
>                              at
>                            
>         org.eclipse.persistence.exceptions.DescriptorException.noSuchMethodWhileInitializingAttributesInMethodAccessor(DescriptorException.java:1143)
>                              at
>                            
>         org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.initializeAttributes(MethodAttributeAccessor.java:151)
>                              at
>                            
>         org.eclipse.persistence.mappings.DatabaseMapping.preInitialize(DatabaseMapping.java:1094)
>                              at
>                            
>         org.eclipse.persistence.mappings.ForeignReferenceMapping.preInitialize(ForeignReferenceMapping.java:744)
>                              at
>                            
>         org.eclipse.persistence.mappings.ObjectReferenceMapping.preInitialize(ObjectReferenceMapping.java:863)
>                              at
>                            
>         org.eclipse.persistence.descriptors.ClassDescriptor.preInitialize(ClassDescriptor.java:3192)
>                              at
>                            
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:429)
>                              at
>                            
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
>                              at
>                            
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
>                              at
>                            
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
>                              at
>                            
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
>                              at
>                            
>         org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
>                              at
>                            
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
>                              at
>                            
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
>                              at
>                            
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
>                              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)
>                       Caused by: java.lang.NoSuchMethodException:
>                            
>         il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
>                              at
>         java.lang.Class.getDeclaredMethod(Class.java:1937)
>                              at
>                            
>         org.eclipse.persistence.internal.security.PrivilegedAccessHelper.findMethod(PrivilegedAccessHelper.java:59)
>                              at
>                            
>         org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getMethod(PrivilegedAccessHelper.java:226)
>                              at
>                            
>         org.eclipse.persistence.internal.helper.Helper.getDeclaredMethod(Helper.java:965)
>                              at
>                            
>         org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.initializeAttributes(MethodAttributeAccessor.java:144)
>                              ... 31 more
>
>                       Runtime Exceptions:
>                      
>         ---------------------------------------------------------
>
>
>                       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:1373)
>                              at
>                            
>         org.eclipse.persistence.descriptors.ClassDescriptor.validateBeforeInitialization(ClassDescriptor.java:5123)
>                              at
>                            
>         org.eclipse.persistence.descriptors.ClassDescriptor.preInitialize(ClassDescriptor.java:3198)
>                              at
>                            
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:429)
>                              at
>                            
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
>                              at
>                            
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
>                              at
>                            
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
>                              at
>                            
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
>                              at
>                            
>         org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
>                              at
>                            
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
>                              at
>                            
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
>                              at
>                            
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
>                              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)
>                       |#]
>
>                            
>         [#|2009-09-14T08:32:38.640+0300|SEVERE|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA.ejb|_ThreadID=16;_ThreadName=Thread-639;_RequestID=faa6e914-cf3b-4c99-a1ed-8f29f110e9f8;|
>                       Local Exception Stack: Exception [EclipseLink-0]
>         (Eclipse
>                       Persistence Services - 1.1.2.v20090612-r4475):
>                       org.eclipse.persistence.exceptions.IntegrityException
>                       Descriptor Exceptions:
>                      
>         ---------------------------------------------------------
>
>                       Exception [EclipseLink-60] (Eclipse Persistence
>         Services -
>                       1.1.2.v20090612-r4475):
>                       org.eclipse.persistence.exceptions.DescriptorException
>                       Exception Description: The method
>                       [_persistence_setparentBundle_vh] or
>                       [_persistence_getparentBundle_vh] is not defined
>         in the
>                object
>                      
>         [il.co.beeriprint.ebill.email.templates.EMailResource].
>                       Internal Exception: java.lang.NoSuchMethodException:
>                            
>         il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
>                       Mapping:
>                            
>         org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
>                       Descriptor:
>                            
>         RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource
>                       --> [DatabaseTable(EMAILRESOURCE)])
>
>                       Runtime Exceptions:
>                      
>         ---------------------------------------------------------
>
>                       java.lang.NullPointerException
>
>                              at
>                            
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:477)
>                              at
>                            
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
>                              at
>                            
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
>                              at
>                            
>         org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
>                              at
>                            
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
>                              at
>                            
>         org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
>                              at
>                            
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
>                              at
>                            
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
>                              at
>                            
>         org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
>                              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)
>
>
>                       IMHO, this looks like eclipselink finds the
>         classes before it
>                       adds the _persistence_* methods, thus causing an NPE.
>
>                       Setup:
>
>                          * Windows Server 2003R2
>                          * Sun GlassFish Enterprise Server v2.1 (9.1.1)
>         (build
>                b60e-fcs)
>                          * Eclipse Persistence Services -
>         1.1.2.v20090612-r4475
>
>                       Any solutions would be highly appreciated. I have
>         all the
>                logs
>                       and will be very willing to help solve this.
>
>                       Thanks in advance,
>                       Michael Bar-Sinai
>
>
>                            
>         ------------------------------------------------------------------------
>                       View this message in context: Can't deploy when using
>                LAZY, can
>                       deply when using EAGER
>                            
>         <http://www.nabble.com/Can%27t-deploy-when-using-LAZY%2C-can-deply-when-using-EAGER-tp25433376p25433376.html>
>                       Sent from the EclipseLink - Users mailing list archive
>                      
>         <http://www.nabble.com/EclipseLink---Users-f26658.html> at
>                       Nabble.com.
>
>
>                            
>         ------------------------------------------------------------------------
>
>                       _______________________________________________
>                       eclipselink-users mailing list
>                       eclipselink-users@...
>         <mailto:eclipselink-users@...>
>                <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>>
>                <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>
>                <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>>>
>
>                      
>         https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>                   _______________________________________________
>                   eclipselink-users mailing list
>                   eclipselink-users@...
>         <mailto:eclipselink-users@...>
>                <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>>
>                <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>
>                <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>>>
>
>                   https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>
>
>              
>          ------------------------------------------------------------------------
>
>                _______________________________________________
>                eclipselink-users mailing list
>                eclipselink-users@...
>         <mailto:eclipselink-users@...>
>         <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>>
>                https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>            _______________________________________________
>            eclipselink-users mailing list
>            eclipselink-users@...
>         <mailto:eclipselink-users@...>
>         <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>>
>            https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>
>
>         ------------------------------------------------------------------------
>
>         _______________________________________________
>         eclipselink-users mailing list
>         eclipselink-users@... <mailto:eclipselink-users@...>
>         https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>     _______________________________________________
>     eclipselink-users mailing list
>     eclipselink-users@... <mailto:eclipselink-users@...>
>     https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@...
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Re: Can't deploy when using LAZY, can deply when using EAGER

by Michael Bar-Sinai :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Tom,
Thanks for the continuing support. I've decided to take a different approach to this problem, trying to re-create it on a small-scale project that could be sent around.
For no avail - I have the exact object graph and it deploys with no problem to the same server.
This led me to think that there might be a memory issue somewhere, as the original project is quite big. I ran the static weaver with -Xmx1200m, but got the same results.

I posted a full listing of the weaved and non-weaved jars here:
http://rapidshare.com/files/282906389/jar-reports.zip.html
Please see if you can make any sense of it. In winRar, folders which have files also have an empty file with an empty name. Folders that contain only folders (e.g. package il.co) do not have this problem.

Michael

On Thu, Sep 17, 2009 at 4:16 PM, Tom Ware <tom.ware@...> wrote:
Hi Michael,

 The static weaving processor will not handle nested jar files.  You may have to do a slight reconfiguration to have weaving work.  Try pulling the nested jar files out and ensuring they are listed in the classpath argument provided to the static weaver.


-Tom

Michael Bar-sinai wrote:
Hi Tom,

The persistence unit holds about 20 classes, and is quite dynamic at the moment.

The ejb file is corrupt. For example, the top-level dir looks like this:
il (dir, base package)
META-INF (dir)
eBill-Common.jar (75K, the original is 275K)
META-INF (file, size = 0)

I'll see if I can get anything new by using FINEST.

Michael


On Wed, Sep 16, 2009 at 4:17 PM, Tom Ware <tom.ware@... <mailto:tom.ware@...>> wrote:

   Hi Michael,

    The only thing you can do to make things more verbose to to
   increase the logging level to FINEST.

    How big is your persistence unit?  How difficult would it be to
   actually list the classes in your persistence.xml rather than use
   <exclude-unlisted-classes>false</exclude-unlisted-classes>?

    What is missing from your weaved jar?  (You say it is about half
   the size of your unweaved jar.)  Are the missing classes part of
   your persistence unit, or they among the "other classes" you mention
   below?  If they are from the persistence unit, can you provide an
   example of one of the classes that is missing?

    Another thing to try is to see if running the weaver against a
   persistence.xml that contains only one of your persistence units
   makes any difference.


   -Tom

   Michael Bar-sinai wrote:

       Hi Tom,

       The typo is only in the command I posted here... I actually
       renamed that jar to have a shorter name.
       eBill-Ejb.jar has the domain classes and the
       META-INF/persistence.xml file, as well as other classes. Is it
       possible that the static weaver fails like the one in the
       application server? It there any -verbose flag I can use?

       The contents of persistence.xml follows:
       <?xml version="1.0" encoding="UTF-8"?>
       <persistence version="1.0"
       xmlns="http://java.sun.com/xml/ns/persistence"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
       http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
       <persistence-unit name="eBill-PU-JTA" transaction-type="JTA">
       <description>
       Normal use PU - used in most EJB actions.
       </description>
       <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
       <jta-data-source>jdbc/eBill</jta-data-source>
       <exclude-unlisted-classes>false</exclude-unlisted-classes>
       <properties>
            <!--
       -->
       <property name="eclipselink.ddl-generation" value="create-tables"/>
       <property name="eclipselink.logging.level" value="FINE"/>
       <property name="eclipselink.jdbc.native-sql" value="true"/>
       <property name="eclipselink.target-server" value="SunAS9"/>
       <property name="eclipselink.target-database" value="SQLServer"/>
       <property name="eclipselink.weaving" value="static" />
       </properties>
       </persistence-unit>
       <persistence-unit name="eBill-PU-RL"
       transaction-type="RESOURCE_LOCAL">
       <description>
       Used for when we need to do fine-grained TXN control, e.g. when
       doing mass deletion.
       </description>
       <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
       <non-jta-data-source>jdbc/eBill</non-jta-data-source>
       <exclude-unlisted-classes>false</exclude-unlisted-classes>
       <properties>
       <property name="toplink.target-database" value="SQLServer"/>
       <property name="eclipselink.target-server" value="SunAS9"/>
       </properties>
       </persistence-unit>
       </persistence>

       Thanks,
       Michael


       On Tue, Sep 15, 2009 at 6:12 PM, Tom Ware <tom.ware@...
       <mailto:tom.ware@...> <mailto:tom.ware@...
       <mailto:tom.ware@...>>> wrote:

          Hi Michael,

           I see a typo in your command line: it should be
       javax.persistence
          (not avax.persistence)

           What is the contents of your eBill-ejb.jar?
           META-INF/persistence.xml? your domain classes?  Anything else?

          -Tom

          Michael Bar-sinai wrote:

              Hi Tom,
              Thanks for your reply. I tried static weaving using the
              following command (I had to improvise a bit, as the
       command in
              the wiki does not really run as is  )

              % java -cp
              eclipselink.jar;avax.persistence_1.0.0.v200905011740.jar
              org.eclipse.persistence.tools.weaving.jpa.StaticWeave
              -persistenceinfo eBill-ejb.jar -classpath eBill-ejb.jar
              eBill-ejb.jar eBill-ejb-w.jar

              I did not get any errors, but the weaved ejb is  394KB, while
              the original is 809KB.

              The deployment failed over the expansion of the archive, so I
              guess something did go wrong here.

              I'm not sure how to use the ant task, as this is a
       Netbeans project.

              Any ideas?

              Michael

              On Mon, Sep 14, 2009 at 11:25 PM, Tom Ware
       <tom.ware@... <mailto:tom.ware@...>
              <mailto:tom.ware@... <mailto:tom.ware@...>>
       <mailto:tom.ware@... <mailto:tom.ware@...>

              <mailto:tom.ware@...
       <mailto:tom.ware@...>>>> wrote:

                 Hi Michael,

                  I am not sure if there are any issues with the way
       GlassFish
                 handles this, but I can try to help you from an
       EclipseLink
              point of
                 view.

                  The first thing to do is to see if static weaving helps:

                             http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_%28ELUG%29#How_to_Configure_Static_Weaving_for_JPA_Entities

                  This will help us to isolate whether you are seeing
       an issue
                 related to classloaders or an issue related to
       persistence unit
                 configuration.

                 -Tom

                 Michael Bar-Sinai wrote:

                     Hello All,

                     I develop a large JEE app, with eclipselink as the JPA
              provider.
                     I switched from Toplink Essentials, where the
       application
              had no
                     problem deploying; with eclipselink I get all
       kinds of Null
                     Pointer Exceptions when I deploy the app. The problem
              seems to
                     boil down to three relationships between objects.
       When I make
                     them EAGER, the application deploys. When they're
       LAZY, it
                     doesn't. I followed this thread
                                 <http://www.nabble.com/OneToOne-Mapping-works-with-FetchType.EAGER-but-not-with-FetchType.LAZY--%3E-Exception-when-deploying-%28SGES-2.1%29-p21711849.html>,
                     but they did not come to any conclusions. I did
       find more
              info
                     in the logs, though.


                     The setup:

                     (Please view in a fixed-width font such as
       Courier. Some
              other
                     classes are omitted.)
                                     E +-------------------+ P
                                  +----------|EMailResourceBundle|---------------+
                           *|P       1 +-------------------+ *                    |
                     +-------------+      ^1                                       |L1
                     |EMailResource|      |                           L1
                     +------------------+
                     +-------------+      |                      +--------------|                                |
                                         |               |                                   |BeeriprintCustomer|
                                         |               |                     |                                |
                                         |              L|*                                  +------------------+
                     L Lazy               |   L +-------------+                     P|*
                     E Eager                     +-----|EMailTemplate|---------------+
                     P Problem -              * +-------------+L1
                       Should be lazy,
                       Works only when eager
                     1/* multiplicity

                     Whenever I turn any of the links marked "P" to
       LAZY, I get an
                     NPE while deploying. Here's a sample, where I
       turned the link
                     between EMailResource and EMailResourceBundle to LAZY:

                                 [#|2009-09-14T08:32:38.562+0300|CONFIG|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA.connection|_ThreadID=16;_ThreadName=Thread-639;|Connected:
                                 jdbc:sqlserver://localhost:1433;responseBuffering=full;encrypt=false;databaseName=eBIll;selectMethod=direct;trustServerCertificate=false;lastUpdateCount=true;
                            User: glassfish
                            Database: Microsoft SQL Server  Version:
       9.00.3042
                            Driver: Microsoft SQL Server 2005 JDBC Driver
               Version:
                     1.2.2828.100|#]

                                 [#|2009-09-14T08:32:38.640+0300|SEVERE|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA|_ThreadID=16;_ThreadName=Thread-639;_RequestID=faa6e914-cf3b-4c99-a1ed-8f29f110e9f8;|
                     Local Exception Stack: Exception [EclipseLink-0]
       (Eclipse
                     Persistence Services - 1.1.2.v20090612-r4475):
                     org.eclipse.persistence.exceptions.IntegrityException
                     Descriptor Exceptions:
                           ---------------------------------------------------------

                     Exception [EclipseLink-60] (Eclipse Persistence
       Services -
                     1.1.2.v20090612-r4475):
                     org.eclipse.persistence.exceptions.DescriptorException
                     Exception Description: The method
                     [_persistence_setparentBundle_vh] or
                     [_persistence_getparentBundle_vh] is not defined
       in the
              object
                           [il.co.beeriprint.ebill.email.templates.EMailResource].
                     Internal Exception: java.lang.NoSuchMethodException:
                                 il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
                     Mapping:
                                 org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
                     Descriptor:
                                 RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource
                     --> [DatabaseTable(EMAILRESOURCE)])

                     Runtime Exceptions:
                           ---------------------------------------------------------

                     java.lang.NullPointerException

                            at
                                 org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:477)
                            at
                                 org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
                            at
                                 org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
                            at
                                 org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
                            at
                                 org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
                            at
                                 org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
                            at
                                 org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
                            at
                                 org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
                            at
                                 org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
                            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)

                     Descriptor Exceptions:
                           ---------------------------------------------------------


                     Local Exception Stack: Exception [EclipseLink-60]
       (Eclipse
                     Persistence Services - 1.1.2.v20090612-r4475):
                     org.eclipse.persistence.exceptions.DescriptorException
                     Exception Description: The method
                     [_persistence_setparentBundle_vh] or
                     [_persistence_getparentBundle_vh] is not defined
       in the
              object
                           [il.co.beeriprint.ebill.email.templates.EMailResource].
                     Internal Exception: java.lang.NoSuchMethodException:
                                 il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
                     Mapping:
                                 org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
                     Descriptor:
                                 RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource
                     --> [DatabaseTable(EMAILRESOURCE)])
                            at
                                 org.eclipse.persistence.exceptions.DescriptorException.noSuchMethodWhileInitializingAttributesInMethodAccessor(DescriptorException.java:1143)
                            at
                                 org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.initializeAttributes(MethodAttributeAccessor.java:151)
                            at
                                 org.eclipse.persistence.mappings.DatabaseMapping.preInitialize(DatabaseMapping.java:1094)
                            at
                                 org.eclipse.persistence.mappings.ForeignReferenceMapping.preInitialize(ForeignReferenceMapping.java:744)
                            at
                                 org.eclipse.persistence.mappings.ObjectReferenceMapping.preInitialize(ObjectReferenceMapping.java:863)
                            at
                                 org.eclipse.persistence.descriptors.ClassDescriptor.preInitialize(ClassDescriptor.java:3192)
                            at
                                 org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:429)
                            at
                                 org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
                            at
                                 org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
                            at
                                 org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
                            at
                                 org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
                            at
                                 org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
                            at
                                 org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
                            at
                                 org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
                            at
                                 org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
                            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)
                     Caused by: java.lang.NoSuchMethodException:
                                 il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
                            at
       java.lang.Class.getDeclaredMethod(Class.java:1937)
                            at
                                 org.eclipse.persistence.internal.security.PrivilegedAccessHelper.findMethod(PrivilegedAccessHelper.java:59)
                            at
                                 org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getMethod(PrivilegedAccessHelper.java:226)
                            at
                                 org.eclipse.persistence.internal.helper.Helper.getDeclaredMethod(Helper.java:965)
                            at
                                 org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.initializeAttributes(MethodAttributeAccessor.java:144)
                            ... 31 more

                     Runtime Exceptions:
                           ---------------------------------------------------------


                     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:1373)
                            at
                                 org.eclipse.persistence.descriptors.ClassDescriptor.validateBeforeInitialization(ClassDescriptor.java:5123)
                            at
                                 org.eclipse.persistence.descriptors.ClassDescriptor.preInitialize(ClassDescriptor.java:3198)
                            at
                                 org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:429)
                            at
                                 org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
                            at
                                 org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
                            at
                                 org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
                            at
                                 org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
                            at
                                 org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
                            at
                                 org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
                            at
                                 org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
                            at
                                 org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
                            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)
                     |#]

                                 [#|2009-09-14T08:32:38.640+0300|SEVERE|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA.ejb|_ThreadID=16;_ThreadName=Thread-639;_RequestID=faa6e914-cf3b-4c99-a1ed-8f29f110e9f8;|
                     Local Exception Stack: Exception [EclipseLink-0]
       (Eclipse
                     Persistence Services - 1.1.2.v20090612-r4475):
                     org.eclipse.persistence.exceptions.IntegrityException
                     Descriptor Exceptions:
                           ---------------------------------------------------------

                     Exception [EclipseLink-60] (Eclipse Persistence
       Services -
                     1.1.2.v20090612-r4475):
                     org.eclipse.persistence.exceptions.DescriptorException
                     Exception Description: The method
                     [_persistence_setparentBundle_vh] or
                     [_persistence_getparentBundle_vh] is not defined
       in the
              object
                           [il.co.beeriprint.ebill.email.templates.EMailResource].
                     Internal Exception: java.lang.NoSuchMethodException:
                                 il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
                     Mapping:
                                 org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
                     Descriptor:
                                 RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource
                     --> [DatabaseTable(EMAILRESOURCE)])

                     Runtime Exceptions:
                           ---------------------------------------------------------

                     java.lang.NullPointerException

                            at
                                 org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:477)
                            at
                                 org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
                            at
                                 org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
                            at
                                 org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
                            at
                                 org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
                            at
                                 org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
                            at
                                 org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
                            at
                                 org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
                            at
                                 org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
                            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)


                     IMHO, this looks like eclipselink finds the
       classes before it
                     adds the _persistence_* methods, thus causing an NPE.

                     Setup:

                        * Windows Server 2003R2
                        * Sun GlassFish Enterprise Server v2.1 (9.1.1)
       (build
              b60e-fcs)
                        * Eclipse Persistence Services -
       1.1.2.v20090612-r4475

                     Any solutions would be highly appreciated. I have
       all the
              logs
                     and will be very willing to help solve this.

                     Thanks in advance,
                     Michael Bar-Sinai


                                 ------------------------------------------------------------------------
                     View this message in context: Can't deploy when using
              LAZY, can
                     deply when using EAGER
                                 <http://www.nabble.com/Can%27t-deploy-when-using-LAZY%2C-can-deply-when-using-EAGER-tp25433376p25433376.html>
                     Sent from the EclipseLink - Users mailing list archive
                           <http://www.nabble.com/EclipseLink---Users-f26658.html> at
                     Nabble.com.


                                 ------------------------------------------------------------------------

                     _______________________________________________
                     eclipselink-users mailing list
                     eclipselink-users@...
       <mailto:eclipselink-users@...>
              <mailto:eclipselink-users@...
       <mailto:eclipselink-users@...>>
              <mailto:eclipselink-users@...
       <mailto:eclipselink-users@...>
              <mailto:eclipselink-users@...
       <mailto:eclipselink-users@...>>>

                           https://dev.eclipse.org/mailman/listinfo/eclipselink-users

                 _______________________________________________
                 eclipselink-users mailing list
                 eclipselink-users@...
       <mailto:eclipselink-users@...>
              <mailto:eclipselink-users@...
       <mailto:eclipselink-users@...>>
              <mailto:eclipselink-users@...
       <mailto:eclipselink-users@...>
              <mailto:eclipselink-users@...
       <mailto:eclipselink-users@...>>>

                 https://dev.eclipse.org/mailman/listinfo/eclipselink-users



                    ------------------------------------------------------------------------

              _______________________________________________
              eclipselink-users mailing list
              eclipselink-users@...
       <mailto:eclipselink-users@...>
       <mailto:eclipselink-users@...
       <mailto:eclipselink-users@...>>
              https://dev.eclipse.org/mailman/listinfo/eclipselink-users

          _______________________________________________
          eclipselink-users mailing list
          eclipselink-users@...
       <mailto:eclipselink-users@...>
       <mailto:eclipselink-users@...
       <mailto:eclipselink-users@...>>
          https://dev.eclipse.org/mailman/listinfo/eclipselink-users



       ------------------------------------------------------------------------

       _______________________________________________
       eclipselink-users mailing list
       eclipselink-users@... <mailto:eclipselink-users@...>
       https://dev.eclipse.org/mailman/listinfo/eclipselink-users

   _______________________________________________
   eclipselink-users mailing list
   eclipselink-users@... <mailto:eclipselink-users@...>
   https://dev.eclipse.org/mailman/listinfo/eclipselink-users



------------------------------------------------------------------------

_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Re: Can't deploy when using LAZY, can deply when using EAGER

by tware :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Michael,

   I've taken a look at the report - I'm not sure what the numbers are between
the timestamps and the filenames.  I'm guessing something like actual size and
compressed size, but I am not sure.

   'not knowing which files are domain classes and which are other classes, it
is hard to tell exactly what is happening, but from what I can see, the quite a
number of the class files are bigger in the weaved jar - this is what I would
expect.

   As I mentioned below, I am not surprised we are not handling the nested jar
file (eBill-Common.jar).  The static weaver does not address that since it is a
JSE application and uses fairly simple constructs to process the jar.  To have
that jar used properly by the static weaver, you will have to remove it from the
original jar and instead put it on the classpath used by the static weaver.

   Aside from that, I can see no obvious problems.  You mention that file file
is corrupt.  What are the symptoms of the corruption (other than the issue with
the nested jar)?

   If you have a decompiler, you should be able to decompile the weaved classes.
  One way to tell if they have been weaved is to see if they now implement an
interface called PersistenceWeaved.

-Tom

Michael Bar-sinai wrote:

> Hello Tom,
> Thanks for the continuing support. I've decided to take a different
> approach to this problem, trying to re-create it on a small-scale
> project that could be sent around.
> For no avail - I have the exact object graph and it deploys with no
> problem to the same server.
> This led me to think that there might be a memory issue somewhere, as
> the original project is quite big. I ran the static weaver with
> -Xmx1200m, but got the same results.
>
> I posted a full listing of the weaved and non-weaved jars here:
> http://rapidshare.com/files/282906389/jar-reports.zip.html
> Please see if you can make any sense of it. In winRar, folders which
> have files also have an empty file with an empty name. Folders that
> contain only folders (e.g. package il.co <http://il.co/>) do not have
> this problem.
>
> Michael
>
> On Thu, Sep 17, 2009 at 4:16 PM, Tom Ware <tom.ware@...
> <mailto:tom.ware@...>> wrote:
>
>     Hi Michael,
>
>      The static weaving processor will not handle nested jar files.  You
>     may have to do a slight reconfiguration to have weaving work.  Try
>     pulling the nested jar files out and ensuring they are listed in the
>     classpath argument provided to the static weaver.
>
>
>     -Tom
>
>     Michael Bar-sinai wrote:
>
>         Hi Tom,
>
>         The persistence unit holds about 20 classes, and is quite
>         dynamic at the moment.
>
>         The ejb file is corrupt. For example, the top-level dir looks
>         like this:
>         il (dir, base package)
>         META-INF (dir)
>         eBill-Common.jar (75K, the original is 275K)
>         META-INF (file, size = 0)
>
>         I'll see if I can get anything new by using FINEST.
>
>         Michael
>
>
>         On Wed, Sep 16, 2009 at 4:17 PM, Tom Ware <tom.ware@...
>         <mailto:tom.ware@...> <mailto:tom.ware@...
>         <mailto:tom.ware@...>>> wrote:
>
>            Hi Michael,
>
>             The only thing you can do to make things more verbose to to
>            increase the logging level to FINEST.
>
>             How big is your persistence unit?  How difficult would it be to
>            actually list the classes in your persistence.xml rather than use
>            <exclude-unlisted-classes>false</exclude-unlisted-classes>?
>
>             What is missing from your weaved jar?  (You say it is about half
>            the size of your unweaved jar.)  Are the missing classes part of
>            your persistence unit, or they among the "other classes" you
>         mention
>            below?  If they are from the persistence unit, can you provide an
>            example of one of the classes that is missing?
>
>             Another thing to try is to see if running the weaver against a
>            persistence.xml that contains only one of your persistence units
>            makes any difference.
>
>
>            -Tom
>
>            Michael Bar-sinai wrote:
>
>                Hi Tom,
>
>                The typo is only in the command I posted here... I actually
>                renamed that jar to have a shorter name.
>                eBill-Ejb.jar has the domain classes and the
>                META-INF/persistence.xml file, as well as other classes.
>         Is it
>                possible that the static weaver fails like the one in the
>                application server? It there any -verbose flag I can use?
>
>                The contents of persistence.xml follows:
>                <?xml version="1.0" encoding="UTF-8"?>
>                <persistence version="1.0"
>                xmlns="http://java.sun.com/xml/ns/persistence"
>                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>                xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
>                http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
>                <persistence-unit name="eBill-PU-JTA" transaction-type="JTA">
>                <description>
>                Normal use PU - used in most EJB actions.
>                </description>
>              
>          <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
>                <jta-data-source>jdbc/eBill</jta-data-source>
>                <exclude-unlisted-classes>false</exclude-unlisted-classes>
>                <properties>
>                     <!--
>                -->
>                <property name="eclipselink.ddl-generation"
>         value="create-tables"/>
>                <property name="eclipselink.logging.level" value="FINE"/>
>                <property name="eclipselink.jdbc.native-sql" value="true"/>
>                <property name="eclipselink.target-server" value="SunAS9"/>
>                <property name="eclipselink.target-database"
>         value="SQLServer"/>
>                <property name="eclipselink.weaving" value="static" />
>                </properties>
>                </persistence-unit>
>                <persistence-unit name="eBill-PU-RL"
>                transaction-type="RESOURCE_LOCAL">
>                <description>
>                Used for when we need to do fine-grained TXN control,
>         e.g. when
>                doing mass deletion.
>                </description>
>              
>          <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
>                <non-jta-data-source>jdbc/eBill</non-jta-data-source>
>                <exclude-unlisted-classes>false</exclude-unlisted-classes>
>                <properties>
>                <property name="toplink.target-database" value="SQLServer"/>
>                <property name="eclipselink.target-server" value="SunAS9"/>
>                </properties>
>                </persistence-unit>
>                </persistence>
>
>                Thanks,
>                Michael
>
>
>                On Tue, Sep 15, 2009 at 6:12 PM, Tom Ware
>         <tom.ware@... <mailto:tom.ware@...>
>                <mailto:tom.ware@... <mailto:tom.ware@...>>
>         <mailto:tom.ware@... <mailto:tom.ware@...>
>                <mailto:tom.ware@...
>         <mailto:tom.ware@...>>>> wrote:
>
>                   Hi Michael,
>
>                    I see a typo in your command line: it should be
>                javax.persistence
>                   (not avax.persistence)
>
>                    What is the contents of your eBill-ejb.jar?
>                    META-INF/persistence.xml? your domain classes?
>          Anything else?
>
>                   -Tom
>
>                   Michael Bar-sinai wrote:
>
>                       Hi Tom,
>                       Thanks for your reply. I tried static weaving
>         using the
>                       following command (I had to improvise a bit, as the
>                command in
>                       the wiki does not really run as is  )
>
>                       % java -cp
>                      
>         eclipselink.jar;avax.persistence_1.0.0.v200905011740.jar
>                       org.eclipse.persistence.tools.weaving.jpa.StaticWeave
>                       -persistenceinfo eBill-ejb.jar -classpath
>         eBill-ejb.jar
>                       eBill-ejb.jar eBill-ejb-w.jar
>
>                       I did not get any errors, but the weaved ejb is
>          394KB, while
>                       the original is 809KB.
>
>                       The deployment failed over the expansion of the
>         archive, so I
>                       guess something did go wrong here.
>
>                       I'm not sure how to use the ant task, as this is a
>                Netbeans project.
>
>                       Any ideas?
>
>                       Michael
>
>                       On Mon, Sep 14, 2009 at 11:25 PM, Tom Ware
>                <tom.ware@... <mailto:tom.ware@...>
>         <mailto:tom.ware@... <mailto:tom.ware@...>>
>                       <mailto:tom.ware@...
>         <mailto:tom.ware@...> <mailto:tom.ware@...
>         <mailto:tom.ware@...>>>
>                <mailto:tom.ware@... <mailto:tom.ware@...>
>         <mailto:tom.ware@... <mailto:tom.ware@...>>
>
>                       <mailto:tom.ware@...
>         <mailto:tom.ware@...>
>                <mailto:tom.ware@...
>         <mailto:tom.ware@...>>>>> wrote:
>
>                          Hi Michael,
>
>                           I am not sure if there are any issues with the way
>                GlassFish
>                          handles this, but I can try to help you from an
>                EclipseLink
>                       point of
>                          view.
>
>                           The first thing to do is to see if static
>         weaving helps:
>
>                                    
>          http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_%28ELUG%29#How_to_Configure_Static_Weaving_for_JPA_Entities
>
>                           This will help us to isolate whether you are
>         seeing
>                an issue
>                          related to classloaders or an issue related to
>                persistence unit
>                          configuration.
>
>                          -Tom
>
>                          Michael Bar-Sinai wrote:
>
>                              Hello All,
>
>                              I develop a large JEE app, with eclipselink
>         as the JPA
>                       provider.
>                              I switched from Toplink Essentials, where the
>                application
>                       had no
>                              problem deploying; with eclipselink I get all
>                kinds of Null
>                              Pointer Exceptions when I deploy the app.
>         The problem
>                       seems to
>                              boil down to three relationships between
>         objects.
>                When I make
>                              them EAGER, the application deploys. When
>         they're
>                LAZY, it
>                              doesn't. I followed this thread
>                                        
>          <http://www.nabble.com/OneToOne-Mapping-works-with-FetchType.EAGER-but-not-with-FetchType.LAZY--%3E-Exception-when-deploying-%28SGES-2.1%29-p21711849.html>,
>                              but they did not come to any conclusions. I did
>                find more
>                       info
>                              in the logs, though.
>
>
>                              The setup:
>
>                              (Please view in a fixed-width font such as
>                Courier. Some
>                       other
>                              classes are omitted.)
>                                              E +-------------------+ P
>                                          
>         +----------|EMailResourceBundle|---------------+
>                                    *|P       1 +-------------------+ *  
>                          |
>                              +-------------+      ^1                    
>                           |L1
>                              |EMailResource|      |                    
>               L1
>                              +------------------+
>                              +-------------+      |                    
>          +--------------|                                |
>                                                  |               |      
>                                     |BeeriprintCustomer|
>                                                  |               |      
>                       |                                |
>                                                  |              L|*    
>                                      +------------------+
>                              L Lazy               |   L +-------------+
>                             P|*
>                              E Eager                    
>         +-----|EMailTemplate|---------------+
>                              P Problem -              * +-------------+L1
>                                Should be lazy,
>                                Works only when eager
>                              1/* multiplicity
>
>                              Whenever I turn any of the links marked "P" to
>                LAZY, I get an
>                              NPE while deploying. Here's a sample, where I
>                turned the link
>                              between EMailResource and
>         EMailResourceBundle to LAZY:
>
>                                        
>          [#|2009-09-14T08:32:38.562+0300|CONFIG|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA.connection|_ThreadID=16;_ThreadName=Thread-639;|Connected:
>                                        
>          jdbc:sqlserver://localhost:1433;responseBuffering=full;encrypt=false;databaseName=eBIll;selectMethod=direct;trustServerCertificate=false;lastUpdateCount=true;
>                                     User: glassfish
>                                     Database: Microsoft SQL Server  Version:
>                9.00.3042
>                                     Driver: Microsoft SQL Server 2005
>         JDBC Driver
>                        Version:
>                              1.2.2828.100|#]
>
>                                        
>          [#|2009-09-14T08:32:38.640+0300|SEVERE|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA|_ThreadID=16;_ThreadName=Thread-639;_RequestID=faa6e914-cf3b-4c99-a1ed-8f29f110e9f8;|
>                              Local Exception Stack: Exception
>         [EclipseLink-0]
>                (Eclipse
>                              Persistence Services - 1.1.2.v20090612-r4475):
>                            
>          org.eclipse.persistence.exceptions.IntegrityException
>                              Descriptor Exceptions:
>                                  
>          ---------------------------------------------------------
>
>                              Exception [EclipseLink-60] (Eclipse Persistence
>                Services -
>                              1.1.2.v20090612-r4475):
>                            
>          org.eclipse.persistence.exceptions.DescriptorException
>                              Exception Description: The method
>                              [_persistence_setparentBundle_vh] or
>                              [_persistence_getparentBundle_vh] is not
>         defined
>                in the
>                       object
>                                  
>          [il.co.beeriprint.ebill.email.templates.EMailResource].
>                              Internal Exception:
>         java.lang.NoSuchMethodException:
>                                        
>          il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
>                              Mapping:
>                                        
>          org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
>                              Descriptor:
>                                        
>          RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource
>                              --> [DatabaseTable(EMAILRESOURCE)])
>
>                              Runtime Exceptions:
>                                  
>          ---------------------------------------------------------
>
>                              java.lang.NullPointerException
>
>                                     at
>                                        
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:477)
>                                     at
>                                        
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
>                                     at
>                                        
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
>                                     at
>                                        
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
>                                     at
>                                        
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
>                                     at
>                                        
>          org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
>                                     at
>                                        
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
>                                     at
>                                        
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
>                                     at
>                                        
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
>                                     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)
>
>                              Descriptor Exceptions:
>                                  
>          ---------------------------------------------------------
>
>
>                              Local Exception Stack: Exception
>         [EclipseLink-60]
>                (Eclipse
>                              Persistence Services - 1.1.2.v20090612-r4475):
>                            
>          org.eclipse.persistence.exceptions.DescriptorException
>                              Exception Description: The method
>                              [_persistence_setparentBundle_vh] or
>                              [_persistence_getparentBundle_vh] is not
>         defined
>                in the
>                       object
>                                  
>          [il.co.beeriprint.ebill.email.templates.EMailResource].
>                              Internal Exception:
>         java.lang.NoSuchMethodException:
>                                        
>          il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
>                              Mapping:
>                                        
>          org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
>                              Descriptor:
>                                        
>          RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource
>                              --> [DatabaseTable(EMAILRESOURCE)])
>                                     at
>                                        
>          org.eclipse.persistence.exceptions.DescriptorException.noSuchMethodWhileInitializingAttributesInMethodAccessor(DescriptorException.java:1143)
>                                     at
>                                        
>          org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.initializeAttributes(MethodAttributeAccessor.java:151)
>                                     at
>                                        
>          org.eclipse.persistence.mappings.DatabaseMapping.preInitialize(DatabaseMapping.java:1094)
>                                     at
>                                        
>          org.eclipse.persistence.mappings.ForeignReferenceMapping.preInitialize(ForeignReferenceMapping.java:744)
>                                     at
>                                        
>          org.eclipse.persistence.mappings.ObjectReferenceMapping.preInitialize(ObjectReferenceMapping.java:863)
>                                     at
>                                        
>          org.eclipse.persistence.descriptors.ClassDescriptor.preInitialize(ClassDescriptor.java:3192)
>                                     at
>                                        
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:429)
>                                     at
>                                        
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
>                                     at
>                                        
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
>                                     at
>                                        
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
>                                     at
>                                        
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
>                                     at
>                                        
>          org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
>                                     at
>                                        
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
>                                     at
>                                        
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
>                                     at
>                                        
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
>                                     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)
>                              Caused by: java.lang.NoSuchMethodException:
>                                        
>          il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
>                                     at
>                java.lang.Class.getDeclaredMethod(Class.java:1937)
>                                     at
>                                        
>          org.eclipse.persistence.internal.security.PrivilegedAccessHelper.findMethod(PrivilegedAccessHelper.java:59)
>                                     at
>                                        
>          org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getMethod(PrivilegedAccessHelper.java:226)
>                                     at
>                                        
>          org.eclipse.persistence.internal.helper.Helper.getDeclaredMethod(Helper.java:965)
>                                     at
>                                        
>          org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.initializeAttributes(MethodAttributeAccessor.java:144)
>                                     ... 31 more
>
>                              Runtime Exceptions:
>                                  
>          ---------------------------------------------------------
>
>
>                              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:1373)
>                                     at
>                                        
>          org.eclipse.persistence.descriptors.ClassDescriptor.validateBeforeInitialization(ClassDescriptor.java:5123)
>                                     at
>                                        
>          org.eclipse.persistence.descriptors.ClassDescriptor.preInitialize(ClassDescriptor.java:3198)
>                                     at
>                                        
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:429)
>                                     at
>                                        
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
>                                     at
>                                        
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
>                                     at
>                                        
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
>                                     at
>                                        
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
>                                     at
>                                        
>          org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
>                                     at
>                                        
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
>                                     at
>                                        
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
>                                     at
>                                        
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
>                                     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)
>                              |#]
>
>                                        
>          [#|2009-09-14T08:32:38.640+0300|SEVERE|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/glassfish/AppServer/domains/ebill-dev/applications/j2ee-apps/eBill/eBill-ejb_jar/-eBill-PU-JTA.ejb|_ThreadID=16;_ThreadName=Thread-639;_RequestID=faa6e914-cf3b-4c99-a1ed-8f29f110e9f8;|
>                              Local Exception Stack: Exception
>         [EclipseLink-0]
>                (Eclipse
>                              Persistence Services - 1.1.2.v20090612-r4475):
>                            
>          org.eclipse.persistence.exceptions.IntegrityException
>                              Descriptor Exceptions:
>                                  
>          ---------------------------------------------------------
>
>                              Exception [EclipseLink-60] (Eclipse Persistence
>                Services -
>                              1.1.2.v20090612-r4475):
>                            
>          org.eclipse.persistence.exceptions.DescriptorException
>                              Exception Description: The method
>                              [_persistence_setparentBundle_vh] or
>                              [_persistence_getparentBundle_vh] is not
>         defined
>                in the
>                       object
>                                  
>          [il.co.beeriprint.ebill.email.templates.EMailResource].
>                              Internal Exception:
>         java.lang.NoSuchMethodException:
>                                        
>          il.co.beeriprint.ebill.email.templates.EMailResource._persistence_getparentBundle_vh()
>                              Mapping:
>                                        
>          org.eclipse.persistence.mappings.OneToOneMapping[parentBundle]
>                              Descriptor:
>                                        
>          RelationalDescriptor(il.co.beeriprint.ebill.email.templates.EMailResource
>                              --> [DatabaseTable(EMAILRESOURCE)])
>
>                              Runtime Exceptions:
>                                  
>          ---------------------------------------------------------
>
>                              java.lang.NullPointerException
>
>                                     at
>                                        
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:477)
>                                     at
>                                        
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
>                                     at
>                                        
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:666)
>                                     at
>                                        
>          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:630)
>                                     at
>                                        
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:229)
>                                     at
>                                        
>          org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:255)
>                                     at
>                                        
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
>                                     at
>                                        
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
>                                     at
>                                        
>          org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
>                                     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)
>
>
>                              IMHO, this looks like eclipselink finds the
>                classes before it
>                              adds the _persistence_* methods, thus
>         causing an NPE.
>
>                              Setup:
>
>                                 * Windows Server 2003R2
>                                 * Sun GlassFish Enterprise Server v2.1
>         (9.1.1)
>                (build
>                       b60e-fcs)
>                                 * Eclipse Persistence Services -
>                1.1.2.v20090612-r4475
>
>                              Any solutions would be highly appreciated.
>         I have
>                all the
>                       logs
>                              and will be very willing to help solve this.
>
>                              Thanks in advance,
>                              Michael Bar-Sinai
>
>
>                                        
>          ------------------------------------------------------------------------
>                              View this message in context: Can't deploy
>         when using
>                       LAZY, can
>                              deply when using EAGER
>                                        
>          <http://www.nabble.com/Can%27t-deploy-when-using-LAZY%2C-can-deply-when-using-EAGER-tp25433376p25433376.html>
>                              Sent from the EclipseLink - Users mailing
>         list archive
>                                  
>          <http://www.nabble.com/EclipseLink---Users-f26658.html> at
>                              Nabble.com.
>
>
>                                        
>          ------------------------------------------------------------------------
>
>                              _______________________________________________
>                              eclipselink-users mailing list
>                              eclipselink-users@...
>         <mailto:eclipselink-users@...>
>                <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>>
>                       <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>
>                <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>>>
>                       <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>
>                <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>>
>                       <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>
>                <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>>>>
>
>                                  
>          https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>                          _______________________________________________
>                          eclipselink-users mailing list
>                          eclipselink-users@...
>         <mailto:eclipselink-users@...>
>                <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>>
>                       <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>
>                <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>>>
>                       <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>
>                <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>>
>                       <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>
>                <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>>>>
>
>                        
>          https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>
>
>                            
>         ------------------------------------------------------------------------
>
>                       _______________________________________________
>                       eclipselink-users mailing list
>                       eclipselink-users@...
>         <mailto:eclipselink-users@...>
>                <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>>
>                <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>
>                <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>>>
>                      
>         https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>                   _______________________________________________
>                   eclipselink-users mailing list
>                   eclipselink-users@...
>         <mailto:eclipselink-users@...>
>                <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>>
>                <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>
>                <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>>>
>                   https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>
>
>              
>          ------------------------------------------------------------------------
>
>                _______________________________________________
>                eclipselink-users mailing list
>                eclipselink-users@...
>         <mailto:eclipselink-users@...>
>         <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>>
>                https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>            _______________________________________________
>            eclipselink-users mailing list
>            eclipselink-users@...
>         <mailto:eclipselink-users@...>
>         <mailto:eclipselink-users@...
>         <mailto:eclipselink-users@...>>
>            https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>
>
>         ------------------------------------------------------------------------
>
>         _______________________________________________
>         eclipselink-users mailing list
>         eclipselink-users@... <mailto:eclipselink-users@...>
>         https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>     _______________________________________________
>     eclipselink-users mailing list
>     eclipselink-users@... <mailto:eclipselink-users@...>
>     https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@...
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Re: Can't deploy when using LAZY, can deply when using EAGER

by Michael Bar-Sinai :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Tom,

I've added the nested jar to the classpath of the static weaver (both to the -cp and to the -classpath parameter, just to be sure). No luck - I still get a corrupted jar.
By "corrupted", I mean that each folder that has .class files also has an empty entry (0K, no name). The domain classes are about twice the size, and they do implement the interfaces:
org.eclipse.persistence.internal.weaving.PersistenceWeaved,
org.eclipse.persistence.internal.descriptors.PersistenceEntity,
org.eclipse.persistence.internal.descriptors.PersistenceObject,
org.eclipse.persistence.queries.FetchGroupTracker,
org.eclipse.persistence.internal.weaving.PersistenceWeavedFetchGroups,
org.eclipse.persistence.descriptors.changetracking.ChangeTracker,
org.eclipse.persistence.internal.weaving.PersistenceWeavedChangeTracking

The domain classes are:
il/co/beeriprint/ebill/bo/BeeriprintCustomer.java
il/co/beeriprint/ebill/bo/DefaultingBeeriprintCustomer.java
il/co/beeriprint/ebill/bo/EBillEndpoint.java
il/co/beeriprint/ebill/bo/ImportRecord.java
il/co/beeriprint/ebill/bo/Passcode.java
il/co/beeriprint/ebill/bo/SendBatch.java
il/co/beeriprint/ebill/bo/StatementPartRecord.java
il/co/beeriprint/ebill/bo/StatementRecord.java
il/co/beeriprint/ebill/bpcustomer/cellcom/dataimport/compensation/CellcomEndpointKeyCR.java
il/co/beeriprint/ebill/bpcustomer/cellcom/dataimport/endpoint/CellcomEndpointKey.java
il/co/beeriprint/ebill/bpcustomer/leumicard/dataimport/compensation/EndpointKeyCR.java
il/co/beeriprint/ebill/bpcustomer/leumicard/dataimport/endpoint/LeumicardCreditCardNum.java
il/co/beeriprint/ebill/bpcustomer/leumicard/dataimport/endpoint/LeumicardEndpointKey.java
il/co/beeriprint/ebill/bpcustomer/leumicard/dataimport/endpoint/LeumicardIdNum.java
il/co/beeriprint/ebill/bpcustomer/leumicard/dataimport/endpoint/SeparateEndpointKey.java
il/co/beeriprint/ebill/bpcustomer/leumicard/dataimport/endpoint/UnifiedEndpointKey.java
il/co/beeriprint/ebill/dataimport/compensation/CompensatableReference.java
il/co/beeriprint/ebill/dataimport/compensation/EBillEndpointCR.java
il/co/beeriprint/ebill/dataimport/compensation/ImportRecordCR.java
il/co/beeriprint/ebill/dataimport/compensation/PasscodeCR.java
il/co/beeriprint/ebill/dataimport/compensation/SendBatchCR.java
il/co/beeriprint/ebill/dataimport/compensation/StatementPartRecordCR.java
il/co/beeriprint/ebill/dataimport/compensation/StatementRecordCR.java
il/co/beeriprint/ebill/email/impl/ejbmailer/dsnbehaviour/DefaultBehaviour.java
il/co/beeriprint/ebill/email/impl/ejbmailer/dsnbehaviour/DsnCodeBehaviour.java
il/co/beeriprint/ebill/email/impl/ejbmailer/dsnbehaviour/EsmtpCodeBehaviour.java
il/co/beeriprint/ebill/email/impl/ejbmailer/dsnbehaviour/SmtpCodeBehaviour.java
il/co/beeriprint/ebill/email/impl/ejbmailer/entity/EJBMailerEMailMessage.java
il/co/beeriprint/ebill/email/impl/ejbmailer/entity/history/DeliveryFailure.java
il/co/beeriprint/ebill/email/impl/ejbmailer/entity/history/Expired.java
il/co/beeriprint/ebill/email/impl/ejbmailer/entity/history/PermanentFailure.java
il/co/beeriprint/ebill/email/impl/ejbmailer/entity/history/Queued.java
il/co/beeriprint/ebill/email/impl/ejbmailer/entity/history/ServiceMessageQueued.java
il/co/beeriprint/ebill/email/impl/ejbmailer/entity/history/StatementPartMessageHistoryItem.java
il/co/beeriprint/ebill/email/impl/ejbmailer/entity/history/TransientFailure.java
il/co/beeriprint/ebill/email/impl/ejbmailer/entity/history/Viewed.java
il/co/beeriprint/ebill/email/impl/ejbmailer/entity/StoredEMailMessage.java
il/co/beeriprint/ebill/email/templates/EMailResource.java
il/co/beeriprint/ebill/email/templates/EMailResourceBundle.java
il/co/beeriprint/ebill/email/templates/EMailTemplate.java
il/co/beeriprint/ebill/pdfchopshop/serverside/PdfResourceRecord.java
il/co/beeriprint/ebill/serversettings/CustomerSettingRecord.java
il/co/beeriprint/ebill/serversettings/SystemSettingRecord.java

As you can see, not the most trivial case...
I've added a new field to an entity class today (EJBMailerEMailMessage) and now the application won't deploy again, basically saying the same thing (missing _persistence_set* method) on some other class that was not in my original post. I'm stumped as I need to release a version soon, and eclipselink does solve a few problems I had before.
I know there's an Oracle dev center in Israel - do they have any specialist that can have a hands-on look at this? Obviously, the solution will be posed to the list.

Michael

_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Re: Can't deploy when using LAZY, can deply when using EAGER

by tware :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Michael,

   It sounds looks like we are actually weaving the classes for you.  The issue
seems to be related somehow to the jar.

   What operating system are you on?  What VM are you using?

   Lets try something even simpler to try to isolate the problem.  Try
extracting your jar to a directory structure and running the static weaver on
the directory structure.  There are some details about how the exploded
directory structure should work here in the Weaving documentation:

http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_%28ELUG%29#How_to_Configure_Static_Weaving_for_JPA_Entities

   Does weaving work for you in that case?  If so, that will give us some
information about what is going wrong, and also give you a workaround.

   If it does not work, try an exploded directory structure with just your
entities. (i.e. move all the non-entities to the classpath but outside of your
actual directory structure)  Does that work?

-Tom

Michael Bar-sinai wrote:

> Hi Tom,
>
> I've added the nested jar to the classpath of the static weaver (both to
> the -cp and to the -classpath parameter, just to be sure). No luck - I
> still get a corrupted jar.
> By "corrupted", I mean that each folder that has .class files also has
> an empty entry (0K, no name). The domain classes are about twice the
> size, and they do implement the interfaces:
> org.eclipse.persistence.internal.weaving.PersistenceWeaved,
> org.eclipse.persistence.internal.descriptors.PersistenceEntity,
> org.eclipse.persistence.internal.descriptors.PersistenceObject,
> org.eclipse.persistence.queries.FetchGroupTracker,
> org.eclipse.persistence.internal.weaving.PersistenceWeavedFetchGroups,
> org.eclipse.persistence.descriptors.changetracking.ChangeTracker,
> org.eclipse.persistence.internal.weaving.PersistenceWeavedChangeTracking
>
> The domain classes are:
> il/co/beeriprint/ebill/bo/BeeriprintCustomer.java
> il/co/beeriprint/ebill/bo/DefaultingBeeriprintCustomer.java
> il/co/beeriprint/ebill/bo/EBillEndpoint.java
> il/co/beeriprint/ebill/bo/ImportRecord.java
> il/co/beeriprint/ebill/bo/Passcode.java
> il/co/beeriprint/ebill/bo/SendBatch.java
> il/co/beeriprint/ebill/bo/StatementPartRecord.java
> il/co/beeriprint/ebill/bo/StatementRecord.java
> il/co/beeriprint/ebill/bpcustomer/cellcom/dataimport/compensation/CellcomEndpointKeyCR.java
> il/co/beeriprint/ebill/bpcustomer/cellcom/dataimport/endpoint/CellcomEndpointKey.java
> il/co/beeriprint/ebill/bpcustomer/leumicard/dataimport/compensation/EndpointKeyCR.java
> il/co/beeriprint/ebill/bpcustomer/leumicard/dataimport/endpoint/LeumicardCreditCardNum.java
> il/co/beeriprint/ebill/bpcustomer/leumicard/dataimport/endpoint/LeumicardEndpointKey.java
> il/co/beeriprint/ebill/bpcustomer/leumicard/dataimport/endpoint/LeumicardIdNum.java
> il/co/beeriprint/ebill/bpcustomer/leumicard/dataimport/endpoint/SeparateEndpointKey.java
> il/co/beeriprint/ebill/bpcustomer/leumicard/dataimport/endpoint/UnifiedEndpointKey.java
> il/co/beeriprint/ebill/dataimport/compensation/CompensatableReference.java
> il/co/beeriprint/ebill/dataimport/compensation/EBillEndpointCR.java
> il/co/beeriprint/ebill/dataimport/compensation/ImportRecordCR.java
> il/co/beeriprint/ebill/dataimport/compensation/PasscodeCR.java
> il/co/beeriprint/ebill/dataimport/compensation/SendBatchCR.java
> il/co/beeriprint/ebill/dataimport/compensation/StatementPartRecordCR.java
> il/co/beeriprint/ebill/dataimport/compensation/StatementRecordCR.java
> il/co/beeriprint/ebill/email/impl/ejbmailer/dsnbehaviour/DefaultBehaviour.java
> il/co/beeriprint/ebill/email/impl/ejbmailer/dsnbehaviour/DsnCodeBehaviour.java
> il/co/beeriprint/ebill/email/impl/ejbmailer/dsnbehaviour/EsmtpCodeBehaviour.java
> il/co/beeriprint/ebill/email/impl/ejbmailer/dsnbehaviour/SmtpCodeBehaviour.java
> il/co/beeriprint/ebill/email/impl/ejbmailer/entity/EJBMailerEMailMessage.java
> il/co/beeriprint/ebill/email/impl/ejbmailer/entity/history/DeliveryFailure.java
> il/co/beeriprint/ebill/email/impl/ejbmailer/entity/history/Expired.java
> il/co/beeriprint/ebill/email/impl/ejbmailer/entity/history/PermanentFailure.java
> il/co/beeriprint/ebill/email/impl/ejbmailer/entity/history/Queued.java
> il/co/beeriprint/ebill/email/impl/ejbmailer/entity/history/ServiceMessageQueued.java
> il/co/beeriprint/ebill/email/impl/ejbmailer/entity/history/StatementPartMessageHistoryItem.java
> il/co/beeriprint/ebill/email/impl/ejbmailer/entity/history/TransientFailure.java
> il/co/beeriprint/ebill/email/impl/ejbmailer/entity/history/Viewed.java
> il/co/beeriprint/ebill/email/impl/ejbmailer/entity/StoredEMailMessage.java
> il/co/beeriprint/ebill/email/templates/EMailResource.java
> il/co/beeriprint/ebill/email/templates/EMailResourceBundle.java
> il/co/beeriprint/ebill/email/templates/EMailTemplate.java
> il/co/beeriprint/ebill/pdfchopshop/serverside/PdfResourceRecord.java
> il/co/beeriprint/ebill/serversettings/CustomerSettingRecord.java
> il/co/beeriprint/ebill/serversettings/SystemSettingRecord.java
>
> As you can see, not the most trivial case...
> I've added a new field to an entity class today (EJBMailerEMailMessage)
> and now the application won't deploy again, basically saying the same
> thing (missing _persistence_set* method) on some other class that was
> not in my original post. I'm stumped as I need to release a version
> soon, and eclipselink does solve a few problems I had before.
> I know there's an Oracle dev center in Israel - do they have any
> specialist that can have a hands-on look at this? Obviously, the
> solution will be posed to the list.
>
> Michael
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@...
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Re: Can't deploy when using LAZY, can deply when using EAGER

by Michael Bar-Sinai :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Tom,

The latest change was probably my bad - I left the weaving=static  
property in the persistence.xml file.
The OS is Windows XP SP3, the VM is java 6 update 11. I'll try the  
directory structure weaving first thing in the morning.

- Michael

On 23 Sep, 2009, at 6:34 PM, Tom Ware wrote:

> Hi Michael,
>
>  It sounds looks like we are actually weaving the classes for you.  
> The issue seems to be related somehow to the jar.
>
>  What operating system are you on?  What VM are you using?
>
>  Lets try something even simpler to try to isolate the problem.  Try  
> extracting your jar to a directory structure and running the static  
> weaver on the directory structure.  There are some details about how  
> the exploded directory structure should work here in the Weaving  
> documentation:
>
> http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_%28ELUG%29#How_to_Configure_Static_Weaving_for_JPA_Entities
>
>  Does weaving work for you in that case?  If so, that will give us  
> some information about what is going wrong, and also give you a  
> workaround.
>
>  If it does not work, try an exploded directory structure with just  
> your entities. (i.e. move all the non-entities to the classpath but  
> outside of your actual directory structure)  Does that work?
>
> -Tom
>
> Michael Bar-sinai wrote:
>> Hi Tom,
>> I've added the nested jar to the classpath of the static weaver  
>> (both to the -cp and to the -classpath parameter, just to be sure).  
>> No luck - I still get a corrupted jar.
>> By "corrupted", I mean that each folder that has .class files also  
>> has an empty entry (0K, no name). The domain classes are about  
>> twice the size, and they do implement the interfaces:
>> org.eclipse.persistence.internal.weaving.PersistenceWeaved,
>> org.eclipse.persistence.internal.descriptors.PersistenceEntity,
>> org.eclipse.persistence.internal.descriptors.PersistenceObject,
>> org.eclipse.persistence.queries.FetchGroupTracker,
>> org
>> .eclipse.persistence.internal.weaving.PersistenceWeavedFetchGroups,
>> org.eclipse.persistence.descriptors.changetracking.ChangeTracker,
>> org
>> .eclipse.persistence.internal.weaving.PersistenceWeavedChangeTracking
>> The domain classes are:
>> il/co/beeriprint/ebill/bo/BeeriprintCustomer.java
>> il/co/beeriprint/ebill/bo/DefaultingBeeriprintCustomer.java
>> il/co/beeriprint/ebill/bo/EBillEndpoint.java
>> il/co/beeriprint/ebill/bo/ImportRecord.java
>> il/co/beeriprint/ebill/bo/Passcode.java
>> il/co/beeriprint/ebill/bo/SendBatch.java
>> il/co/beeriprint/ebill/bo/StatementPartRecord.java
>> il/co/beeriprint/ebill/bo/StatementRecord.java
>> il/co/beeriprint/ebill/bpcustomer/cellcom/dataimport/compensation/
>> CellcomEndpointKeyCR.java
>> il/co/beeriprint/ebill/bpcustomer/cellcom/dataimport/endpoint/
>> CellcomEndpointKey.java
>> il/co/beeriprint/ebill/bpcustomer/leumicard/dataimport/compensation/
>> EndpointKeyCR.java
>> il/co/beeriprint/ebill/bpcustomer/leumicard/dataimport/endpoint/
>> LeumicardCreditCardNum.java
>> il/co/beeriprint/ebill/bpcustomer/leumicard/dataimport/endpoint/
>> LeumicardEndpointKey.java
>> il/co/beeriprint/ebill/bpcustomer/leumicard/dataimport/endpoint/
>> LeumicardIdNum.java
>> il/co/beeriprint/ebill/bpcustomer/leumicard/dataimport/endpoint/
>> SeparateEndpointKey.java
>> il/co/beeriprint/ebill/bpcustomer/leumicard/dataimport/endpoint/
>> UnifiedEndpointKey.java
>> il/co/beeriprint/ebill/dataimport/compensation/
>> CompensatableReference.java
>> il/co/beeriprint/ebill/dataimport/compensation/EBillEndpointCR.java
>> il/co/beeriprint/ebill/dataimport/compensation/ImportRecordCR.java
>> il/co/beeriprint/ebill/dataimport/compensation/PasscodeCR.java
>> il/co/beeriprint/ebill/dataimport/compensation/SendBatchCR.java
>> il/co/beeriprint/ebill/dataimport/compensation/
>> StatementPartRecordCR.java
>> il/co/beeriprint/ebill/dataimport/compensation/StatementRecordCR.java
>> il/co/beeriprint/ebill/email/impl/ejbmailer/dsnbehaviour/
>> DefaultBehaviour.java
>> il/co/beeriprint/ebill/email/impl/ejbmailer/dsnbehaviour/
>> DsnCodeBehaviour.java
>> il/co/beeriprint/ebill/email/impl/ejbmailer/dsnbehaviour/
>> EsmtpCodeBehaviour.java
>> il/co/beeriprint/ebill/email/impl/ejbmailer/dsnbehaviour/
>> SmtpCodeBehaviour.java
>> il/co/beeriprint/ebill/email/impl/ejbmailer/entity/
>> EJBMailerEMailMessage.java
>> il/co/beeriprint/ebill/email/impl/ejbmailer/entity/history/
>> DeliveryFailure.java
>> il/co/beeriprint/ebill/email/impl/ejbmailer/entity/history/
>> Expired.java
>> il/co/beeriprint/ebill/email/impl/ejbmailer/entity/history/
>> PermanentFailure.java
>> il/co/beeriprint/ebill/email/impl/ejbmailer/entity/history/
>> Queued.java
>> il/co/beeriprint/ebill/email/impl/ejbmailer/entity/history/
>> ServiceMessageQueued.java
>> il/co/beeriprint/ebill/email/impl/ejbmailer/entity/history/
>> StatementPartMessageHistoryItem.java
>> il/co/beeriprint/ebill/email/impl/ejbmailer/entity/history/
>> TransientFailure.java
>> il/co/beeriprint/ebill/email/impl/ejbmailer/entity/history/
>> Viewed.java
>> il/co/beeriprint/ebill/email/impl/ejbmailer/entity/
>> StoredEMailMessage.java
>> il/co/beeriprint/ebill/email/templates/EMailResource.java
>> il/co/beeriprint/ebill/email/templates/EMailResourceBundle.java
>> il/co/beeriprint/ebill/email/templates/EMailTemplate.java
>> il/co/beeriprint/ebill/pdfchopshop/serverside/PdfResourceRecord.java
>> il/co/beeriprint/ebill/serversettings/CustomerSettingRecord.java
>> il/co/beeriprint/ebill/serversettings/SystemSettingRecord.java
>> As you can see, not the most trivial case...
>> I've added a new field to an entity class today  
>> (EJBMailerEMailMessage) and now the application won't deploy again,  
>> basically saying the same thing (missing _persistence_set* method)  
>> on some other class that was not in my original post. I'm stumped  
>> as I need to release a version soon, and eclipselink does solve a  
>> few problems I had before.
>> I know there's an Oracle dev center in Israel - do they have any  
>> specialist that can have a hands-on look at this? Obviously, the  
>> solution will be posed to the list.
>> Michael
>> ------------------------------------------------------------------------
>> _______________________________________________
>> eclipselink-users mailing list
>> eclipselink-users@...
>> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@...
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users

_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Re: Can't deploy when using LAZY, can deply when using EAGER

by Michael Bar-Sinai :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Well, the last change WAS my bad - when I removed the weaving=static
flag from the persistence the recent problem (the class that was not
mentioned initially) was fixed.

Now for some good news: WE'VE GOT A WORKAROUND!
1. Make all the problematic relationship EAGER.
2. Add the <property name="eclipselink.ddl-generation"
value="create-tables"/> to the property.xml file
3. Deploy
4. Change the relationships you want to LAZY
5. Remove the <property name="eclipselink.ddl-generation"
value="create-tables"/> to the property.xml file
6. Deploy.
done.

As for the static weaver, I tried static weaving of the exploded
structure. The static weaver seems to remove the
@Stateless/@Stateful/@MessageDriven, as I get this message:
Invalid ejb jar [eBill-ejb.jar]: it contains zero ejb.
Note:
1. A valid ejb jar requires at least one session, entity (1.x/2.x
style), or message driven bean.
2. EJB3+ entity beans (@Entity) are POJOs and please package them as
library jar.
3. If the jar file contains valid EJBs which are annotated with EJB
component level annotations (@Stateless, @Stateful, @MessageDriven),
please check server.log to see whether the annotations were processed
properly.
com.sun.enterprise.deployment.backend.IASDeploymentException: Error
loading deployment descriptors for module [eBill] -- Invalid ejb jar
[eBill-ejb.jar]: it contains zero ejb.
Note:
1. A valid ejb jar requires at least one session, entity (1.x/2.x
style), or message driven bean.
2. EJB3+ entity beans (@Entity) are POJOs and please package them as
library jar.
3. If the jar file contains valid EJBs which are annotated with EJB
component level annotations (@Stateless, @Stateful, @MessageDriven),
please check server.log to see whether the annotations were processed
properly.
at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:406)
at com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:359)
at com.sun.enterprise.deployment.backend.AppDeployer.explodeArchive(AppDeployer.java:303)
at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:207)
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)
Caused by: java.lang.IllegalArgumentException: Invalid ejb jar
[eBill-ejb.jar]: it contains zero ejb.
Note:
1. A valid ejb jar requires at least one session, entity (1.x/2.x
style), or message driven bean.
2. EJB3+ entity beans (@Entity) are POJOs and please package them as
library jar.
3. If the jar file contains valid EJBs which are annotated with EJB
component level annotations (@Stateless, @Stateful, @MessageDriven),
please check server.log to see whether the annotations were processed
properly.
at com.sun.enterprise.deployment.util.EjbBundleValidator.accept(EjbBundleValidator.java:95)
at com.sun.enterprise.deployment.util.ApplicationValidator.accept(ApplicationValidator.java:82)
at com.sun.enterprise.deployment.EjbBundleDescriptor.visit(EjbBundleDescriptor.java:730)
at com.sun.enterprise.deployment.Application.visit(Application.java:1819)
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.validate(ApplicationArchivist.java:520)
at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:382)

On Wed, Sep 23, 2009 at 11:16 PM, Michael Bar-Sinai
<mich.barsinai@...> wrote:
>
> Hi Tom,
>
> The latest change was probably my bad - I left the weaving=static property in the persistence.xml file.
> The OS is Windows XP SP3, the VM is java 6 update 11. I'll try the directory structure weaving first thing in the morning.
>
> - Michael
>
>
_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Re: Can't deploy when using LAZY, can deply when using EAGER

by tware :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Michael,

   Using a recreation of your issue, I was able to see the problem occur.  My
initial look suggests that something about the environment GlassFish puts us in
for DDL generation is getting in the way of weaving.  Based on your suggestion
below, I removed the DDL generation tag and the recreation appears to deploy.
Can you try that?  (i.e. remove <property name="eclipselink.ddl-generation"
value="create-tables"/> completely from your persistence unit and see if your
deployment works)

   If that works, it suggests to me that there is a GlassFish issue here.  If
so, there are a few GlassFish engineers that watch this forum, so they may be
able to give you some help, but posting to the GlassFish forum will hit a wider
audience of Experts, the key points to mention are that you are deploying to
GlassFish 2.1 with EclipseLink, how you have EclipseLink packaged and that you
get an exception indicating weaving is not successful on DDL generation, but not
without DDL generation.

    If that does not work, I am more likely to be able to diagnose the problem
as it is more likely to be an EclipseLink issue.

Let me know,
Tom

BTW: It seems strange to me that you are packaging javaee.jar in your ear file.
    I would expect those classes to be available from any app server you
deployed on (in fact, glassfish has that very jar)

Michael Bar-sinai wrote:

> Well, the last change WAS my bad - when I removed the weaving=static
> flag from the persistence the recent problem (the class that was not
> mentioned initially) was fixed.
>
> Now for some good news: WE'VE GOT A WORKAROUND!
> 1. Make all the problematic relationship EAGER.
> 2. Add the <property name="eclipselink.ddl-generation"
> value="create-tables"/> to the property.xml file
> 3. Deploy
> 4. Change the relationships you want to LAZY
> 5. Remove the <property name="eclipselink.ddl-generation"
> value="create-tables"/> to the property.xml file
> 6. Deploy.
> done.
>
> As for the static weaver, I tried static weaving of the exploded
> structure. The static weaver seems to remove the
> @Stateless/@Stateful/@MessageDriven, as I get this message:
> Invalid ejb jar [eBill-ejb.jar]: it contains zero ejb.
> Note:
> 1. A valid ejb jar requires at least one session, entity (1.x/2.x
> style), or message driven bean.
> 2. EJB3+ entity beans (@Entity) are POJOs and please package them as
> library jar.
> 3. If the jar file contains valid EJBs which are annotated with EJB
> component level annotations (@Stateless, @Stateful, @MessageDriven),
> please check server.log to see whether the annotations were processed
> properly.
> com.sun.enterprise.deployment.backend.IASDeploymentException: Error
> loading deployment descriptors for module [eBill] -- Invalid ejb jar
> [eBill-ejb.jar]: it contains zero ejb.
> Note:
> 1. A valid ejb jar requires at least one session, entity (1.x/2.x
> style), or message driven bean.
> 2. EJB3+ entity beans (@Entity) are POJOs and please package them as
> library jar.
> 3. If the jar file contains valid EJBs which are annotated with EJB
> component level annotations (@Stateless, @Stateful, @MessageDriven),
> please check server.log to see whether the annotations were processed
> properly.
> at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:406)
> at com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:359)
> at com.sun.enterprise.deployment.backend.AppDeployer.explodeArchive(AppDeployer.java:303)
> at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:207)
> 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)
> Caused by: java.lang.IllegalArgumentException: Invalid ejb jar
> [eBill-ejb.jar]: it contains zero ejb.
> Note:
> 1. A valid ejb jar requires at least one session, entity (1.x/2.x
> style), or message driven bean.
> 2. EJB3+ entity beans (@Entity) are POJOs and please package them as
> library jar.
> 3. If the jar file contains valid EJBs which are annotated with EJB
> component level annotations (@Stateless, @Stateful, @MessageDriven),
> please check server.log to see whether the annotations were processed
> properly.
> at com.sun.enterprise.deployment.util.EjbBundleValidator.accept(EjbBundleValidator.java:95)
> at com.sun.enterprise.deployment.util.ApplicationValidator.accept(ApplicationValidator.java:82)
> at com.sun.enterprise.deployment.EjbBundleDescriptor.visit(EjbBundleDescriptor.java:730)
> at com.sun.enterprise.deployment.Application.visit(Application.java:1819)
> at com.sun.enterprise.deployment.archivist.ApplicationArchivist.validate(ApplicationArchivist.java:520)
> at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:382)
>
> On Wed, Sep 23, 2009 at 11:16 PM, Michael Bar-Sinai
> <mich.barsinai@...> wrote:
>> Hi Tom,
>>
>> The latest change was probably my bad - I left the weaving=static property in the persistence.xml file.
>> The OS is Windows XP SP3, the VM is java 6 update 11. I'll try the directory structure weaving first thing in the morning.
>>
>> - Michael
>>
>>
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@...
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Re: Can't deploy when using LAZY, can deply when using EAGER

by Michael Bar-Sinai :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Tom,
I've sent the issue to persistence@.... I'll keep
you up to date on this.

Michael

PS as for the javaee.jar, it's not needed for glassfish, but the build
scripts and Hudson do need it. I'm sure there's a better way of doing
this, though :-)

On Mon, Sep 28, 2009 at 4:42 PM, Tom Ware <tom.ware@...> wrote:

> Hi Michael,
>
>  Using a recreation of your issue, I was able to see the problem occur.  My
> initial look suggests that something about the environment GlassFish puts us
> in for DDL generation is getting in the way of weaving.  Based on your
> suggestion below, I removed the DDL generation tag and the recreation
> appears to deploy. Can you try that?  (i.e. remove <property
> name="eclipselink.ddl-generation" value="create-tables"/> completely from
> your persistence unit and see if your deployment works)
>
>  If that works, it suggests to me that there is a GlassFish issue here.  If
> so, there are a few GlassFish engineers that watch this forum, so they may
> be able to give you some help, but posting to the GlassFish forum will hit a
> wider audience of Experts, the key points to mention are that you are
> deploying to GlassFish 2.1 with EclipseLink, how you have EclipseLink
> packaged and that you get an exception indicating weaving is not successful
> on DDL generation, but not without DDL generation.
>
>   If that does not work, I am more likely to be able to diagnose the problem
> as it is more likely to be an EclipseLink issue.
>
> Let me know,
> Tom
>
> BTW: It seems strange to me that you are packaging javaee.jar in your ear
> file.   I would expect those classes to be available from any app server you
> deployed on (in fact, glassfish has that very jar)
>
> Michael Bar-sinai wrote:
>>
>> Well, the last change WAS my bad - when I removed the weaving=static
>> flag from the persistence the recent problem (the class that was not
>> mentioned initially) was fixed.
>>
>> Now for some good news: WE'VE GOT A WORKAROUND!
>> 1. Make all the problematic relationship EAGER.
>> 2. Add the <property name="eclipselink.ddl-generation"
>> value="create-tables"/> to the property.xml file
>> 3. Deploy
>> 4. Change the relationships you want to LAZY
>> 5. Remove the <property name="eclipselink.ddl-generation"
>> value="create-tables"/> to the property.xml file
>> 6. Deploy.
>> done.
>>
>> As for the static weaver, I tried static weaving of the exploded
>> structure. The static weaver seems to remove the
>> @Stateless/@Stateful/@MessageDriven, as I get this message:
>> Invalid ejb jar [eBill-ejb.jar]: it contains zero ejb.
>> Note:
>> 1. A valid ejb jar requires at least one session, entity (1.x/2.x
>> style), or message driven bean.
>> 2. EJB3+ entity beans (@Entity) are POJOs and please package them as
>> library jar.
>> 3. If the jar file contains valid EJBs which are annotated with EJB
>> component level annotations (@Stateless, @Stateful, @MessageDriven),
>> please check server.log to see whether the annotations were processed
>> properly.
>> com.sun.enterprise.deployment.backend.IASDeploymentException: Error
>> loading deployment descriptors for module [eBill] -- Invalid ejb jar
>> [eBill-ejb.jar]: it contains zero ejb.
>> Note:
>> 1. A valid ejb jar requires at least one session, entity (1.x/2.x
>> style), or message driven bean.
>> 2. EJB3+ entity beans (@Entity) are POJOs and please package them as
>> library jar.
>> 3. If the jar file contains valid EJBs which are annotated with EJB
>> component level annotations (@Stateless, @Stateful, @MessageDriven),
>> please check server.log to see whether the annotations were processed
>> properly.
>> at
>> com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:406)
>> at
>> com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:359)
>> at
>> com.sun.enterprise.deployment.backend.AppDeployer.explodeArchive(AppDeployer.java:303)
>> at
>> com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:207)
>> 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)
>> Caused by: java.lang.IllegalArgumentException: Invalid ejb jar
>> [eBill-ejb.jar]: it contains zero ejb.
>> Note:
>> 1. A valid ejb jar requires at least one session, entity (1.x/2.x
>> style), or message driven bean.
>> 2. EJB3+ entity beans (@Entity) are POJOs and please package them as
>> library jar.
>> 3. If the jar file contains valid EJBs which are annotated with EJB
>> component level annotations (@Stateless, @Stateful, @MessageDriven),
>> please check server.log to see whether the annotations were processed
>> properly.
>> at
>> com.sun.enterprise.deployment.util.EjbBundleValidator.accept(EjbBundleValidator.java:95)
>> at
>> com.sun.enterprise.deployment.util.ApplicationValidator.accept(ApplicationValidator.java:82)
>> at
>> com.sun.enterprise.deployment.EjbBundleDescriptor.visit(EjbBundleDescriptor.java:730)
>> at com.sun.enterprise.deployment.Application.visit(Application.java:1819)
>> at
>> com.sun.enterprise.deployment.archivist.ApplicationArchivist.validate(ApplicationArchivist.java:520)
>> at
>> com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:382)
>>
>> On Wed, Sep 23, 2009 at 11:16 PM, Michael Bar-Sinai
>> <mich.barsinai@...> wrote:
>>>
>>> Hi Tom,
>>>
>>> The latest change was probably my bad - I left the weaving=static
>>> property in the persistence.xml file.
>>> The OS is Windows XP SP3, the VM is java 6 update 11. I'll try the
>>> directory structure weaving first thing in the morning.
>>>
>>> - Michael
>>>
>>>
>> _______________________________________________
>> eclipselink-users mailing list
>> eclipselink-users@...
>> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@...
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Re: Can't deploy when using LAZY, can deply when using EAGER

by Michael Bar-Sinai :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Update (for future searchers):
The problem was found (kudos to Tom and Mitesh) to be an issue with Glassfish 2.1's PersistenceProcessor. The fix will go into GF 2.2. Another workaround will go into Eclipselink 2. Another workaround is described in previous mails.

Customers with paid support might be able to get a fix now (contact your support etc).

--Michael

_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Re: Can't deploy when using LAZY, can deply when using EAGER

by tch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

FYI I believe this bug appears in Jetty (The J2EE Preview) server used
in Eclipse as well. The previous work-arounds don't really work for
me, as I don't have any ddl generation turned on, changing the
relationship to eager fixed it, It is annoying though.

./tch



On Wed, Oct 21, 2009 at 12:33 AM, Michael Bar-sinai
<mich.barsinai@...> wrote:

> Update (for future searchers):
> The problem was found (kudos to Tom and Mitesh) to be an issue with
> Glassfish 2.1's PersistenceProcessor. The fix will go into GF 2.2. Another
> workaround will go into Eclipselink 2. Another workaround is described in
> previous mails.
> Customers with paid support might be able to get a fix now (contact your
> support etc).
> --Michael
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@...
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>
_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Re: Can't deploy when using LAZY, can deply when using EAGER

by tware :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Tim,

   The bug here is specific to GlassFish DDL generation.  Without DDL generation
enabled, if you are seeing an issue, it is likely something else.

   The fix added to EclipseLink mentioned below was simply to acknowledge an old
TopLink Essentials property that was being passed to EclipseLink prior to DDL
generation in order to work around the issue.

-Tom

Tim Hollosy wrote:

> FYI I believe this bug appears in Jetty (The J2EE Preview) server used
> in Eclipse as well. The previous work-arounds don't really work for
> me, as I don't have any ddl generation turned on, changing the
> relationship to eager fixed it, It is annoying though.
>
> ./tch
>
>
>
> On Wed, Oct 21, 2009 at 12:33 AM, Michael Bar-sinai
> <mich.barsinai@...> wrote:
>> Update (for future searchers):
>> The problem was found (kudos to Tom and Mitesh) to be an issue with
>> Glassfish 2.1's PersistenceProcessor. The fix will go into GF 2.2. Another
>> workaround will go into Eclipselink 2. Another workaround is described in
>> previous mails.
>> Customers with paid support might be able to get a fix now (contact your
>> support etc).
>> --Michael
>> _______________________________________________
>> eclipselink-users mailing list
>> eclipselink-users@...
>> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>>
>>
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@...
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Re: Can't deploy when using LAZY, can deply when using EAGER

by tch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Tom,
I did a search through the list and it looks  like this is some other
bug relating to using a PK as an FK to another entity, it has similar
results though with the odd weaved methods in the exception trace.

./tch



On Mon, Nov 9, 2009 at 1:54 PM, Tom Ware <tom.ware@...> wrote:

> Hi Tim,
>
>  The bug here is specific to GlassFish DDL generation.  Without DDL
> generation enabled, if you are seeing an issue, it is likely something else.
>
>  The fix added to EclipseLink mentioned below was simply to acknowledge an
> old TopLink Essentials property that was being passed to EclipseLink prior
> to DDL generation in order to work around the issue.
>
> -Tom
>
> Tim Hollosy wrote:
>>
>> FYI I believe this bug appears in Jetty (The J2EE Preview) server used
>> in Eclipse as well. The previous work-arounds don't really work for
>> me, as I don't have any ddl generation turned on, changing the
>> relationship to eager fixed it, It is annoying though.
>>
>> ./tch
>>
>>
>>
>> On Wed, Oct 21, 2009 at 12:33 AM, Michael Bar-sinai
>> <mich.barsinai@...> wrote:
>>>
>>> Update (for future searchers):
>>> The problem was found (kudos to Tom and Mitesh) to be an issue with
>>> Glassfish 2.1's PersistenceProcessor. The fix will go into GF 2.2.
>>> Another
>>> workaround will go into Eclipselink 2. Another workaround is described in
>>> previous mails.
>>> Customers with paid support might be able to get a fix now (contact your
>>> support etc).
>>> --Michael
>>> _______________________________________________
>>> eclipselink-users mailing list
>>> eclipselink-users@...
>>> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>>>
>>>
>> _______________________________________________
>> eclipselink-users mailing list
>> eclipselink-users@...
>> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@...
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
< Prev | 1 - 2 | Next >