[jboss-user] [JBoss Messaging] - Re: Client Connect Fails with

jhd do-not-reply at jboss.com
Wed Apr 2 12:03:28 EDT 2008


I finally have this narrowed to a classpath problem.  I know what's causing it but I'm clueless as to how to solve it.

I can successfully run a pure Java queue test example with the following classpath:


  |    <path id="execution.classpath">
  | 
  |       <fileset file="./lib/jboss-messaging-client.jar"/>
  |       <fileset file="./lib/jboss-remoting.jar"/>
  |       <fileset file="./lib/jbossall-client.jar"/>
  |       <fileset file="./lib/thirdPartyTools.jar"/>
  |       <fileset file="./lib/log4j-1.2.14.jar"/>
  |       <fileset file="./lib/javassist.jar"/>
  |       <fileset file="./lib/jboss-aop-jdk50.jar"/>
  |       <fileset file="./lib/trove.jar"/>
  |       <fileset file="./lib/client.jar"/>
  |       
  |       <pathelement path="./lib"/>
  |       <pathelement path="../common/output/classes"/>
  |       <pathelement path="./output/classes"/>
  |       
  |    </path>
  | 

This tells me my server-side config is ok.

Where I am running into trouble is my java client runs as a jvm inside of a .Net application using Jnbridge in a shared memory configuration.  Using the shared memory configuration forces me to load at least some jboss classes prepended to the bootclasspath (jbossall-client.jar).  Having jbossall-client.jar in the bootclasspath is causing class loading issues with the JMS related libs.  Given my client-side deployment constraints with Jnbridge I have no choice but to load at least some Jboss classes (jbossall-client.jar) in the bootclasspath.  I've tried many combinations of placing JMS, AOP, remoting, etc. jars ahead of jbossall-client.  I've also tried slimming jbossall-client.jar down.  Fixing one classpath issue seems to always cause another.

Here is my latest client-side config:


  | 	<jnbridge>
  | 		<dotNetToJavaConfig 
  | 			scheme="sharedmem"		
  |          jvm="E:/jdk1.5.0_06/jre/bin/client/jvm.dll"			
  | 			jnbcore="../../depends/java/jnbcore.jar"
  | 			bcel="../../depends/java/bcel-5.1-jnbridge.jar"			
  |          classpath="../../depends/java;../../depends/java/jboss-messaging-client.jar;../../depends/java/jboss-remoting.jar;../../depends/java/jbossall-client.jar;../../depends/java/javassist.jar;../../depends/java/jboss-aop-jdk50.jar;../../depends/java/trove.jar;../../depends/java/thirdPartyTools.jar;../../depends/java/hibernate3-twia.jar;../../depends/java/commons-logging.jar;../../depends/java/commons-collections.jar;../../depends/java/common.jar;../../depends/java/tbot-system.jar;../../depends/java/tbot-ejb.jar;../../depends/java/client.jar;../../depends/java/tbot-test.jar;../../depends/java/thirdPartyToolsExt.jar;../../depends/java/commons-validator-1.1.4.jar;../../depends/java/commons-beanutils.jar;../../depends/java/cglib.jar;../../depends/java/log4j-1.2.14.jar"       
  |          jvmOptions.0="-Xbootclasspath/p:../../depends/java/jboss-remoting.jar;../../depends/java/thirdPartyTools.jar;../../depends/java/jboss-aop-jdk50.jar;../../depends/java/trove.jar;../../depends/java/jboss-messaging-client.jar;../../depends/java/javassist.jar;../../depends/java/jbossall-client.jar" 
  | 			jvmOptions.1="-Xms128m"
  | 			jvmOptions.2="-Xmx256m"
  |          jvmOptions.3="-Djava.security.auth.login.config=file:../../depends/java/auth.conf"
  | 			jvmOptions.4="-Dapp.home=../../depends/java"			
  |          jvmOptions.5="-DUMMY"   
  |          jvmOptions.6="-DUMMY"
  |          jvmOptions.7="-DUMMY"
  |          jvmOptions.8="-DUMMY"
  |          jvmOptions.9="-DUMMY"
  | 		/>
  |    </jnbridge>
  | 

