Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Dynamic Weaving question

Hello

I tried dynamic weaving, starting tomcat with -javagent:...../eclipselink.jar and added <property name="eclipselink.weaving" value="true" /> to the persistence.xml file

But I get the following error:

Caused by: java.lang.NoClassDefFoundError: Could not initialize class *********.model.Characteristic
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:247)
at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(PrivilegedAccessHelper.java:88) at org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappings.getClassForName(XMLEntityMappings.java:120) at org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappings.getClassForName(XMLEntityMappings.java:157) at org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappings.initPersistenceUnitClasses(XMLEntityMappings.java:387) at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.initPersistenceUnitClasses(MetadataProcessor.java:189) at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processEntityMappings(MetadataProcessor.java:290) at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:267) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:766) at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:112) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)

What is causing the error?
When I set eclipselink.weaving to false, everything works fine.

Leon
Hello

In the documenation I read: "If the number of classes to weave is large or the time required to weave the classes is long, consider using static weaving."

But what is considered a large number of classes (10??,100??).
And how do I know if the time required to weave the classes is long?

And do I have to start Tomcat with -javaagent:eclipselink-agent.jar to enable dynamic weaving?

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





Back to the top