Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JBoss error: Could not obtain connection...

 
Lu Jin
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using JBoss-4.0.4RC1, when I do the jndi lookup for remote interface, I get the error:

--------------------------------------------------------------------------
01:14:53,156 ERROR [STDERR] javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Failed to connect to server 192.168.0.111:1100 [Root exception is java.lang.ClassCastException: $Proxy353] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost
:1099 [Root exception is java.lang.ClassCastException: org.jnp.server.NamingServer_Stub]]
01:14:53,156 ERROR [STDERR] at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1414
)
01:14:53,156 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:594)
01:14:53,156 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
01:14:53,156 ERROR [STDERR] at javax.naming.InitialContext.lookup(InitialContext.java:351)
---------------------------------------------------------------------------

Context.INITIAL_CONTEXT_FACTORY=org.jnp.interfaces.NamingContextFactory
Context.PROVIDER_URL=jnp://localhost:1099
Context.URL_PKG_PREFIXES=org.jboss.naming rg.jnp.interfaces

are there any errors with my configuration?
 
Sanju Thomas
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like you are using different version client.jar in the Client end. take the jboss-client jar from the JBOSS_HOME/client/ and put it in your client's class path.
 
Craig Caulfield
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've just overcome a similar problem. All I did was replace jboss-client.jar with jbossall-client.jar in my classpath.

See if it works for you.
 
Chen ZhiJiang
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I facing same problem ,it been solved by replace jbossall-client.jar from jboss server.

Thanks very much.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic