522 words

Unexpected NoSuchFieldError exception

#1
2017-02-24 02:45

Hi, suddenly running into a number of issues:
 

1) no-arg constructor (error 352)

2) java.lang.NoSuchFieldError: __odbTracker

3) Attempt to start a transaction while another transaction is running.

In each case, I've found it difficult to figure out where to find the right documentation.

Below is an example that has #1 and #2 together.

Additionally it's not clear how I find out whether configuration settings have been found (e.g. is it possible to print out the config that ObjectDB is using, ie: in case it hasn't found the right config file).

 

 

[ObjectDB 2.6.9_09] javax.persistence.PersistenceException
Failed to construct an instance of app.model.Person using a no-arg constructor (error 352)
at com.objectdb.jpa.JpaQuery.getResultList(JpaQuery.java:728)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.MethodMetaProperty$GetBeanMethodMetaProperty.getProperty(MethodMetaProperty.java:76)
at org.codehaus.groovy.runtime.callsite.GetEffectivePojoPropertySite.getProperty(GetEffectivePojoPropertySite.java:64)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:296)
at app.database.ObjectDbDatabase.delete_all_entities(ObjectDbDatabase.groovy:69)
at app.framework.Database$delete_all_entities$0.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at app.AuServerRedis.create_db(AuServerRedis.groovy:82)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:384)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1027)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:158)
at app.AuServerRedis$__clinit__closure1.doCall(AuServerRedis.groovy:72)
at app.AuServerRedis$__clinit__closure1.doCall(AuServerRedis.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1027)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at app.database.ObjectDbDatabase.transact(ObjectDbDatabase.groovy:82)
at app.framework.Database$transact.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at app.AuServerRedis.<clinit>(AuServerRedis.groovy:71)
Caused by: com.objectdb.o.UserException: Failed to construct an instance of app.model.Person using a no-arg constructor
at com.objectdb.o.MSG.d(MSG.java:75)
at com.objectdb.o.UTY.newInstance(UTY.java:1262)
at com.objectdb.o.OBC.aM(OBC.java:949)
at com.objectdb.o.OBC.UZ(OBC.java:798)
at com.objectdb.o.SRB.l(SRB.java:160)
at com.objectdb.o.QRR.m(QRR.java:549)
at com.objectdb.o.QRR.f(QRR.java:212)
at com.objectdb.jpa.JpaQuery.getResultList(JpaQuery.java:719)
... 47 more
Caused by: com.objectdb.o.UserException: Failed to construct an instance of app.model.Person using a no-arg constructor
at com.objectdb.o.MSG.d(MSG.java:75)
at com.objectdb.o.TYH.X(TYH.java:967)
at com.objectdb.o.UTY.newInstance(UTY.java:1258)
... 53 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at com.objectdb.o.TYH.X(TYH.java:963)
... 54 more
Caused by: java.lang.NoSuchFieldError: __odbTracker
at app.model.Person.__odbSet_contact_information(common-model.groovy:1)
at app.model.Person.<init>(common-model.groovy:254)
... 59 more
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: com.objectdb.o._PersistenceException: Failed to construct an instance of app.model.Person using a no-arg constructor
at com.objectdb.o._PersistenceException.b(_PersistenceException.java:45)
at com.objectdb.o.JPE.g(JPE.java:145)
at com.objectdb.o.ERR.f(ERR.java:56)
at com.objectdb.o.OBC.onObjectDBError(OBC.java:1556)
at com.objectdb.jpa.JpaQuery.getResultList(JpaQuery.java:728)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.MethodMetaProperty$GetBeanMethodMetaProperty.getProperty(MethodMetaProperty.java:76)
at org.codehaus.groovy.runtime.callsite.GetEffectivePojoPropertySite.getProperty(GetEffectivePojoPropertySite.java:64)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:296)
at app.database.ObjectDbDatabase.delete_all_entities(ObjectDbDatabase.groovy:69)
at app.framework.Database$delete_all_entities$0.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at app.AuServerRedis.create_db(AuServerRedis.groovy:82)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:384)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1027)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:158)
at app.AuServerRedis$__clinit__closure1.doCall(AuServerRedis.groovy:72)
at app.AuServerRedis$__clinit__closure1.doCall(AuServerRedis.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1027)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at app.database.ObjectDbDatabase.transact(ObjectDbDatabase.groovy:82)
at app.framework.Database$transact.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at app.AuServerRedis.<clinit>(AuServerRedis.groovy:71)
Caused by: com.objectdb.o.UserException: Failed to construct an instance of app.model.Person using a no-arg constructor
at com.objectdb.o.MSG.d(MSG.java:75)
at com.objectdb.o.UTY.newInstance(UTY.java:1262)
at com.objectdb.o.OBC.aM(OBC.java:949)
at com.objectdb.o.OBC.UZ(OBC.java:798)
at com.objectdb.o.SRB.l(SRB.java:160)
at com.objectdb.o.QRR.m(QRR.java:549)
at com.objectdb.o.QRR.f(QRR.java:212)
at com.objectdb.jpa.JpaQuery.getResultList(JpaQuery.java:719)
... 47 more
Caused by: com.objectdb.o.UserException: Failed to construct an instance of app.model.Person using a no-arg constructor
at com.objectdb.o.MSG.d(MSG.java:75)
at com.objectdb.o.TYH.X(TYH.java:967)
at com.objectdb.o.UTY.newInstance(UTY.java:1258)
... 53 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at com.objectdb.o.TYH.X(TYH.java:963)
... 54 more
Caused by: java.lang.NoSuchFieldError: __odbTracker
at app.model.Person.__odbSet_contact_information(common-model.groovy:1)
at app.model.Person.<init>(common-model.groovy:254)
... 59 more

