geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: Entity with generic base interface results in VerifyError
Date Tue, 18 Sep 2007 16:32:33 GMT
This is a wild guess, but I wonder if there is some problem with the  
SUID changing during enhancement (I know this isn't supposed to  
happen, but...).  Do you get different results if you supply the SUID  
in code?

thanks
david jencks

On Sep 18, 2007, at 4:55 AM, Janko Heilgeist wrote:

> Hi,
>
> I am trying to deploy an EAR which contains entity beans derived  
> from a
> generic base interface. Basically the structure looks like this:
>
> public interface GenericEntity<PK extends Serializable> {
> 	PK getEntityId();
> 	void setEntityId(PK entityId);
> }
>
> public interface Dummy extends GenericEntity<Long> {
> }
>
> public class DummyImpl implements Dummy, Serializable {
> 	private Long entityId;
> 	@Override Long getEntityId() {
> 		return entityId;
> 	}
> 	@Override void setEntityId(Long entityId) {
> 		this.entityId = entityId;
> 	}
> }
>
> A minimal sample with Maven2 is at
> http://dalighe.de/geronimo/generic-entity.tar.gz
>
> The DummyImpl-entity is accessed via a DAO (stateless session bean).
> While everything deploys just fine into Geronimo, I get an exception
> when I try to access the DAO with a stand-alone client. The exception
> thrown is:
>
> 07:13:50,483 FATAL [remote] Error caught during request processing
> java.lang.VerifyError: (class: mypackage/DummyImpl, method:  
> getEntityId
> signature: ()Ljava/lang/Long;) Wrong return type in function
>         at java.lang.Class.getDeclaredFields0(Native Method)
>         at java.lang.Class.privateGetDeclaredFields(Class.java:2291)
>         at java.lang.Class.getDeclaredField(Class.java:1880)
>         at
> java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1610)
>         at java.io.ObjectStreamClass.access$700 
> (ObjectStreamClass.java:52)
>         at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:425)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java: 
> 413)
>         at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java: 
> 310)
>         at
> java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:547)
>         at
> java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java: 
> 1583)
>         at
> java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
>         at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java: 
> 1732)
>         at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
>         at java.io.ObjectInputStream.readObject 
> (ObjectInputStream.java:351)
>         at
> org.apache.openejb.client.EJBRequest$Body.readMethodParameters 
> (EJBRequest.java:385)
>         at
> org.apache.openejb.client.EJBRequest$Body.readExternal 
> (EJBRequest.java:199)
>         at
> org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest 
> (EjbRequestHandler.java:91)
>         at
> org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest 
> (EjbDaemon.java:163)
>         at
> org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:121)
>         at
> org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:83)
>         at
> org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:60)
>         at
> org.apache.openejb.server.ServiceLogger.service(ServiceLogger.java:75)
>         at
> org.apache.openejb.server.ServiceAccessController.service 
> (ServiceAccessController.java:55)
>         at
> org.apache.openejb.server.ServiceDaemon$1.run(ServiceDaemon.java:117)
>         at java.lang.Thread.run(Thread.java:619)
>
> During a previous test-run I had the member variable of DummyImpl
> defined as the primitive "long" and relied on auto-boxing. In that
> test-run the call to the session bean's create-method was executed but
> an identical exception was thrown somewhere deep in the bowels of
> OpenJPA during the parsing of the entity's meta-data.
>
> Can someone help me out with this problem?
>
> Thanks a lot in advance!
>
> Regards, Janko
>


Mime
View raw message