I'll try to make some time to look at this today... Is it possible to put OpenJPA under your test to narrow down where the problem is (plugin vs OpenJPA)?
Thanks, Rick On Thu, Mar 24, 2011 at 3:44 PM, Todd Nine <t...@spidertracks.com> wrote: > Here you go Rick. > > > https://github.com/riptano/hector-jpa/blob/master/src/test/java/com/datastax/hectorjpa/store/ManyToOneIndexTest.java > > > In order to get this to run locally, you'll need these 2 projects as well. > > https://github.com/rantav/hector > > the hector-core sub module branch 0.7.0 latest HEAD > > https://github.com/riptano/hector-composite > > latest master. > > It seems to be intermittent and possibly a race condition. I only get it > when running it on my i7 workstation at work. On my core 2 duo MBP it's > not an issue. > > Thanks, > > -- > todd > SENIOR SOFTWARE ENGINEER > > todd nine| spidertracks ltd | 117a the square > po box 5203 | palmerston north 4441 | new zealand > P: +64 6 353 3395 > E: t...@spidertracks.co.nz W: www.spidertracks.com > > > > > > > On Thu, 2011-03-24 at 09:22 -0500, Rick Curtis wrote: > > Todd - > > Can you post your unit test / Entities? > > Thanks, > Rick > > On Thu, Mar 24, 2011 at 12:00 AM, Todd Nine <t...@spidertracks.com> > wrote: > > Hey guys, > I have all my plugin tests passing except for one. I'm not sure if > it's a bug in OpenJPA or in my code. When I'm recursively fetching > entities, I will occasionally get this error. > > <openjpa-2.1.0-r422266:1071316 nonfatal general error> > org.apache.openjpa.util.GeneralException: null > at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:1003) > at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:897) > at > com.datastax.hectorjpa.meta.ToOneColumn.readField(ToOneColumn.java:127) > at > > com.datastax.hectorjpa.store.EntityFacade.loadColumns(EntityFacade.java:237) > at > > com.datastax.hectorjpa.store.CassandraStore.getObject(CassandraStore.java:97) > at > > com.datastax.hectorjpa.store.CassandraStoreManager.load(CassandraStoreManager.java:160) > at > > org.apache.openjpa.kernel.DelegatingStoreManager.load(DelegatingStoreManager.java:117) > at > org.apache.openjpa.kernel.ROPStoreManager.load(ROPStoreManager.java:78) > at > > org.apache.openjpa.kernel.StateManagerImpl.loadFields(StateManagerImpl.java:3061) > at > > org.apache.openjpa.kernel.StateManagerImpl.loadField(StateManagerImpl.java:3135) > at > > org.apache.openjpa.kernel.StateManagerImpl.dirty(StateManagerImpl.java:1738) > at > > org.apache.openjpa.kernel.StateManagerImpl.dirty(StateManagerImpl.java:1628) > at > > org.apache.openjpa.kernel.StateManagerImpl.dirtyCheck(StateManagerImpl.java:915) > at > org.apache.openjpa.kernel.ManagedCache.dirtyCheck(ManagedCache.java:302) > at > > org.apache.openjpa.kernel.BrokerImpl.hasTransactionalObjects(BrokerImpl.java:4029) > at > org.apache.openjpa.kernel.BrokerImpl.addToTransaction(BrokerImpl.java:4101) > at > > org.apache.openjpa.kernel.StateManagerImpl.setPCState(StateManagerImpl.java:274) > at > > org.apache.openjpa.kernel.StateManagerImpl.initialize(StateManagerImpl.java:381) > at > > org.apache.openjpa.kernel.StateManagerImpl.initialize(StateManagerImpl.java:333) > at > > com.datastax.hectorjpa.store.CassandraStoreManager.initialize(CassandraStoreManager.java:143) > at > > org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:112) > at > > org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57) > at > org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:1022) > at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:980) > at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:897) > at > com.datastax.hectorjpa.meta.ToOneColumn.readField(ToOneColumn.java:127) > at > > com.datastax.hectorjpa.store.EntityFacade.loadColumns(EntityFacade.java:237) > at > > com.datastax.hectorjpa.store.CassandraStore.getObject(CassandraStore.java:97) > at > > com.datastax.hectorjpa.store.CassandraStoreManager.load(CassandraStoreManager.java:160) > at > > org.apache.openjpa.kernel.DelegatingStoreManager.load(DelegatingStoreManager.java:117) > at > org.apache.openjpa.kernel.ROPStoreManager.load(ROPStoreManager.java:78) > at > > org.apache.openjpa.kernel.StateManagerImpl.loadFields(StateManagerImpl.java:3061) > at > > org.apache.openjpa.kernel.StateManagerImpl.loadField(StateManagerImpl.java:3135) > at > > org.apache.openjpa.kernel.StateManagerImpl.dirty(StateManagerImpl.java:1738) > at > > org.apache.openjpa.kernel.StateManagerImpl.dirty(StateManagerImpl.java:1628) > at > > org.apache.openjpa.kernel.StateManagerImpl.dirtyCheck(StateManagerImpl.java:915) > at > org.apache.openjpa.kernel.ManagedCache.dirtyCheck(ManagedCache.java:302) > at > > org.apache.openjpa.kernel.BrokerImpl.hasTransactionalObjects(BrokerImpl.java:4029) > at > org.apache.openjpa.kernel.BrokerImpl.addToTransaction(BrokerImpl.java:4101) > at > > org.apache.openjpa.kernel.StateManagerImpl.setPCState(StateManagerImpl.java:274) > at > > org.apache.openjpa.kernel.StateManagerImpl.initialize(StateManagerImpl.java:381) > at > > org.apache.openjpa.kernel.StateManagerImpl.initialize(StateManagerImpl.java:333) > at > > com.datastax.hectorjpa.store.CassandraStoreManager.initialize(CassandraStoreManager.java:143) > at > > org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:112) > at > > org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57) > at > org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:1022) > at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:980) > at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:897) > at > com.datastax.hectorjpa.meta.ToOneColumn.readField(ToOneColumn.java:127) > at > > com.datastax.hectorjpa.store.EntityFacade.loadColumns(EntityFacade.java:237) > at > > com.datastax.hectorjpa.store.CassandraStore.getObject(CassandraStore.java:97) > at > > com.datastax.hectorjpa.store.CassandraStoreManager.load(CassandraStoreManager.java:160) > at > > org.apache.openjpa.kernel.DelegatingStoreManager.load(DelegatingStoreManager.java:117) > at > org.apache.openjpa.kernel.ROPStoreManager.load(ROPStoreManager.java:78) > at > > org.apache.openjpa.kernel.StateManagerImpl.loadFields(StateManagerImpl.java:3061) > at > > org.apache.openjpa.kernel.StateManagerImpl.loadField(StateManagerImpl.java:3135) > at > > org.apache.openjpa.kernel.StateManagerImpl.dirty(StateManagerImpl.java:1738) > at > > org.apache.openjpa.kernel.StateManagerImpl.dirty(StateManagerImpl.java:1628) > at > > org.apache.openjpa.kernel.StateManagerImpl.dirtyCheck(StateManagerImpl.java:915) > at > org.apache.openjpa.kernel.ManagedCache.dirtyCheck(ManagedCache.java:302) > at > > org.apache.openjpa.kernel.BrokerImpl.hasTransactionalObjects(BrokerImpl.java:4029) > at > org.apache.openjpa.kernel.BrokerImpl.setDirty(BrokerImpl.java:4146) > at > > org.apache.openjpa.kernel.StateManagerImpl.setPCState(StateManagerImpl.java:278) > at > > org.apache.openjpa.kernel.StateManagerImpl.dirty(StateManagerImpl.java:1701) > at > > org.apache.openjpa.kernel.StateManagerImpl.dirty(StateManagerImpl.java:1628) > at > > org.apache.openjpa.kernel.StateManagerImpl.dirtyCheck(StateManagerImpl.java:915) > at > org.apache.openjpa.kernel.ManagedCache.dirtyCheck(ManagedCache.java:302) > at > > org.apache.openjpa.kernel.BrokerImpl.hasTransactionalObjects(BrokerImpl.java:4029) > at > org.apache.openjpa.kernel.BrokerImpl.addToTransaction(BrokerImpl.java:4101) > at > > org.apache.openjpa.kernel.StateManagerImpl.setPCState(StateManagerImpl.java:274) > at > > org.apache.openjpa.kernel.StateManagerImpl.initialize(StateManagerImpl.java:381) > at > > org.apache.openjpa.kernel.StateManagerImpl.initialize(StateManagerImpl.java:333) > at > > com.datastax.hectorjpa.store.CassandraStoreManager.initialize(CassandraStoreManager.java:143) > at > > org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:112) > at > > org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57) > at > org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:1022) > at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:980) > at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:897) > at > com.datastax.hectorjpa.meta.ToOneColumn.readField(ToOneColumn.java:127) > at > > com.datastax.hectorjpa.store.EntityFacade.loadColumns(EntityFacade.java:237) > at > > com.datastax.hectorjpa.store.CassandraStore.getObject(CassandraStore.java:97) > at > > com.datastax.hectorjpa.store.CassandraStoreManager.initialize(CassandraStoreManager.java:145) > at > > org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:112) > at > > org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57) > at > org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:1022) > at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:980) > at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:897) > at > > com.datastax.hectorjpa.meta.collection.OrderedCollectionField.readField(OrderedCollectionField.java:123) > at > > com.datastax.hectorjpa.store.EntityFacade.loadColumns(EntityFacade.java:213) > at > > com.datastax.hectorjpa.store.CassandraStore.getObject(CassandraStore.java:97) > at > > com.datastax.hectorjpa.store.CassandraStoreManager.load(CassandraStoreManager.java:160) > at > > org.apache.openjpa.kernel.DelegatingStoreManager.load(DelegatingStoreManager.java:117) > at > org.apache.openjpa.kernel.ROPStoreManager.load(ROPStoreManager.java:78) > at > > org.apache.openjpa.kernel.StateManagerImpl.loadFields(StateManagerImpl.java:3061) > at > > org.apache.openjpa.kernel.StateManagerImpl.loadField(StateManagerImpl.java:3135) > at > > org.apache.openjpa.kernel.StateManagerImpl.fetchObjectField(StateManagerImpl.java:2383) > at > > org.apache.openjpa.kernel.StateManagerImpl.fetchField(StateManagerImpl.java:865) > at > org.apache.openjpa.kernel.StateManagerImpl.fetch(StateManagerImpl.java:827) > at org.apache.openjpa.enhance.RedefinitionHelper > $1.invoke(RedefinitionHelper.java:230) > at $Proxy20.get(Unknown Source) > at > > com.datastax.hectorjpa.store.ManyToOneIndexTest.basicFollowingDelete(ManyToOneIndexTest.java:203) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.junit.runners.model.FrameworkMethod > $1.runReflectiveCall(FrameworkMethod.java:44) > at > > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) > at > > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) > at > > org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) > 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.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) > at org.junit.runners.ParentRunner.run(ParentRunner.java:236) > at > > org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49) > at > > org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) > at > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) > at > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) > at > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) > at > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) > Caused by: java.util.ConcurrentModificationException > at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793) > at java.util.HashMap$KeyIterator.next(HashMap.java:828) > at > org.apache.openjpa.kernel.ManagedCache.dirtyCheck(ManagedCache.java:301) > at > > org.apache.openjpa.kernel.BrokerImpl.hasTransactionalObjects(BrokerImpl.java:4029) > at > org.apache.openjpa.kernel.BrokerImpl.addToTransaction(BrokerImpl.java:4101) > at > > org.apache.openjpa.kernel.StateManagerImpl.setPCState(StateManagerImpl.java:274) > at > > org.apache.openjpa.kernel.StateManagerImpl.initialize(StateManagerImpl.java:381) > at > > org.apache.openjpa.kernel.StateManagerImpl.initialize(StateManagerImpl.java:333) > at > > com.datastax.hectorjpa.store.CassandraStoreManager.initialize(CassandraStoreManager.java:143) > at > > org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:112) > at > > org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57) > at > org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:1022) > at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:980) > ... 123 more > > > > I don't get it when running in debug mode, so I think it's some sort of > race condition. Any ideas what I'm doing wrong in my code? Also, with > collection proxies created using OpenJPAStateManager.newProxyField(int > id), I'll occasionally have fields that have been removed from the > collection, but aren't returned via the change tracker's getRemoved(). > Is this a know issue? > > Thanks, > Todd > -- > todd > SENIOR SOFTWARE ENGINEER > > todd nine| spidertracks ltd | 117a the square > po box 5203 | palmerston north 4441 | new zealand > P: +64 6 353 3395 > E: t...@spidertracks.co.nz W: www.spidertracks.com > > > > > > > >