dmoshal
dmoshal's picture
Joined on 2010-05-22
User Post #111
#2
2017-02-24 02:56

And here is an example of error #3 above: transaction is active.

So, for some reason, I'm getting these 3 errors repeatedly.

David


 

[ObjectDB 2.6.9_09] javax.persistence.PersistenceException
Attempt to begin a new transaction when a transaction is active (error 612)
at com.objectdb.jpa.EMImpl.begin(EMImpl.java:275)
at javax.persistence.EntityTransaction$begin.call(Unknown Source)
at app.database.ObjectDbDatabase.transact(ObjectDbDatabase.groovy:81)
at app.framework.Database$transact.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at app.framework.Request_Executor.execute(Request_Executor.groovy:19)
at app.framework.Request_Executor$execute.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
at app.AuServerRedis$_start_heartbeat_closure2.doCall(AuServerRedis.groovy:135)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1027)
at groovy.lang.Closure.call(Closure.java:414)
at TimerTask1_groovyProxy.run(Unknown Source)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Caused by: com.objectdb.o.UserException: Attempt to begin a new transaction when a transaction is active
at com.objectdb.o.MSG.d(MSG.java:62)
at com.objectdb.o.OBC.D(OBC.java:1513)
at com.objectdb.o.OBM.bL(OBM.java:719)
at com.objectdb.jpa.EMImpl.begin(EMImpl.java:272)
... 24 more
Exception in thread "Timer-0" [ObjectDB 2.6.9_09] javax.persistence.PersistenceException
Attempt to begin a new transaction when a transaction is active (error 612)
at com.objectdb.jpa.EMImpl.begin(EMImpl.java:275)
at javax.persistence.EntityTransaction$begin.call(Unknown Source)
at app.database.ObjectDbDatabase.transact(ObjectDbDatabase.groovy:81)
at app.framework.Database$transact.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at app.framework.Request_Executor.execute(Request_Executor.groovy:19)
at app.framework.Request_Executor$execute.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
at app.AuServerRedis$_start_heartbeat_closure2.doCall(AuServerRedis.groovy:135)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1027)
at groovy.lang.Closure.call(Closure.java:414)
at TimerTask1_groovyProxy.run(Unknown Source)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Caused by: com.objectdb.o.UserException: Attempt to begin a new transaction when a transaction is active
at com.objectdb.o.MSG.d(MSG.java:62)
at com.objectdb.o.OBC.D(OBC.java:1513)
at com.objectdb.o.OBM.bL(OBM.java:719)
at com.objectdb.jpa.EMImpl.begin(EMImpl.java:272)
... 24 more

dmoshal
dmoshal's picture
Joined on 2010-05-22
User Post #112
#3
2017-02-24 09:51

Try rebuild and enhance of all your classes, as the error messages indicates a broken enhancement (e.g. some classes in a class hierarchy are enhanced some are not, which is not allowed).

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #2,705

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Attachments:
Maximum file size: 32 MB
Cancel