Hi,

Yep, seen this couple of times already. Either there's a bug somewhere or
some config is in a very unobvious places.

I was getting similar exceptions yesterday when trying to bind a
DataSource to JNP (all local machines):

> > javax.naming.ServiceUnavailableException: Connection refused: no
further
> > information.  Root exception is java.net.ConnectException: Connection
refused: no
> > further information
> >         at java.net.PlainSocketImpl.socketConnect(Native Method)
> >         at java.net.PlainSocketImpl.doConnect(Unknown Source)
> >         at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
> >         at java.net.PlainSocketImpl.connect(Unknown Source)
> >         at java.net.Socket.<init>(Unknown Source)
> >         at java.net.Socket.<init>(Unknown Source)
> >         at
org.jnp.interfaces.NamingContext.getServer(NamingContext.java:88)
> >         at
org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:617)
org.jnp.interfaces.NamingContext.getServer(NamingContext.java:88)
> >         at
org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:617)
> >         at
org.jnp.interfaces.NamingContext.bind(NamingContext.java:229)
> >         at
org.jnp.interfaces.NamingContext.bind(NamingContext.java:222)
> >         at javax.naming.InitialContext.bind(Unknown Source)
> >         at org.jboss.jdbc.DataSourceImpl.bind(DataSourceImpl.java:225)
> >         at
org.jboss.jdbc.DataSourceImpl.initService(DataSourceImpl.java:99)
> >         at
org.jboss.util.ServiceMBeanSupport.init(ServiceMBeanSupport.java:64)
> >         at
org.jboss.util.ServiceMBeanSupport.preRegister(ServiceMBeanSupport.java:154)
> >         at java.lang.reflect.Method.invoke(Native Method)
> >         at
javax.management.MBeanServer.preRegisterInvoker(MBeanServer.java:2253)
> >         at
javax.management.MBeanServer.createMBean(MBeanServer.java:721)
> >         at
javax.management.loading.MLet.getMBeansFromURL(MLet.java:385)
> >         at
javax.management.loading.MLet.getMBeansFromURL(MLet.java:208)
> >         at org.jboss.Main.<init>(Main.java:111)
> >         at org.jboss.Main.<init>(Main.java:86)
> >         at org.jboss.Main$1.run(Main.java:76)
> >         at java.security.AccessController.doPrivileged(Native Method)
> >         at org.jboss.Main.main(Main.java:67)


JNP is initialized but refuses connections for whatever reason. It's
fucked up.


-- Juha



On Thu, 17 Aug 2000, Tobias wrote:

> Hi!
> I just switched from the SUN J2EE server to jBoss, becaus I had a lot of
> trouble with J2EE. I hope, I'll get some more help here :-)
> 
> My problem:
> 
> The following code works well, when the client is executed on the same
> machine on which the server resides:
> 
> Hashtable env = null;
> env = new Hashtable();
> env.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
> env.put(Context.PROVIDER_URL,"server.company.com");
> env.put("java.naming.factory.url.pkgs","org.jboss.naming");
> Context initial = new InitialContext(env);
> java.lang.Object objref = initial.lookup("TestBean");
> EJBTestHome home = (EJBTestHome) PortableRemoteObject.narrow(objref,
> EJBTestHome.class);
> ...
> 
> If I run this code on a remote machine I get:
> 
> javax.naming.CommunicationException.  Root exception is
> java.rmi.ConnectException: Connection refused to host: localhost; nested
> exception is:
>         java.net.ConnectException: Connection refused: no further
> information
> java.net.ConnectException: Connection refused: no further information
>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>         at java.net.PlainSocketImpl.doConnect(Unknown Source)
>         at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
>         at java.net.PlainSocketImpl.connect(Unknown Source)
>         at java.net.Socket.<init>(Unknown Source)
>         at java.net.Socket.<init>(Unknown Source)
>         at
> sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown
> Source)
>         at
> sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown
> Source)
>         at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
>         at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown
> Source)
>         at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown
> Source)
>         at sun.rmi.server.UnicastRef.invoke(Unknown Source)
>         at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
>         at
> org.jnp.interfaces.NamingContext.lookup(NamingContext.java:280)
>         at
> org.jnp.interfaces.NamingContext.lookup(NamingContext.java:265)
>         at javax.naming.InitialContext.lookup(Unknown Source)
>         at TestClient.main(TestClient.java:30)
> 
> What am I doing wrong ? I also tried to set the
> org.omg.CORBA.ORBInitialHost property, no effect. I just don't
> understand, why the client still tries to connect to the localhost, as
> the exception message states.
> 
> Please help me ! I am really tiered of setting servers up :-/ ...
> 
> Ciao,
> Tobias
> 
> 
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]
> 
> 



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to