openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Dick" <mik...@apache.org>
Subject Re: Problems migrating to 1.0
Date Wed, 22 Aug 2007 11:51:50 GMT
On 8/22/07, Prashant Bhat <prashant.mr@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?
>
>
> How do I check that? The entities I've defined are POJOs, Should the
> enhancer make entities PersistenceCapable?


That's right, the enhancer should modify your classes so that they implement
PersistenceCapable among other things.  Running javap on the class will show
you something like this :

public class mypackage.MyEntity extends java.lang.Object implements
java.io.Serializable,org.apache.openjpa.enhance.PersistenceCapable{
<snip>
    public org.apache.openjpa.enhance.PersistenceCapable pcNewInstance(
org.apache.openjpa.enhance.StateManager, java.lang.Object, boolean);
    public org.apache.openjpa.enhance.PersistenceCapable pcNewInstance(
org.apache.openjpa.enhance.StateManager, boolean);
    protected static int pcGetManagedFieldCount();
    public void pcReplaceField(int);
    public void pcReplaceFields(int[]);


> Caused by: java.lang.ClassNotFoundException:
> > > com.sun.tools.attach.VirtualMachine
> >
> > What JVM are you using?
>
>
> I'm using : $ java -version
> java version "1.6.0"
> Java(TM) SE Runtime Environment (build 1.6.0-b105)
> Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
>
> Thanks,
> Prashant
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message