| Summary: | non cacheable ManyToOne with JoinTable crashes | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Constantino Cronemberger <constantino.cronemberger> |
| Component: | Eclipselink | Assignee: | Project Inbox <eclipselink.orm-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P2 | CC: | constantino.cronemberger, peter.krogh, tom.ware |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
Do you still see the same problem if you upgrade to one of our 2.3.0 milestones. There has been some work done on cacheable in those milestones. (In reply to comment #1) > Do you still see the same problem if you upgrade to one of our 2.3.0 > milestones. There has been some work done on cacheable in those milestones. Hi, Using eclipselink-2.3.0.v20110429-r9282.jar I get a totally different problem. The application hangs at: MetadataAsmFactory$MetadataMethodVisitor.visitEnd:412 To make sure this problem is not related to the ManyToOne with JoinTable issue, I have removed all JoinTables and it still hangs. I left the application running overnight and it did not finish either. Last log lines were: 2011-05-13 08:03:49,217 DEBUG [main] - FINEST: property=eclipselink.jpa.uppercase-column-names; default value=false - org.eclipse.persistence.session.myTest.properties 2011-05-13 08:03:49,217 DEBUG [main] - FINER: Searching for default mapping file in file:/C:/project/war/WEB-INF/classes/ - org.eclipse.persistence.session.myTest 2011-05-13 08:03:49,748 DEBUG [main] - FINER: Searching for default mapping file in file:/C:/project/war/WEB-INF/classes/ - org.eclipse.persistence.session.myTest Regards, Constantino With version 2.3.0.v20110129-r8902 it works fine. I will try to identify why it is hanging with the latest version. Using eclipselink-2.3.0.v20110429-r9282.jar it hangs because of a class with the following annotations: import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; import javax.jws.WebService; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.ws.RequestWrapper; import javax.xml.ws.ResponseWrapper; that is not even related to JPA in my application. After I removed all those annotations from that class it worked. We have recent updated our byte-code weaver. That is likely what is causing yoru problem. I am targetting this bug for our 2.3.0 release. We will do out best to address this in the next week or so. The class causing the problem is:
package test.jpa;
import javax.jws.WebParam;
public interface BadInterface {
public void badMethod(@WebParam Object arg1, @WebParam Object arg2);
}
I am using static weaving.
I believe the the loop you are seeing is now resolved as of last nights label. The bug fix was for: https://bugs.eclipse.org/bugs/show_bug.cgi?id=345648 Please grab last night's build and try again. Thanks. The build I refer to with the fix is this one: http://www.eclipse.org/downloads/download.php?file=/rt/eclipselink/nightly/2.3.0/20110513/eclipselink-2.3.0.v20110513-r9376.zip Closing... please reopen if the fix does not work for you. The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |
Hi, In my application I have a legacy table that has a join table for a manyToOne relationship with another table. Since both tables can be changed by other processes I have configured them with "@Cacheable(false)". In the original version I was using (eclipselink-2.2.0-M5.jar) and it was working fine, but now when I tried to use version eclipselink-2.2.0.v20110202-r8913.jar it gives me the following exception: java.lang.NullPointerException at org.eclipse.persistence.mappings.ObjectReferenceMapping.collectQueryParameters(ObjectReferenceMapping.java:840) at org.eclipse.persistence.descriptors.ClassDescriptor.postInitialize(ClassDescriptor.java:3362) at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:467) at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:407) at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:680) at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:628) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:233) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:394) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:185) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:242) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:230) at com.db.dbLiquidity.BaseApplicationTest.initDatabase(BaseApplicationTest.java:125) at com.db.dbLiquidity.BaseApplicationTest.init(BaseApplicationTest.java:161) at com.db.dbLiquidity.BaseApplicationTest.<init>(BaseApplicationTest.java:79) at com.db.dbLiquidity.Procedure.<init>(Procedure.java:17) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:202) at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:251) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:248) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:422) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:931) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:785) I have managed to create a very small entity to reproduce this problem: @Entity @Cacheable(false) public class EntityA { private Long id; private EntityA entity; public EntityA() { } @Id public Long getId() { return this.id; } public void setId(Long id) { this.id = id; } @ManyToOne @JoinTable public EntityA getEntity() { return entity; } public void setEntity(EntityA entity) { this.entity = entity; } } Regards, Constantino.