3 Replies Latest reply on Oct 31, 2012 9:37 PM by 扎布 佰音

    ConnectionFactory lookup issue - I get java.lang.NoSuchMetho

    SUBHASIS PRATIHARI Newbie


      Hi,

      While doing a lookup for a queue in JBossESB I find the following error :



      Exception in thread "main" java.lang.NoSuchMethodError: javassist.scopedpool.ScopedClassPool.(Ljava/lang/ClassLoader;Ljavassist/ClassPool;Ljavassist/scopedpool/ScopedClassPoolRepository;Z)V
      at org.jboss.aop.classpool.AOPClassPool.(AOPClassPool.java:66)
      at org.jboss.aop.classpool.AOPClassPool.(AOPClassPool.java:56)
      at org.jboss.aop.classpool.AOPClassPoolFactory.create(AOPClassPoolFactory.java:40)
      at javassist.scopedpool.ScopedClassPoolRepositoryImpl.createScopedClassPool(ScopedClassPoolRepositoryImpl.java:99)
      at javassist.scopedpool.ScopedClassPoolRepositoryImpl.registerClassLoader(ScopedClassPoolRepositoryImpl.java:125)
      at org.jboss.aop.classpool.AOPClassPoolRepository.registerClassLoader(AOPClassPoolRepository.java:129)
      at org.jboss.aop.AspectManager.registerClassLoader(AspectManager.java:657)
      at org.jboss.aop.ClassAdvisor.attachClass(ClassAdvisor.java:270)
      at org.jboss.aop.AspectManager.initialiseClassAdvisor(AspectManager.java:591)
      at org.jboss.aop.AspectManager.getAdvisor(AspectManager.java:579)
      at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.(ClientConnectionFactoryDelegate.java)
      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:1586)
      at java.io.ObjectStreamClass.access$700(ObjectStreamClass.java:52)
      at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:408)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.io.ObjectStreamClass.(ObjectStreamClass.java:400)
      at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:297)
      at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:531)
      at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
      at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
      at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:710)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
      at javax.naming.InitialContext.lookup(InitialContext.java:351)


      This happens when I run a client program from eclipse.
      The line of code in my Client program that is throwing this exception is :


      Object tmp = iniCtx.lookup("/ConnectionFactory");



      Any idea why I am getting this error. I have tried taking all the latest jars from JBossESB client folders. Still no success. If anybody has come across this problem please let me know your resolution.