Meaningless Drivel is fun!*
The moose likes JBoss/WildFly and the fly likes JBoss error: Could not obtain connection... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBoss error: Could not obtain connection..." Watch "JBoss error: Could not obtain connection..." New topic
Author

JBoss error: Could not obtain connection...

Lu Jin
Greenhorn

Joined: Feb 22, 2003
Posts: 17
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?


SCJP, SCWCD, SCBCD, OCA, Next-->SCEA
Sanju Thomas
Ranch Hand

Joined: Dec 29, 2004
Posts: 243
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

Joined: Dec 12, 2005
Posts: 3
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

Joined: May 18, 2002
Posts: 72
I facing same problem ,it been solved by replace jbossall-client.jar from jboss server.

Thanks very much.


SCJP SCEA-I
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JBoss error: Could not obtain connection...
 
Similar Threads
Trouble in getting started with EJB3
Help required for JMS on Jboss server
please help ..... error while running program using eclipse
SocketTimeoutException when doing JNDI lookup
javax.naming.CommunicationException