[JBoss Getting Started Documentation] - testing examples sans Ant
by gryffin
I'm working through the jboss4guide WS chapter. The expected form for testing applications is to use cascading Ant scripts. Yet, for me, that obscures the actual operation. I appreciate the power of Ant, but I don't have time to learn Ant just yet.
How would I go about calling web service clients from the command-line?
( This would also avoid unnecessary compile/deploy phases when tweaking the example. )
The ant target is :
<target name="run-example1" depends="chap12-war">
| <copy file="${chapter.dir}/hello-servlet.war"
| todir="${jboss.dist}/server/default/deploy"/>
| <echo message="Waiting for 5 seconds for deploy..." />
| <sleep seconds="5"/>
| <java dir="${build.classes.dir}" fork="yes" failOnError="true"
| className="org.jboss.ws.client.HelloClient">
| <jvmarg value="-Djava.endorsed.dirs=${jboss.dist}/lib/endorsed" />
| <arg value="http://localhost:8080/hello-servlet/Hello?wsdl" />
| <arg value="JBoss neophyte" />
| <classpath>
| <pathelement location="${build.dir}/classes"/>
| <path refid="client.path" />
| </classpath>
| </java>
| </target>
My attempt to call the script is:
C:\jboss4guide\examples>java -Djava.endorsed.dirs=C:\jboss-4.0.5.GA\lib\endorsed -cp C:\jboss4guide\
| examples\src\main\org\jboss\ws\hello org.jboss.ws.client.HelloClient "http://localhost:8080/hello-servlet/Hello?wsdl" "JBoss neophyte"
| Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/ws/client/HelloClient
The error tells me that my runtime classpath is wrong.
Consequently, I've tried different classpath values
- C:\jboss4guide\examples\src\main\org\jboss\ws\client
- C:\jboss4guide\examples\src\main\
- C:\jboss4guide\examples\
Am I wrong about the classpath, or what should I use? thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041880#4041880
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041880
17 years, 7 months
[JBoss Seam] - Re: Problem injecting EJBs
by nstoddar
"petemuir" wrote : Use the standard @EJB
I actually started by using the @EJB annotation, but it didn't work. What Seam code processes the annotation to inject the lookup value?
@EJB(name = "ejb/AddressService")
| private AddressService addressService;
I have tried just about every combination of name, mappedName, etc with no positive result. Seam doesn't ever complain about a NameNotFoundException -- the first sign of a problem is the NullPointerException when the code executes. From the looks of it, I'm doing everything I should be doing to configure the ejb-ref on my glassfish.
Just for the heck of it, I just changed the name to something that clearly doesn't exist -- Seam didn't log any sort of exception to that effect. Maybe Seam isn't processing the annotation at all....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041868#4041868
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041868
17 years, 7 months