views:

427

answers:

1

I'm trying to figure out why I'm getting the following exception when a client app is connecting to JBoss. I happens on startup, when the client attempts to connect to the server.

java.lang.ExceptionInInitializerError
at org.jboss.proxy.ejb.HomeInterceptor.<clinit>(HomeInterceptor.java:77)
at sun.misc.Unsafe.ensureClassInitialized(Native Method)
at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25)
at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122)
at java.lang.reflect.Field.acquireFieldAccessor(Field.java:917)
at java.lang.reflect.Field.getFieldAccessor(Field.java:898)
at java.lang.reflect.Field.getLong(Field.java:527)
at java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1559)
at java.io.ObjectStreamClass.access$600(ObjectStreamClass.java:47)
at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:381)
at java.security.AccessController.doPrivileged(Native Method)
at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:373)
at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:268)
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:504)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
at org.jboss.proxy.ClientContainer.readExternal(ClientContainer.java:142)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1753)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1711)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:57)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:637)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at ...start of my code...
Caused by: java.lang.NoSuchMethodException: javax.ejb.EJBHome.getHomeHandle()
at java.lang.Class.getMethod(Class.java:1581)
at org.jboss.proxy.ejb.HomeInterceptor.<clinit>(HomeInterceptor.java:64)
... 39 more
+1  A: 

Is it possible that you've got a version mismatch? It appears that the EJBHome class you're loading does not have an expected method. Have you got a consistent set of JARs on your client classpath?

djna
Turns out I had a 'eelib.jar' which got added to my classpath. Removing this jar fixed the issue.
brianegge