NoSuchMethodError due to EclipseLink internal weaving? [message #1703772] |
Tue, 04 August 2015 20:26 |
Doug Gschwind Messages: 17 Registered: April 2012 |
Junior Member |
|
|
Hello everyone,
We are using EclipseLink 2.6.0 and are seeing a weird error that appears to be resolved by setting the value for the PersistenceUnitProperties.WEAVING_INTERNAL property to false in the EntityManagerFactory definition.
A little background on our JPA mapped entities in play here. We have a concrete class called CareTeam that extends a MappedSuperclass called AuditedEntity, and AuditedEntity extends another MappedSuperclass called IdentifiedEntity. We have plenty of classes that extend either IdentifiedEntity or AuditedEntity without issue thus far in our three or so months of using EclipseLink 2.6.0. So, this doesn't pear to be due to AuditedEntity or IdentifiedEntity. The CareTeam class is a simple concrete Entity that extends AuditedEntity and it has a default public no args constructor, as does the AuditedEntity class, contrary to what the stack trace below might lead you to believe.
If we do not set this property, we see a stack trace of the following form at runtime, at the time a request is being serviced, not at runtime initialization time :
2015-08-03 22:16:04.334 RI: dd39a3d4-7e5a-42bb-beb9-09249df66031 ERROR http-bio-8780-exec-1 BaseExceptionMapper - Service invocation failure :
java.lang.NoSuchMethodError: com.company.db.jpa.AuditedEntity.<init>(Lorg/eclipse/persistence/internal/descriptors/PersistenceObject;)V
at com.company.careteamservice.beans.CareTeam.<init>(CareTeam.java)
at com.company.careteamservice.beans.CareTeam._persistence_new(CareTeam.java)
at org.eclipse.persistence.internal.descriptors.PersistenceObjectInstantiationPolicy.buildNewInstance(PersistenceObjectInstantiationPolicy.java:33)
at org.eclipse.persistence.descriptors.ClassDescriptor.selfValidationAfterInitialization(ClassDescriptor.java:4230)
at org.eclipse.persistence.descriptors.ClassDescriptor.validateAfterInitialization(ClassDescriptor.java:6099)
at org.eclipse.persistence.descriptors.ClassDescriptor.postInitialize(ClassDescriptor.java:3915)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:692)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:637)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:568)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:804)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:761)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:255)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:728)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:205)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:305)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:337)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:303)
at org.springframework.orm.jpa.JpaTransactionManager.createEntityManagerForTransaction(JpaTransactionManager.java:449)
at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:369)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:373)
at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:463)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:276)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:653)
I have a few questions to pose to the forum :
1) Is this a known issue with EclipseLink 2.6.0?
2) We wish to use load time weaving, so is it possible that this change will compromise the behavior of load time weaving in some way?
Thanks, Doug
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03614 seconds