| From | Sent On | Attachments |
|---|---|---|
| glas...@javadesktop.org | Dec 3, 2009 2:11 am | |
| glas...@javadesktop.org | Feb 19, 2010 8:24 am | |
| glas...@javadesktop.org | Feb 19, 2010 10:04 am |
| Subject: | appclient with multiple lookup to multiple appserver | |
|---|---|---|
| From: | glas...@javadesktop.org (glas...@javadesktop.org) | |
| Date: | Dec 3, 2009 2:11:03 am | |
| List: | net.java.dev.glassfish.users | |
Hi there,
we have an appclient which communication to an appserver. The configuration for
the communication is in a property file which is used for initialize the
initialcontext.
No we have the task to support multiple appserver. This means, if the appserver1
is down we have to switch to appserver2. This should not be done by extends the
jndi url.
If I test the mechanism I get following exception:
Caused by: javax.naming.CommunicationException: Can't find SerialContextProvider
[Root exception is org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201
completed: No]
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:165)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:398)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at
com.hartter.vsop.j2ee.jms.comm.JmsHartterUtil.getJndiJmsQueueContainer(JmsHartterUtil.java:312)
... 10 more
Caused by: 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:131)
at
com.sun.enterprise.naming.SerialContext.getRemoteProvider(SerialContext.java:220)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:160)
... 13 more
Caused by: java.lang.RuntimeException:
java.nio.channels.UnresolvedAddressException
at
com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:347)
at
com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:244)
... 23 more
Caused by: java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Net.java:30)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:451)
at
com.sun.corba.ee.impl.orbutil.ORBUtility.openSocketChannel(ORBUtility.java:105)
at
com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:332)
... 24 more
The reason for the exception is the wrong configured hostname.
In the second try I get following exception:
Caused by: javax.naming.CommunicationException: serial context communication ex
[Root exception is com.sun.enterprise.connectors.ConnectorRuntimeException:
Failed to look up ConnectorDescriptor from JNDI]
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:427)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at
com.hartter.vsop.j2ee.jms.comm.JmsHartterUtil.getJndiJmsQueueContainer(JmsHartterUtil.java:312)
... 10 more
Caused by: com.sun.enterprise.connectors.ConnectorRuntimeException: Failed to
look up ConnectorDescriptor from JNDI
at
com.sun.enterprise.naming.factory.ConnectorObjectFactory.getObjectInstance(ConnectorObjectFactory.java:98)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:403)
... 12 more
I don't understand the reason for this exception. Between the exceptions I close
the old InitialContext and create a new InitialContext.
InitialContext - Parameters:
org.omg.CORBA.ORBInitialHost = wronghost
org.omg.CORBA.ORBInitialPort = 3700
java.naming.factory.initial = com.sun.enterprise.naming.SerialInitContextFactory
java.naming.factory.url.pkgs = com.sun.enterprise.naming
java.naming.factory.state =
com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl
org.omg.CORBA.ORBInitialHost = correcthost
If I try with the correct hostname, everything works fine.
Has someone an idea?
Is it not possible to initialize a second InitialContext with different
parameters?
Thanks...
Bernd [Message sent by forum member 'speedybv' ]