This causes the following stack trace when attempting to create a JMS connection:


  | [WARN]@[02 Apr 2008 10:45:50,709] [org.jboss.messaging.util.Version] : Unable to read version info: null 
  | [ERROR]@[02 Apr 2008 10:45:50,881] [org.jboss.jms.client.JBossConnectionFactory] : Failed to download and/or install client side AOP stack 
  | java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException
  | 	at org.jboss.aop.AspectXmlLoader.deployXML(AspectXmlLoader.java:892)
  | 	at org.jboss.aop.AspectXmlLoader.deployXML(AspectXmlLoader.java:877)
  | 	at org.jboss.jms.client.container.JmsClientAspectXMLLoader.deployXML(JmsClientAspectXMLLoader.java:93)
  | 	at org.jboss.jms.client.ClientAOPStackLoader.load(ClientAOPStackLoader.java:77)
  | 	at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:192)
  | 	at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:87)
  | 	at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:82)
  | 	at org.twia.jms.JMSProxy.connectToJMS(JMSProxy.java:453)
  | 	at org.twia.jms.JMSProxy.<init>(JMSProxy.java:70)
  | 	at org.twia.jms.JMSProxy.getInstance(JMSProxy.java:64)
  | 	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 com.jnbridge.jnbcore.JNBDispatcher.objectStaticCall(Unknown Source)
  | 	at com.jnbridge.jnbcore.JNBDispatcher.call(Unknown Source)
  | 	at com.jnbridge.jnbcore.server.sharedmem.SharedMemRequestHandler.a(Unknown Source)
  | 	at com.jnbridge.jnbcore.server.sharedmem.SharedMemRequestHandler.handleRequest(Unknown Source)
  | Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException
  | 	at org.jboss.aop.ClassAdvisor.rebuildInterceptors(ClassAdvisor.java:979)
  | 	at org.jboss.aop.Advisor.newBindingAdded(Advisor.java:485)
  | 	at org.jboss.aop.AspectManager.updateAdvisorsForAddedBinding(AspectManager.java:1413)
  | 	at org.jboss.aop.AspectManager.addBinding(AspectManager.java:1382)
  | 	at org.jboss.aop.AspectXmlLoader.deployBinding(AspectXmlLoader.java:286)
  | 	at org.jboss.aop.AspectXmlLoader.deployTopElements(AspectXmlLoader.java:1038)
  | 	at org.jboss.aop.AspectXmlLoader.deployXML(AspectXmlLoader.java:886)
  | 	... 17 more
  | Caused by: java.lang.RuntimeException: java.lang.NullPointerException
  | 	at org.jboss.aop.advice.AdviceFactory.create(AdviceFactory.java:72)
  | 	at org.jboss.aop.Advisor.createInterceptorChain(Advisor.java:618)
  | 	at org.jboss.aop.Advisor.pointcutResolved(Advisor.java:888)
  | 	at org.jboss.aop.Advisor.resolveMethodPointcut(Advisor.java:650)
  | 	at org.jboss.aop.ClassAdvisor.createInterceptorChains(ClassAdvisor.java:607)
  | 	at org.jboss.aop.ClassAdvisor.rebuildInterceptors(ClassAdvisor.java:974)
  | 	... 23 more
  | Caused by: java.lang.NullPointerException
  | 	at org.jboss.aop.advice.AspectFactoryWithClassLoaderSupport.loadClass(AspectFactoryWithClassLoaderSupport.java:85)
  | 	at org.jboss.aop.advice.GenericAspectFactory.getClazz(GenericAspectFactory.java:137)
  | 	at org.jboss.aop.advice.GenericAspectFactory.createPerVM(GenericAspectFactory.java:152)
  | 	at org.jboss.aop.AspectManager.createPerVmAspect(AspectManager.java:1746)
  | 	at org.jboss.aop.AspectManager.getPerVMAspect(AspectManager.java:1728)
  | 	at org.jboss.aop.AspectManager.getPerVMAspect(AspectManager.java:1718)
  | 	at org.jboss.aop.advice.PerVmAdvice.generateOptimized(PerVmAdvice.java:55)
  | 	at org.jboss.aop.advice.AdviceFactory.create(AdviceFactory.java:68)
  | 	... 28 more
  | [ERROR]@[02 Apr 2008 10:45:50,897] [org.twia.jms.JMSProxy] : connectToJMS() - Exception occured: 
  | java.lang.RuntimeException: Failed to download and/or install client side AOP stack
  | 	at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:199)
  | 	at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:87)
  | 	at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:82)
  | 	at org.twia.jms.JMSProxy.connectToJMS(JMSProxy.java:453)
  | 	at org.twia.jms.JMSProxy.<init>(JMSProxy.java:70)
  | 	at org.twia.jms.JMSProxy.getInstance(JMSProxy.java:64)
  | 	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 com.jnbridge.jnbcore.JNBDispatcher.objectStaticCall(Unknown Source)
  | 	at com.jnbridge.jnbcore.JNBDispatcher.call(Unknown Source)
  | 	at com.jnbridge.jnbcore.server.sharedmem.SharedMemRequestHandler.a(Unknown Source)
  | 	at com.jnbridge.jnbcore.server.sharedmem.SharedMemRequestHandler.handleRequest(Unknown Source)
  | Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException
  | 	at org.jboss.aop.AspectXmlLoader.deployXML(AspectXmlLoader.java:892)
  | 	at org.jboss.aop.AspectXmlLoader.deployXML(AspectXmlLoader.java:877)
  | 	at org.jboss.jms.client.container.JmsClientAspectXMLLoader.deployXML(JmsClientAspectXMLLoader.java:93)
  | 	at org.jboss.jms.client.ClientAOPStackLoader.load(ClientAOPStackLoader.java:77)
  | 	at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:192)
  | 	... 13 more
  | Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException
  | 	at org.jboss.aop.ClassAdvisor.rebuildInterceptors(ClassAdvisor.java:979)
  | 	at org.jboss.aop.Advisor.newBindingAdded(Advisor.java:485)
  | 	at org.jboss.aop.AspectManager.updateAdvisorsForAddedBinding(AspectManager.java:1413)
  | 	at org.jboss.aop.AspectManager.addBinding(AspectManager.java:1382)
  | 	at org.jboss.aop.AspectXmlLoader.deployBinding(AspectXmlLoader.java:286)
  | 	at org.jboss.aop.AspectXmlLoader.deployTopElements(AspectXmlLoader.java:1038)
  | 	at org.jboss.aop.AspectXmlLoader.deployXML(AspectXmlLoader.java:886)
  | 	... 17 more
  | Caused by: java.lang.RuntimeException: java.lang.NullPointerException
  | 	at org.jboss.aop.advice.AdviceFactory.create(AdviceFactory.java:72)
  | 	at org.jboss.aop.Advisor.createInterceptorChain(Advisor.java:618)
  | 	at org.jboss.aop.Advisor.pointcutResolved(Advisor.java:888)
  | 	at org.jboss.aop.Advisor.resolveMethodPointcut(Advisor.java:650)
  | 	at org.jboss.aop.ClassAdvisor.createInterceptorChains(ClassAdvisor.java:607)
  | 	at org.jboss.aop.ClassAdvisor.rebuildInterceptors(ClassAdvisor.java:974)
  | 	... 23 more
  | Caused by: java.lang.NullPointerException
  | 	at org.jboss.aop.advice.AspectFactoryWithClassLoaderSupport.loadClass(AspectFactoryWithClassLoaderSupport.java:85)
  | 	at org.jboss.aop.advice.GenericAspectFactory.getClazz(GenericAspectFactory.java:137)
  | 	at org.jboss.aop.advice.GenericAspectFactory.createPerVM(GenericAspectFactory.java:152)
  | 	at org.jboss.aop.AspectManager.createPerVmAspect(AspectManager.java:1746)
  | 	at org.jboss.aop.AspectManager.getPerVMAspect(AspectManager.java:1728)
  | 	at org.jboss.aop.AspectManager.getPerVMAspect(AspectManager.java:1718)
  | 	at org.jboss.aop.advice.PerVmAdvice.generateOptimized(PerVmAdvice.java:55)
  | 	at org.jboss.aop.advice.AdviceFactory.create(AdviceFactory.java:68)
  | 	... 28 more
  | 

Given that I have to have at least a subset of jbossall-client.jar in the bootclasspath to be able to perform JNDI lookups and get a remote EJB stub  ... what can I do to get JMS working?

Any help is appreciated.

John

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4141045#4141045

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4141045



More information about the jboss-user mailing list