1 Reply Latest reply on Nov 23, 2008 2:38 AM by jaikiran pai

    Cannot do lookup from client program

    Chip Schoch Novice

      JBossAS 4.2.2

      I have written a JUnit test program that I want to post a message to a JMS queue. I am attempting to do a JNDI lookup to obtain the connection factory and I get the following exception.

      java.lang.NoClassDefFoundError: org/jboss/aop/classpool/AOPClassPoolRepository
       at org.jboss.aop.AspectManager$2.run(AspectManager.java:277)
       at java.security.AccessController.doPrivileged(Native Method)
       at org.jboss.aop.AspectManager.instance(AspectManager.java:262)
       at org.jboss.aop.AspectManager.instance(AspectManager.java:255)
       at org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate.<clinit>(ClientClusteredConnectionFactoryDelegate.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.<init>(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)
       at com.eLynx.Test.Utilities.JMSQueuer.<init>(JMSQueuer.java:68)
       at com.eLynx.Test.JbpmEventTest.test_1_queueEmcitStatusEvent(JbpmEventTest.java:91)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
       at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
       at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
       at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
       at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
       at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
       at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
       at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
       at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
       at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
       at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
       at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
       at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
       at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
       at org.junit.runners.Suite.runChild(Suite.java:115)
       at org.junit.runners.Suite.runChild(Suite.java:23)
       at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
       at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
       at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
       at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
       at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
       at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
       at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
       at org.junit.runner.JUnitCore.run(JUnitCore.java:116)
       at org.junit.runner.JUnitCore.run(JUnitCore.java:107)
       at org.junit.runner.JUnitCore.runClasses(JUnitCore.java:66)
       at com.eLynx.Test.Utilities.TestRunner.main(TestRunner.java:194)


      I am including all the libraries from the server/client directory, which particularly has jboss-aop-jdk50-client.jar, but this does not contain the class I need. It appears that it is in jboss-aop-jdk50.jar which is is the jboss-aop-jdk50.deployer. Why would a client need to include this jar? Am I missing something?