[jboss-user] [JBoss jBPM] - I have some trouble in BPEL hello test.
Kanty
do-not-reply at jboss.com
Mon Jan 12 04:01:21 EST 2009
I deploy the hello example successful, but when I start the client, it shows
| Exception in thread "main" javax.naming.NameNotFoundException: comp not bound
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
| at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
| at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
| 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:589)
| at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
| at sun.rmi.transport.Transport$1.run(Transport.java:159)
| at java.security.AccessController.doPrivileged(Native Method)
| at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
| at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
| at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
| at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
| at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:679)
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:704)
| at java.lang.Thread.run(Thread.java:619)
| at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
| at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
| at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
| at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
| at javax.naming.InitialContext.lookup(InitialContext.java:392)
| at test.webservice.TestInJBOSS.main(TestInJBOSS.java:29)
|
my client
| package test.webservice;
|
| import java.util.Properties;
|
| import javax.naming.Context;
| import javax.naming.InitialContext;
|
| import org.jbpm.examples.hello.Greeter;
| import org.jbpm.examples.hello.HelloWorldService;
|
| public class TestInJBOSS {
|
| public static final String JBOSS_CONTEXT_FACTORY = "org.jnp.interfaces.NamingContextFactory";
| public static final String JBOSS_PROVIDER_URL = "jnp://192.168.18.100:1099";
| public static final String JBOSS_URL_PKG_PREFIXES = "org.jboss.naming:org.jnp.interfaces";
|
| public static void main(String[] args) throws Exception {
|
| // WSDL2Java.main(new
| // String[]{"http://192.168.18.100:8080/HelloWorld/Greeter?wsdl"});
|
| Properties prop = new Properties();
|
| prop.put(Context.INITIAL_CONTEXT_FACTORY, JBOSS_CONTEXT_FACTORY);
| prop.put(Context.PROVIDER_URL, JBOSS_PROVIDER_URL);
| prop.put(Context.URL_PKG_PREFIXES, JBOSS_URL_PKG_PREFIXES);
|
| InitialContext initial = new InitialContext(prop);
| HelloWorldService hws = (HelloWorldService) initial
| .lookup("java:comp/env/service/Hello");
| Greeter proxy = hws.getGreeterPort();
| // use proxy as local java object
| String greeting = proxy.sayHello("Popeye");
| System.out.print("echo : " + greeting);
| }
|
| }
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200902#4200902
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200902
More information about the jboss-user
mailing list