[jboss-user] [JNDI and Naming] - Cannot Start NamingBeanImpl on Mac OSX 10.6.4

Mark Hansen do-not-reply at jboss.com
Tue Oct 19 10:21:29 EDT 2010


Mark Hansen [http://community.jboss.org/people/khookguy12] created the discussion

"Cannot Start NamingBeanImpl on Mac OSX 10.6.4"

To view the discussion, visit: http://community.jboss.org/message/567197#567197

--------------------------------------------------------------
For unit testing, I need to start NamingBeanImpl as a standalone service (without starting my container - JBoss AS 5.1.0.GA).  I cannot get it to work on my Mac OSX 10.6.4.

Specifically, I'm trying to implement unit tests (TestNG) with HornetQ standalone with Spring, and have followed various tutorials.
(e.g.,  http://www.javacodegeeks.com/2010/06/spring-3-hornetq-21-integration.html http://www.javacodegeeks.com/2010/06/spring-3-hornetq-21-integration.html)

I cannot get org.jnp.server.NamingBeanImpl to start.  Gives me:

Caused  by: javax.naming.CommunicationException: Failed to connect to server  /127.0.0.1:1099 [Root exception is  javax.naming.ServiceUnavailableException: Failed to connect to server  /127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection  refused]]

However, if JBoss is running in a separate JVM, then I have no problems starting NamingBeanImpl

I have this in Spring:

<bean name="namingServerImpl" class="org.jnp.server.NamingBeanImpl"
        init-method="start" destroy-method="stop"/>

I've also tried a basic test like this:

NamingBeanImpl jnpServer = new NamingBeanImpl();
jnpServer.start();

Again, when JBoss is running elsewhere, it works.  Otherwise, I get the "Connection Refused" exception.

JNDI is set up with jndi.properties -

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=jnp://127.0.0.1:1099

I've  also tried starting the rmiregistry in a separate JVM.  (Since I seem  to recall that sometimes on OS X, this is necessary).  Then the  NamingBeanImpl hangs.  Do I also need to start something else on port  1098?

Any help would be much appreciated!!
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/567197#567197]

Start a new discussion in JNDI and Naming at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2083]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20101019/c2a8044d/attachment.html 


More information about the jboss-user mailing list