Problem compiling Hello example in Chapter 12 of the
ekatsiri Oct 6, 2005 1:39 PMDear friends,
I am having some trouble compiling the "Hello" example of Chapter 12.
I downloaded the WSDP package from sun in order to get the wscompile.sh tool as well as a tomcat 5 web container which i installed. (Is that ok? It seems Jboss is using Axis?)
However, I haven't been able to use it to generate te required files for the "hello" example.
I typed:
wscompile.sh -classpath ./output/classes/org/jboss/chap12/hello/ -gen:server -f:rpcliteral -mapping ./src/main/org/jboss/chap12/example/mapping.xml ./src/main/org/jboss/chap12/hello/config.xml
and got the following output:
error: RmiModeler error: java.lang.ClassNotFoundException: org$jboss$chap12$hello$Hello
I then tried to compile the Hello example:
I typed:
ant -Dchap=chap12 -Dex=1 run-example
but it seems that the web service is deployed but cannot be invoked through tthe Hello interface.
I got the following compilation errot:
.....
run-example1:
[echo] Waiting for 5 seconds for deploy...
[java] Contacting webservice at http://localhost:8080/hello-servlet/Hello?wsdl
[java] hello.hello(JBoss user)
[java] argument:JBoss user
[java] [ERROR,PortProxy] Port error
[java] java.lang.NullPointerException
[java] at java.util.Hashtable.put(Hashtable.java:396)
[java] at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:395)
[java] at org.jboss.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:262)
[java] at org.jboss.axis.MessagePart.getAsSOAPEnvelope(MessagePart.java:684)
[java] at org.jboss.axis.Message.getSOAPEnvelope(Message.java:428)
[java] at org.jboss.axis.Message.getContentType(Message.java:494)
[java] at org.jboss.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:386)
[java] at org.jboss.axis.transport.http.HTTPSender.invoke(HTTPSender.java:126)
[java] at org.jboss.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:73)
[java] at org.jboss.axis.SimpleChain.doVisiting(SimpleChain.java:160)
[java] at org.jboss.axis.SimpleChain.invoke(SimpleChain.java:123)
[java] at org.jboss.webservice.client.ClientEngine.invoke(ClientEngine.java:128)
[java] at org.jboss.axis.client.Call.invokeEngine(Call.java:3054)
[java] at org.jboss.axis.client.Call.invoke(Call.java:3039)
[java] at org.jboss.axis.client.Call.invoke(Call.java:2629)
[java] at org.jboss.axis.client.Call.invoke(Call.java:2538)
[java] at org.jboss.axis.client.Call.invokeInternal(Call.java:1976)
[java] at org.jboss.axis.client.Call.invoke(Call.java:1914)
[java] at org.jboss.webservice.client.CallImpl.invoke(CallImpl.java:265)
[java] at org.jboss.axis.client.AxisClientProxy.invoke(AxisClientProxy.java:381)
[java] at $Proxy0.hello(Unknown Source)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:585)
[java] at org.jboss.webservice.client.PortProxy.invoke(PortProxy.java:105)
[java] at $Proxy1.hello(Unknown Source)
[java] at org.jboss.chap12.client.HelloClient.main(HelloClient.java:35)
[java] Exception in thread "main" java.rmi.RemoteException: null; nested exception is:
My server console seems to be happy:
18:47:31,434 INFO [Server] JBoss (MX MicroKernel) [4.0.2 (build: CVSTag=JBoss_4
_0_2 date=200505022023)] Started in 42s:983ms
14:34:32,801 INFO [TomcatDeployer] deploy, ctxPath=/hello-servlet, warUrl=file:
/vol/bitbucket/ek/jboss/jboss-4.0.2/server/default/tmp/deploy/tmp10543hello-serv
let.war/
14:34:33,272 INFO [WSDLFilePublisher] WSDL published to: file:/vol/bitbucket/ek
/jboss/jboss-4.0.2/server/default/data/wsdl/hello-servlet.war/HelloService.wsdl
14:34:33,473 INFO [AxisService] WSDD published to: /vol/bitbucket/ek/jboss/jbos
s-4.0.2/server/default/data/wsdl/hello-servlet.war/Hello.wsdd
14:34:34,110 INFO [AxisService] Web Service deployed: http://***********:8080/hello-servlet/Hello
18:15:45,133 INFO [EjbModule] Deploying HelloBean
18:15:45,330 INFO [EJBDeployer] Deployed: file:/vol/bitbucket/ek/jboss/jboss-4.0.2/server/default/deploy/hello-ejb.jar
18:15:45,358 INFO [WSDLFilePublisher] WSDL published to: file:/vol/bitbucket/ek/jboss/jboss-4.0.2/server/default/data/wsdl/hello-ejb.jar/HelloService.wsdl
18:15:45,510 INFO [AxisService] WSDD published to: /vol/bitbucket/ek/jboss/jboss-4.0.2/server/default/data/wsdl/hello-ejb.jar/Hello.wsdd
18:15:45,513 INFO [AxisService] Web Service deployed: http://cresta.doc.ic.ac.uk:8080/hello-ejb/Hello
18:15:45,598 INFO [TomcatDeployer] deploy, ctxPath=/hello-ejb, warUrl=file:/vol/bitbucket/ek/jboss/jboss-4.0.2/server/default/tmp/deploy/hello-ejb.jar-ws10546.war/
I would be grateful for any comment!
Thank you very much,
elitje2001