users@glassfish.java.net

Re: JNDI lookup from outside glassfish

From: Tim Dudgeon <tdudgeon_at_informaticsmatters.com>
Date: Tue, 26 May 2009 21:11:45 +0100

Thanks, that helped. There was indeed no listener on that port.
There was an IIOP listener on port 3100 which was used for JNDI lookups
within glassfish.
I added an additional listener on port 3700 and now it works internally
and externally.

Is this a mistake in the configuration? Is it supposed to be 3100 (or
3700) as the default in both cases?

Tim


Aleksandras Novikovas wrote:
> >From nested exception looks like your glassfish does not accept
> connections on port 3700.
>
> -
> Aleksandras Novikovas
>
> E-mail: an_at_systemtier.com
>
>
>
> On Tue, 2009-05-26 at 20:27 +0100, Tim Dudgeon wrote:
>
>> I'm having difficulty creating a JNDI context for a standalone
>> application (running outside glassfish).
>> Getting the context is fine within glassfish.
>>
>> For what I understand the jndi.properties for an InitialContext running
>> on localhost is already defined inside the appserv-rt.jar, so all
>> that should be necessary is to have this on the classpath (along with
>> other necessary jars) and then all that is needed is:
>> InitialContext jndi = new InitialContext();
>>
>> But when I try I get the following exception.
>> (This is with glassfish 2.1 running inside Netbeans, and client app
>> running inside netbeans. OS is Linux. Java is 1.6).
>>
>> 26-May-2009 19:19:17
>> com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
>> WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType:
>> IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
>> org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
>> at
>> com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2690)
>> at
>> com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2711)
>> at
>> com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:261)
>> at
>> com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:274)
>> at
>> com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:130)
>> at
>> com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:192)
>> at
>> com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:181)
>> at
>> com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:325)
>> at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
>> at
>> org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
>> at
>> com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:134)
>> at
>> com.sun.enterprise.naming.SerialContext.getCachedProvider(SerialContext.java:259)
>> at
>> com.sun.enterprise.naming.SerialContext.getRemoteProvider(SerialContext.java:204)
>> at
>> com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:159)
>> at
>> com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:409)
>> at javax.naming.InitialContext.lookup(InitialContext.java:392)
>> at jmsclient.Main.<init>(Main.java:59)
>> at jmsclient.Main.main(Main.java:38)
>> Caused by: java.lang.RuntimeException: java.net.ConnectException:
>> Connection refused
>> at
>> com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:347)
>> at
>> com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:244)
>> ... 15 more
>> Caused by: java.net.ConnectException: Connection refused
>> at sun.nio.ch.Net.connect(Native Method)
>> at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
>> at
>> com.sun.corba.ee.impl.orbutil.ORBUtility.openSocketChannel(ORBUtility.java:105)
>> at
>> com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:332)
>> ... 16 more
>>
>>
>> What am I missing?
>>
>> Thanks
>> Tim
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>