Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » NoSuchMethodError due to EclipseLink internal weaving?(NoSuchMethodError due to EclipseLink internal weaving?)
NoSuchMethodError due to EclipseLink internal weaving? [message #1703772] Tue, 04 August 2015 20:26 Go to next message
Doug Gschwind is currently offline Doug GschwindFriend
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

Re: NoSuchMethodError due to EclipseLink internal weaving? [message #1703956 is a reply to message #1703772] Thu, 06 August 2015 07:40 Go to previous messageGo to next message
Lukas JungmannFriend
Messages: 34
Registered: November 2013
Location: Prague, Czech Republic
Member
Hi,

we saw some reports mentioning this but we are unable to reproduce this issue. If you have some simple, self contained, easy to run test case for this then go ahead, file a bug[1] and attach the test there, please.

Thanks,
--lukas

[1]: https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EclipseLink&component=JPA&version=2.6.0
Re: NoSuchMethodError due to EclipseLink internal weaving? [message #1704170 is a reply to message #1703956] Fri, 07 August 2015 20:34 Go to previous message
Doug Gschwind is currently offline Doug GschwindFriend
Messages: 17
Registered: April 2012
Junior Member
Hi Lukas,

Thanks for the response. We don't have a means to extract the code that causing this behavior into a simple test case, but would have been happy to do so otherwise. We are using Tomcat, Spring, no persistence.xml file, Spring to create the EntityManagerFactory from Java configuration.

We wish to use load time weaving, so is it possible that setting internal weaving to false will compromise JPA entity behavior of overall load time weaving in some way?

Thanks, Doug

Previous Topic:[Moxy] setValidating is throwing an exception when used on DynamicContext
Next Topic:Persistance external File JPA
Goto Forum:
  


Current Time: Sun Feb 28 12:40:43 GMT 2021

Powered by FUDForum. Page generated in 0.01547 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top