java.lang.NoSuchMethodException:javax.ejb.EJBHome.getHomeHandle()

时间:2009-10-01 05:14:23

标签: java jboss java-ee ejb

我正在试图找出当客户端应用程序连接到JBoss时,为什么我得到以下异常。当客户端尝试连接到服务器时,我在启动时发生。

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 个答案:

答案 0 :(得分:1)

您是否有可能出现版本不匹配的情况?您正在加载的EJBHome类似乎没有预期的方法。您的客户端类路径上是否有一组一致的JAR?