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
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.
I understood the problem.JBoss serever was down