openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <plins...@gmail.com>
Subject Re: Problems migrating to 1.0
Date Wed, 22 Aug 2007 06:35:40 GMT
Hi,

If we can't get this sorted out soon, we should probably re-build a
release (again) with ManagedClassSubclasser:90 turned into a warning
instead of an exception.

-Patrick

On 8/21/07, Patrick Linskey <plinskey@gmail.com> wrote:
> Hi,
>
> The code in ManagedClassSubclasser checks to see if
> PersistenceCapable.class is assignable from each of the classes that
> you pass in. Are you certain that the classes implement
> PersistenceCapable at the time that ManagedClassSubclasser is being
> invoked?
>
> > Caused by: java.lang.ClassNotFoundException:
> > com.sun.tools.attach.VirtualMachine
>
> What JVM are you using?
>
> -Patrick
>
> On 8/21/07, Prashant Bhat <prashant.mr@gmail.com> wrote:
> > Hi,
> >
> > I'm migrating from OpenJPA version id: openjpa-1.0.0-SNAPSHOT-r420667:559353
> > to openjpa-1.0.0 and I'm not able run the application with the same set of
> > procedures I used earlier(i.e. enhance entities and run).
> >
> > I've enhanced the entities after compilation, and disabled the runtime
> > enhancement to achieve faster boot up by setting property '
> > openjpa.RuntimeClassOptimization' to 'false'. (PS. I'm using Java6 and
> > Spring-2.0.6).
> >
> > But I get the following exception when the entity manager is created.
> >
> > <openjpa-0.0.0-r420667:568173 nonfatal user error>
> > org.apache.openjpa.persistence.ArgumentException: This configuration
> > disallows runtime optimization, but the following listed types were not
> > enhanced at build time or at class load time with a javaagent: "[all classes
> > listed in persistence.xml]".
> >     at
> > org.apache.openjpa.enhance.ManagedClassSubclasser.prepareUnenhancedClasses(
> > ManagedClassSubclasser.java:87)
> >     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.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(
> > AbstractBrokerFactory.java:287)
> >     at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(
> > AbstractBrokerFactory.java:197)
> >     at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(
> > DelegatingBrokerFactory.java:142)
> >     at
> > org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(
> > EntityManagerFactoryImpl.java:192)
> >     at
> > org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(
> > EntityManagerFactoryImpl.java:145)
> >     at
> > org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(
> > EntityManagerFactoryImpl.java:56)
> >     at
> > org.springframework.orm.jpa.JpaTransactionManager.createEntityManagerForTransaction
> > (JpaTransactionManager.java:391)
> >
> >
> > I think, all entities are already enhanced properly, as it works with the
> > earlier version of OpenJPA. I'm justing calling
> > org.apache.openjpa.enhance.PCEnhancer on the project in eclipse with
> > META-INF/persistence.xml being in the classpath.
> > Is there any other parameters which are mandatory to enhance the classes?
> >
> > I didn't try with RuntimeClassOptimization allowed as it was also throwing
> > exceptions(I had posted earlier about this)
> >
> > <openjpa-0.0.0-r420667:564688 fatal general error>
> > org.apache.openjpa.persistence.PersistenceException:
> > com.sun.tools.attach.VirtualMachine
> >     at org.apache.openjpa.enhance.ClassRedefiner.redefineClasses(
> > ClassRedefiner.java:111)
> >     at
> > org.apache.openjpa.enhance.ManagedClassSubclasser.prepareUnenhancedClasses(
> > ManagedClassSubclasser.java:124)
> > ...
> > Caused by: java.lang.ClassNotFoundException:
> > com.sun.tools.attach.VirtualMachine
> > ...
> >
> > Could anybody please tell me the steps needed to run OpenJPA without
> > RuntimeClassOptimization.
> >
> > Thanks,
> > Prashant
> >
>
>
> --
> Patrick Linskey
> 202 669 5907
>


-- 
Patrick Linskey
202 669 5907

Mime
View raw message