Issue Details (XML | Word | Printable)

Key: GLASSFISH-16326
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Snjezana Sevo-Zenzerovic
Reporter: oszhatife
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
glassfish

javaee6 sample does not run on remote GF 3.1

Created: 06/Apr/11 04:17 PM   Updated: 08/Dec/11 11:28 PM
Component/s: sample_apps
Affects Version/s: 3.1
Fix Version/s: None

Time Tracking:
Not Specified

Tags: 3_1_1-exclude 3_1_1-scrubbed 3_1_2-exclude
Participants: Harshad Vilekar, oszhatife, scatari, Snjezana Sevo-Zenzerovic and Tim Quinn


 Description  « Hide

I installed javaee6 with samples:
java_ee_sdk-6u2-jdk-linux-x64-ml.sh

I can run "automatic-timer" sample properly, when GF 3.1 runs on localhost.

If GF 3.1 runs on a remte host.
I set the remote GF 3.1 in bp-project/build.properties:
javaee.server.name=192.168.1.101

Now automatic-timer sample does not run:

[java] Waiting for the timer to expire
[java] Logged timeouts :
[java] org.omg.CORBA.COMM_FAILURE: FINE: IOP00410001: Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700 vmcid: OMG minor code: 1 completed: No
[java] at sun.reflect.GeneratedConstructorAccessor30.newInstance(Unknown Source)
[java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[java] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[java] at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:248)
[java] at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:95)
[java] at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.handleFullLogging(WrapperGenerator.java:387)
[java] at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.access$400(WrapperGenerator.java:107)
[java] at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator$2.invoke(WrapperGenerator.java:511)
[java] at com.sun.corba.ee.spi.orbutil.proxy.CompositeInvocationHandlerImpl.invoke(CompositeInvocationHandlerImpl.java:99)
[java] at $Proxy26.connectFailure(Unknown Source)
[java] at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:257)
[java] at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:270)
[java] at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:129)
[java] at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:223)
[java] at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:228)
[java] at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:393)
[java] at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
[java] at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
[java] at com.sun.enterprise.naming.impl.SerialContext$ProviderCacheKey.getNameService(SerialContext.java:1241)
[java] at com.sun.enterprise.naming.impl.SerialContext.getRemoteProvider(SerialContext.java:411)
[java] at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialContext.java:347)
[java] at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:504)
[java] at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:455)
[java] at javax.naming.InitialContext.lookup(InitialContext.java:392)
[java] at enterprise.automatic_timer_client.AutomaticTimerJavaClient.getRecords(AutomaticTimerJavaClient.java:64)
[java] at enterprise.automatic_timer_client.AutomaticTimerJavaClient.main(AutomaticTimerJavaClient.java:53)
[java] Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused
[java] at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:340)
[java] at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:242)
[java] ... 15 more
[java] Caused by: java.net.ConnectException: Connection refused
[java] at sun.nio.ch.Net.connect(Native Method)
[java] at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:500)
[java] at com.sun.corba.ee.impl.orbutil.ORBUtility.openSocketChannel(ORBUtility.java:110)
[java] at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:325)
[java] ... 16 more
[java] javax.naming.NamingException: Lookup failed for 'java:global/automatic-timer-ejb/StatelessSessionBean' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.url.pkgs=com.sun.enterprise.naming, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl} [Root exception is javax.naming.NamingException: Unable to acquire SerialContextProvider for SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.url.pkgs=com.sun.enterprise.naming, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl} [Root exception is org.omg.CORBA.COMM_FAILURE: FINE: IOP00410001: Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700 vmcid: OMG minor code: 1 completed: No]]
[java] at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:518)
[java] at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:455)
[java] at javax.naming.InitialContext.lookup(InitialContext.java:392)
[java] at enterprise.automatic_timer_client.AutomaticTimerJavaClient.getRecords(AutomaticTimerJavaClient.java:64)
[java] at enterprise.automatic_timer_client.AutomaticTimerJavaClient.main(AutomaticTimerJavaClient.java:53)
[java] Caused by: javax.naming.NamingException: Unable to acquire SerialContextProvider for SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.url.pkgs=com.sun.enterprise.naming, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl} [Root exception is org.omg.CORBA.COMM_FAILURE: FINE: IOP00410001: Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700 vmcid: OMG minor code: 1 completed: No]
[java] at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialContext.java:352)
[java] at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:504)
[java] ... 4 more
[java] Caused by: org.omg.CORBA.COMM_FAILURE: FINE: IOP00410001: Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700 vmcid: OMG minor code: 1 completed: No
[java] at sun.reflect.GeneratedConstructorAccessor30.newInstance(Unknown Source)
[java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[java] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[java] at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:248)
[java] at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:95)
[java] at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.handleFullLogging(WrapperGenerator.java:387)
[java] at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.access$400(WrapperGenerator.java:107)
[java] at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator$2.invoke(WrapperGenerator.java:511)
[java] at com.sun.corba.ee.spi.orbutil.proxy.CompositeInvocationHandlerImpl.invoke(CompositeInvocationHandlerImpl.java:99)
[java] at $Proxy26.connectFailure(Unknown Source)
[java] at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:257)
[java] at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:270)
[java] at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:129)
[java] at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:223)
[java] at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:228)
[java] at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:393)
[java] at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
[java] at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
[java] at com.sun.enterprise.naming.impl.SerialContext$ProviderCacheKey.getNameService(SerialContext.java:1241)
[java] at com.sun.enterprise.naming.impl.SerialContext.getRemoteProvider(SerialContext.java:411)
[java] at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialContext.java:347)
[java] ... 5 more
[java] Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused
[java] at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:340)
[java] at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:242)
[java] ... 15 more
[java] Caused by: java.net.ConnectException: Connection refused
[java] at sun.nio.ch.Net.connect(Native Method)
[java] at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:500)
[java] at com.sun.corba.ee.impl.orbutil.ORBUtility.openSocketChannel(ORBUtility.java:110)
[java] at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:325)
[java] ... 16 more
[java] Exception in thread "main" java.lang.NullPointerException
[java] at enterprise.automatic_timer_client.AutomaticTimerJavaClient.main(AutomaticTimerJavaClient.java:54)

Why does it use localhost instead of 192.168.1.106 ?
How can I run the sample against a remote GF 3.1 ?

Thank you



Tim Quinn added a comment - 07/Apr/11 07:21 AM

Transfering to the ORB team, since the stack trace indicates the ORB cannot connect to the server.


Tim Quinn added a comment - 07/Apr/11 07:24 AM

Forgot to change owner.


Harshad Vilekar added a comment - 31/Oct/11 08:49 PM

For automatic-timer-client, please set the system property "org.omg.CORBA.ORBInitialHost" to point to the remote host running GlasFish.

For example, If the GlassFish server is running on 192.168.1.106, the automatic timer client on remote host works fine after adding following line to glassfish/samples/bp-project/java-client-ant.xml:
<jvmarg value="-Dorg.omg.CORBA.ORBInitialHost=192.168.1.106"/>

The sample build files and instructions need to be updated with this information.


scatari added a comment - 08/Dec/11 11:28 PM

Will be supported in a feature release.