[jboss-user] [JNDI/Naming/Network] - javax.naming.CommunicationException
adoorsarath
do-not-reply at jboss.com
Wed Jun 20 09:20:42 EDT 2007
sir,
I got the javax.naming.CommunicationException when I
started writing my first JMS program.
The code snippet is given below
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
properties.put(Context.PROVIDER_URL, "jnp://192.168.17.101:1099");
InitialContext jndiContext = new InitialContext(properties);
TopicConnectionFactory conFactory =
(TopicConnectionFactory)jndiContext.lookup("TopicConnectionFactory");
Error is there in JNDI lookup operation . If the client is there on the same machine it works fine.But if the client is Remote,it is showing the following error message
Error Message
Exception in thread "main" javax.naming.CommunicationException: Receive timed ou
t [Root exception is java.net.SocketTimeoutException: Receive timed out]
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:12
80)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1360)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:575)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:568)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at Client.main(Client.java:27)
Caused by: java.net.SocketTimeoutException: Receive timed out
at java.net.PlainDatagramSocketImpl.receive(Native Method)
at java.net.DatagramSocket.receive(DatagramSocket.java:711)
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:12
50)
... 5 more
would you please help me in correcting this error.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056018#4056018
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056018
More information about the jboss-user
mailing list