I've been spending some time lately trying to get JDO annotations to
play nicely with Scala and the AppEngine but I have had no real
success because I continue to get a VerifyError when running the
application using dev_appserver or when using it on appspot if the
annotations are on the Scala class and the enhancement has been
executed. Even if I try to run the enhancement a second time without
deleting the .class files I get an error.
However, if I create Java class with the same annotations everything
will run fine (data is stored).
On Sun, Apr 26, 2009 at 8:39 AM, bryanjswift <bryan.j.sw...@gmail.com> wrote:
> I've been spending some time lately trying to get JDO annotations to > play nicely with Scala and the AppEngine but I have had no real > success because I continue to get a VerifyError when running the > application using dev_appserver or when using it on appspot if the > annotations are on the Scala class and the enhancement has been > executed.
It is a known problem[1], and it has been fixed in datanucleus-enhancer-1.1.2.jar[2]. In fact, I have successed to use JPA on Scala/Lift.
Download that jar file and locate it under appengine-java-sdk-1.2.0/lib/tools/orm/ It seems we need to rename(or delte) older version; datanucleus-enhancer-1.1.0.jar .
i downloaded
datanucleus-jpa-1.1.2.jar,datanucleus-core-1.1.2.jar,datanucleus-
enhancer-1.1.2.jar ,put them into appengine-java-sdk-1.2.0 and remove
the old 3 lib version 1.0.0,there is an error:
java.lang.NoClassDefFoundError: Could not initialize class
org.datanucleus.store.appengine.query.DatastoreQuery
at org.datanucleus.store.appengine.query.JPQLQuery.<init>
(JPQLQuery.java:66)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at
org.datanucleus.plugin.NonManagedPluginRegistry.createExecutableExtension
(NonManagedPluginRegistry.java:576)
at org.datanucleus.plugin.PluginManager.createExecutableExtension
(PluginManager.java:324)
at org.datanucleus.store.query.QueryManager.newQuery
(QueryManager.java:132)
at org.datanucleus.jpa.EntityManagerImpl.createQuery
(EntityManagerImpl.java:721)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.orm.jpa.ExtendedEntityManagerCreator
$ExtendedEntityManagerInvocationHandler.invoke
(ExtendedEntityManagerCreator.java:358)
at $Proxy9.createQuery(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.orm.jpa.JpaTemplate
$CloseSuppressingInvocationHandler.invoke(JpaTemplate.java:404)
at $Proxy10.createQuery(Unknown Source)
at jpa.E1Dao$1.doInJpa(E1Dao.java:37)
at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:
184)
at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:
147)
at jpa.E1Dao.loadAll(E1Dao.java:32)
at jpa.E1Dao$$FastClassByCGLIB$$34789f93.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.springframework.aop.framework.Cglib2AopProxy
$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
(ReflectiveMethodInvocation.java:149)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke
(TransactionInterceptor.java:106)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
(ReflectiveMethodInvocation.java:171)
at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke
(ExposeInvocationInterceptor.java:89)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.Cglib2AopProxy
$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635)
at jpa.E1Dao$$EnhancerByCGLIB$$98519cba.loadAll(<generated>)
at Env.LocalDatastoreTestCase.testE1Jpa(LocalDatastoreTestCase.java:
50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.junit.internal.runners.OldTestClassRunner.run
(OldTestClassRunner.java:76)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run
(JUnit4TestReference.java:45)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run
(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run
(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main
(RemoteTestRunner.java:196)
On Apr 26, 8:23 am, Atsuhiko Yamanaka <atsuhiko.yaman...@gmail.com>
wrote:
> On Sun, Apr 26, 2009 at 8:39 AM, bryanjswift <bryan.j.sw...@gmail.com> wrote:
> > I've been spending some time lately trying to get JDO annotations to
> > play nicely with Scala and the AppEngine but I have had no real
> > success because I continue to get a VerifyError when running the
> > application using dev_appserver or when using it on appspot if the
> > annotations are on the Scala class and the enhancement has been
> > executed.
> It is a known problem[1], and it has been fixed in
> datanucleus-enhancer-1.1.2.jar[2].
> In fact, I have successed to use JPA on Scala/Lift.
> Download that jar file and locate it under
> appengine-java-sdk-1.2.0/lib/tools/orm/
> It seems we need to rename(or delte) older version;
> datanucleus-enhancer-1.1.0.jar .
On Mon, Apr 27, 2009 at 8:49 PM, Coonay <fla...@gmail.com> wrote:
> i downloaded
> datanucleus-jpa-1.1.2.jar,datanucleus-core-1.1.2.jar,datanucleus-
> enhancer-1.1.2.jar ,put them into appengine-java-sdk-1.2.0 and remove
> the old 3 lib version 1.0.0,there is an error:
> java.lang.NoClassDefFoundError: Could not initialize class
> org.datanucleus.store.appengine.query.DatastoreQuery
> at org.datanucleus.store.appengine.query.JPQLQuery.<init>
> (JPQLQuery.java:66)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
> Source)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
> Source)
> at java.lang.reflect.Constructor.newInstance(Unknown Source)
> at
> org.datanucleus.plugin.NonManagedPluginRegistry.createExecutableExtension
> (NonManagedPluginRegistry.java:576)
> at org.datanucleus.plugin.PluginManager.createExecutableExtension
> (PluginManager.java:324)
> at org.datanucleus.store.query.QueryManager.newQuery
> (QueryManager.java:132)
> at org.datanucleus.jpa.EntityManagerImpl.createQuery
> (EntityManagerImpl.java:721)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.springframework.orm.jpa.ExtendedEntityManagerCreator
> $ExtendedEntityManagerInvocationHandler.invoke
> (ExtendedEntityManagerCreator.java:358)
> at $Proxy9.createQuery(Unknown Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.springframework.orm.jpa.JpaTemplate
> $CloseSuppressingInvocationHandler.invoke(JpaTemplate.java:404)
> at $Proxy10.createQuery(Unknown Source)
> at jpa.E1Dao$1.doInJpa(E1Dao.java:37)
> at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:
> 184)
> at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:
> 147)
> at jpa.E1Dao.loadAll(E1Dao.java:32)
> at jpa.E1Dao$$FastClassByCGLIB$$34789f93.invoke(<generated>)
> at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
> at org.springframework.aop.framework.Cglib2AopProxy
> $CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
> (ReflectiveMethodInvocation.java:149)
> at
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke
> (TransactionInterceptor.java:106)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
> (ReflectiveMethodInvocation.java:171)
> at
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke
> (ExposeInvocationInterceptor.java:89)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
> (ReflectiveMethodInvocation.java:171)
> at org.springframework.aop.framework.Cglib2AopProxy
> $DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635)
> at jpa.E1Dao$$EnhancerByCGLIB$$98519cba.loadAll(<generated>)
> at Env.LocalDatastoreTestCase.testE1Jpa(LocalDatastoreTestCase.java:
> 50)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at junit.framework.TestCase.runTest(TestCase.java:168)
> at junit.framework.TestCase.runBare(TestCase.java:134)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:124)
> at junit.framework.TestSuite.runTest(TestSuite.java:232)
> at junit.framework.TestSuite.run(TestSuite.java:227)
> at org.junit.internal.runners.OldTestClassRunner.run
> (OldTestClassRunner.java:76)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run
> (JUnit4TestReference.java:45)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run
> (TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
> (RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
> (RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run
> (RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main
> (RemoteTestRunner.java:196)
> > On Sun, Apr 26, 2009 at 8:39 AM, bryanjswift <bryan.j.sw...@gmail.com>
> wrote:
> > > I've been spending some time lately trying to get JDO annotations to
> > > play nicely with Scala and the AppEngine but I have had no real
> > > success because I continue to get a VerifyError when running the
> > > application using dev_appserver or when using it on appspot if the
> > > annotations are on the Scala class and the enhancement has been
> > > executed.
> > It is a known problem[1], and it has been fixed in
> > datanucleus-enhancer-1.1.2.jar[2].
> > In fact, I have successed to use JPA on Scala/Lift.
> > Download that jar file and locate it under
> > appengine-java-sdk-1.2.0/lib/tools/orm/
> > It seems we need to rename(or delte) older version;
> > datanucleus-enhancer-1.1.0.jar .