-
15. Re: Problem with client calling esb
beve Feb 25, 2011 7:16 AM (in response to chandrarsa)Hi Chandra,
can you try this build.xml file. Simply replace the content of the build.xml in the helloworld quickstart. (This is assuming that you are using the jbossesb-server which is based on JBoss AS 4.x. For JBoss AS 5 the paths are different but the jars should be the same I think)
<project name="Quickstart_remote_serviceinvoker" default="run" basedir="."> <description> ${ant.project.name} ${line.separator} </description> <!-- Import the base Ant build script... --> <import file="../conf/base-build.xml"/> <target name="runtest" depends="compile" description="Will send an esb Message"> <path id="serviceinvoker-classpath"> <pathelement location="${org.jboss.esb.server.deploy.dir}/jbossesb.sar/lib/jbossesb-rosetta.jar"/> <pathelement location="${org.jboss.esb.server.deploy.dir}/jbossesb.sar/lib/jbossesb-config-model-*.jar"/> <pathelement location="${org.jboss.esb.server.deploy.dir}/jbossesb.sar/lib/commons-configuration-1.5.jar"/> <pathelement location="${org.jboss.esb.server.deploy.dir}/jbossesb.sar/lib/commons-lang-2.3.jar"/> <pathelement location="${org.jboss.esb.server.deploy.dir}/jbossesb.sar/lib/commons-codec-1.3.jar"/> <pathelement location="${org.jboss.esb.server.deploy.dir}/jbossesb.sar/lib/wstx-asl-3.2.8.jar"/> <pathelement location="${org.jboss.esb.server.deploy.dir}/jbossesb.sar/lib/stax-api-1.0.1.jar"/> <pathelement location="${org.jboss.esb.server.deploy.dir}/jbossesb.sar/lib/xbean-2.2.0.jar"/> <pathelement location="${org.jboss.esb.server.deploy.dir}/jbossesb.sar/lib/scout-1.2.2.jar"/> <pathelement location="${org.jboss.esb.server.deploy.dir}/jbossesb.sar/lib/juddi-client-3.0.3.jar"/> <pathelement location="${org.jboss.esb.server.deploy.dir}/jbossesb.sar/lib/uddi-ws-3.0.3.jar"/> <pathelement location="${org.jboss.esb.server.deploy.dir}/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/> <pathelement location="${org.jboss.esb.server.server}/lib/jbossts-common.jar"/> <pathelement location="${org.jboss.esb.server.server}/lib/jboss-remoting.jar"/> <pathelement location="${org.jboss.esb.server.server}/lib/jboss-messaging-client.jar"/> <pathelement location="${org.jboss.esb.server.server}/lib/jboss-messaging.jar"/> <pathelement location="${org.jboss.esb.server.server}/lib/javassist.jar"/> <pathelement location="${org.jboss.esb.server.server}/lib/log4j.jar"/> <pathelement location="${org.jboss.esb.server.server}/lib/commons-logging.jar"/> <pathelement location="${org.jboss.esb.server.server}/lib/commons-collections.jar"/> <pathelement location="${org.jboss.esb.server.home}/client/jbossall-client.jar"/> <pathelement location="${org.jboss.esb.server.home}/client/trove.jar"/> <pathelement location="${org.jboss.esb.server.home}/lib/endorsed/xercesImpl.jar"/> <pathelement location="${basedir}/build/classes"/> <!-- Include the current directory for resources. This will give access to ./jbossesb-properties --> <pathelement location="${basedir}/."/> <!-- Include META-INF/uddi.xml in the classpath --> <pathelement location="${basedir}/../conf/registry/"/> </path> <echo>Runs Test ESB Message Sender</echo> <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.helloworld.test.SendEsbMessage" failonerror="true"> <arg value="FirstServiceESB"/> <!-- service category --> <arg value="SimpleListener"/> <!-- service name --> <arg value="Hello World - Straight to ESB listener - no Gateway"/> <!-- Message text --> <classpath refid="serviceinvoker-classpath"/> </java> </target> </project>
Hopefully this should give a better idea of which jars are actually being used and their location, aswell as which resources files are needed.
Regards,
/Daniel
-
16. Re: Problem with client calling esb
chandrarsa Feb 25, 2011 7:37 AM (in response to chandrarsa)Hello Daniel - I added complete my project.
-
BPMTestPlatform.7z.zip 12.2 KB
-
-
17. Problem with client calling esb
chandrarsa Feb 25, 2011 8:00 AM (in response to beve)Hello Daniel,
Updated build.xml not helped me
compile:runtest:
[echo] Runs Test ESB Message Sender
[java] java.lang.NoClassDefFoundError: org/jboss/soa/esb/samples/quickstart/helloworld/test/SendEsbMessage
[java] Caused by: java.lang.ClassNotFoundException: org.jboss.soa.esb.samples.quickstart.helloworld.test.SendEsbMessage
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
[java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
[java] Could not find the main class: org.jboss.soa.esb.samples.quickstart.helloworld.test.SendEsbMessage. Program will e
xit.
[java] Exception in thread "main"BUILD FAILED
D:\jboss-soa-p.5.0.0\jboss-as\samples\quickstarts\webservice_consumer1\build.xml:44: Java returned: 1Total time: 0 seconds
I attached complete my workspace in previous my post.
Pls. correct me where I am doing mistake because the webservice is working fine and deployed esb archive without errors but ESB client is not working.
Note: I am using JBD Tools not ANT script.
Thanks & regards
Chandra
-
18. Re: Problem with client calling esb
beve Feb 25, 2011 8:06 AM (in response to chandrarsa)By looking at your .classpath file it looks like you have not included the esbcontents directory in your classpath which means the META-INF/uddi.xml and jbossesb-properties files are not on your client classpath. If you add them this should work.
There is an example eclipse project here that you can look at. This example has placed jbossesb-properties and META-INF/uddi.xml in a resources directory which is also a source folder in eclipse:
<classpathentry kind="src" path="resources"/>
The esbcontent is what is deployed to the server and is for serverside artifacts, like you deployment.xml with dependencies, your jms queue to be deploy etc.
Regards,
/Daniel
-
19. Re: Problem with client calling esb
chandrarsa Feb 26, 2011 3:31 AM (in response to beve)Thank you very much Daniel.