I want to connect to a Jboss Jms queues ,send and receive the Message from the queues ,
I config the Jboss at ip: 10.4.0.111, I can send and receive message on the same machine ..
but how can I do this at another machine ?
when I run the program ,the error is :
...
javax.naming.CommunicationException [Root exception is java.rmi.NoSuchObjectException: no such object in table]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:647)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.fiosysj.gateway.himawari.Testjms.TestConnectJMS.(TestConnectJMS.java:29)
at com.fiosysj.gateway.himawari.Testjms.TestConnectJMS.main(TestConnectJMS.java:10)
Caused by: java.rmi.NoSuchObjectException: no such object in table
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:528
My program :
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
properties.put(Context.URL_PKG_PREFIXES, "org.jboss.namingrg.jnp.interfaces");
properties.put(Context.PROVIDER_URL, "jnp://10.4.0.111:1099");
ctx = new InitialContext(properties);
myQConnFactory = (QueueConnectionFactory) ctx
.lookup("ConnectionFactory");
myQueue = (Queue) ctx.lookup("queue/PmsOrderQueue");
ctx.bind("SimpleSed21", myQueue);
I am beginner of jboss , I can not find any useful document ...
I found some content on jboss 3.2. , but JBoss4.0 is deferent ...
could you tell me how to config the JBoss4.0 Server ?
thank you very much ..
This is jndi problem, not a jms problem.
The message says the rmi stub is no longer valid, maybe because your network
config is screwed and it is connecting to the server or maybe you have an
rmi registry rather than jboss/ns on 1099?