users@glassfish.java.net

glassfish v3.1 & jpa: java.lang.AbstractMethodError: ...._persistence_setId(Ljava/lang/Object;)V

From: Dominik Dorn <dominik.dorn_at_gmail.com>
Date: Sat, 27 Feb 2010 16:08:25 +0100

Hi,

I'm just trying out Glassfish v3.1 and my beans stop working.

I've statically wired the jpa helper methods with this maven config:

       <dependency>
           <groupId>org.eclipse.persistence</groupId>
           <artifactId>javax.persistence</artifactId>
           <version>${org.eclipse.persistence.javax.persistence-version}</version>
           <scope>compile</scope>
       </dependency>

           <plugin>
               <artifactId>maven-antrun-plugin</artifactId>
               <executions>
                   <execution>
                       <phase>process-classes</phase>
                       <configuration>
                           <tasks>
                               <java
classname="org.eclipse.persistence.tools.weaving.jpa.StaticWeave"

classpathref="maven.runtime.classpath" fork="true">
                                   <arg line="-loglevel FINE
-persistenceinfo src/main/resources target/classes target/classes"/>
                               </java>
                           </tasks>
                       </configuration>
                       <goals>
                           <goal>run</goal>
                       </goals>
                   </execution>
               </executions>
           </plugin>


When I look at the generated class, it creates jpa-helper methods that
have different
small/big-letters (whats the correct term for this?)

So Glassfish v3.1 expects
Country._persistence_setId(Ljava/lang/Object;)V
while the generated class only has
public void _persistence_setid(int);

heres the output of javap

domdorn classes $ javap -classpath . com.dominikdorn.dc.core.geo.domain.Country
Compiled from "Country.java"
public class com.dominikdorn.dc.core.geo.domain.Country extends
java.lang.Object implements
java.io.Serializable,java.lang.Cloneable,org.eclipse.persistence.internal.weaving.PersistenceWeaved,org.eclipse.persistence.internal.descriptors.PersistenceEntity,org.eclipse.persistence.internal.descriptors.PersistenceObject,org.eclipse.persistence.queries.FetchGroupTracker,org.eclipse.persistence.internal.weaving.PersistenceWeavedFetchGroups,org.eclipse.persistence.descriptors.changetracking.ChangeTracker,org.eclipse.persistence.internal.weaving.PersistenceWeavedChangeTracking{
   public static final long serialVersionUID;
   protected transient java.util.Vector _persistence_primaryKey;
   protected transient
org.eclipse.persistence.internal.identitymaps.CacheKey
_persistence_cacheKey;
   protected transient java.beans.PropertyChangeListener _persistence_listener;
   protected transient org.eclipse.persistence.queries.FetchGroup
_persistence_fetchGroup;
   protected transient boolean _persistence_shouldRefreshFetchGroup;
   protected transient org.eclipse.persistence.sessions.Session
_persistence_session;
   public com.dominikdorn.dc.core.geo.domain.Country();
   public int getId();
   public void setId(int);
   public java.lang.String getName();
   public void setName(java.lang.String);
   public java.lang.String getTld();
   public void setTld(java.lang.String);
   public java.lang.String getIsoCode();
   public void setIsoCode(java.lang.String);
   public boolean isFlag();
   public void setFlag(boolean);
   public boolean equals(java.lang.Object);
   public int hashCode();
   public java.lang.String toString();
   public java.lang.Object _persistence_post_clone();
   public java.lang.Object _persistence_shallow_clone();
   public org.eclipse.persistence.internal.identitymaps.CacheKey
_persistence_getCacheKey();
   public void
_persistence_setCacheKey(org.eclipse.persistence.internal.identitymaps.CacheKey);
   public java.util.Vector _persistence_getPKVector();
   public void _persistence_setPKVector(java.util.Vector);
   public java.lang.Object
_persistence_new(org.eclipse.persistence.internal.descriptors.PersistenceObject);
   public com.dominikdorn.dc.core.geo.domain.Country(org.eclipse.persistence.internal.descriptors.PersistenceObject);
   public java.lang.Object _persistence_get(java.lang.String);
   public void _persistence_set(java.lang.String, java.lang.Object);
   public int _persistence_getid();
   public void _persistence_setid(int);
   public boolean _persistence_getflag();
   public void _persistence_setflag(boolean);
   public java.lang.String _persistence_getname();
   public void _persistence_setname(java.lang.String);
   public java.lang.String _persistence_getisoCode();
   public void _persistence_setisoCode(java.lang.String);
   public java.lang.String _persistence_gettld();
   public void _persistence_settld(java.lang.String);
   public java.beans.PropertyChangeListener
_persistence_getPropertyChangeListener();
   public void
_persistence_setPropertyChangeListener(java.beans.PropertyChangeListener);
   public void _persistence_propertyChange(java.lang.String,
java.lang.Object, java.lang.Object);
   public org.eclipse.persistence.sessions.Session _persistence_getSession();
   public void
_persistence_setSession(org.eclipse.persistence.sessions.Session);
   public org.eclipse.persistence.queries.FetchGroup
_persistence_getFetchGroup();
   public void
_persistence_setFetchGroup(org.eclipse.persistence.queries.FetchGroup);
   public boolean _persistence_shouldRefreshFetchGroup();
   public void _persistence_setShouldRefreshFetchGroup(boolean);
   public void _persistence_resetFetchGroup();
   public boolean _persistence_isAttributeFetched(java.lang.String);
   public void _persistence_checkFetched(java.lang.String);
}


What can I do about this? Is there a new version of the StaticWeaver around?


Thanks


--
[url=http://www.dominikdorn.com]Dominik Dorn[/url]
Tausche Deine [url=http://www.studyguru.eu] Lernunterlagen [/url] auf
[url=http://www.studyguru.eu] http://www.studyguru.eu [/url]!