users@glassfish.java.net

Re: OpenMQ and Glassfish 3.0

From: Edmondo Porcu <edmondo.porcu_at_gmail.com>
Date: Wed, 29 Dec 2010 16:54:23 +0100

Ok I clearly see the problem.
The problem is that even if I run remotely the app-client, it tries to
create a connection to localhost.
The reason is that the default_JMS_Host is localhost in Glassfish admin
console.

However, this "localhost" should be transformed to the server ip when
connected remotely.
I think I can solve changing from localhost to my ip .
This is however a bug

Best Regards


2010/12/29 Edmondo Porcu <edmondo.porcu_at_gmail.com>

> Good afternoon everybody,
> I was having a problem with Glassfish 3.1 concerning the app container and
> I went back to glassfish 3.0
>
> However, JMS does not work fine. I am running open mq in embedded mode, and
> I created a topic connection factory and few topics.
>
> Until my application client works in the same machine as glassfish,
> everything works fine.
> If however, I try to run the application on another machine this is what I
> get:
>
> 29 déc. 2010 15:36:08 com.sun.enterprise.connectors.jms.util.JmsRaUtil
> getInstalledMqVersion
> WARNING: jmsra.upgrade_check_failed
> 29 déc. 2010 15:36:09 org.hibernate.validator.util.Version <clinit>
> INFO: Hibernate Validator bean-validator-3.0-JBoss-4.0.2
> 29 déc. 2010 15:36:09
> org.hibernate.validator.engine.resolver.DefaultTraversableResolver detectJPA
> INFO: Instantiated an instance of
> org.hibernate.validator.engine.resolver.JPATraversableResolver.
> 29 déc. 2010 15:36:09 com.sun.messaging.jms.ra.ResourceAdapter start
> INFO: MQJMSRA_RA1101: SJSMQ JMS Resource Adapter starting: REMOTE
> 29 déc. 2010 15:36:10 com.sun.messaging.jmq.jmsclient.ExceptionHandler
> throwConnectionException
> WARNING: [C4003]: Error occurred on connection creation [localhost:7676]. -
> cause: java.net.ConnectException: Connection refused: connect
> 29 déc. 2010 15:36:16 com.sun.messaging.jmq.jmsclient.ExceptionHandler
> throwConnectionException
> WARNING: [C4003]: Error occurred on connection creation [localhost:7676]. -
> cause: java.net.ConnectException: Connection refused: connect
> 29 déc. 2010 15:36:21 com.sun.messaging.jmq.jmsclient.ExceptionHandler
> throwConnectionException
> WARNING: [C4003]: Error occurred on connection creation [localhost:7676]. -
> cause: java.net.ConnectException: Connection refused: connect
> 29 déc. 2010 15:36:27 com.sun.messaging.jmq.jmsclient.ExceptionHandler
> throwConnectionException
> WARNING: [C4003]: Error occurred on connection creation [localhost:7676]. -
> cause: java.net.ConnectException: Connection refused: connect
> 29 déc. 2010 15:36:33 com.sun.messaging.jmq.jmsclient.ExceptionHandler
> throwConnectionException
> WARNING: [C4003]: Error occurred on connection creation [localhost:7676]. -
> cause: java.net.ConnectException: Connection refused: connect
> 29 déc. 2010 15:36:39 com.sun.messaging.jmq.jmsclient.ExceptionHandler
> throwConnectionException
> WARNING: [C4003]: Error occurred on connection creation [localhost:7676]. -
> cause: java.net.ConnectException: Connection refused: connect
> 29 déc. 2010 15:36:45 com.sun.messaging.jmq.jmsclient.ExceptionHandler
> throwConnectionException
> WARNING: [C4003]: Error occurred on connection creation [localhost:7676]. -
> cause: java.net.ConnectException: Connection refused: connect
> 29 déc. 2010 15:36:51 com.sun.messaging.jmq.jmsclient.ExceptionHandler
> throwConnectionException
> WARNING: [C4003]: Error occurred on connection creation [localhost:7676]. -
> cause: java.net.ConnectException: Connection refused: connect
> 29 déc. 2010 15:36:57 com.sun.messaging.jmq.jmsclient.ExceptionHandler
> throwConnectionException
> WARNING: [C4003]: Error occurred on connection creation [localhost:7676]. -
> cause: java.net.ConnectException: Connection refused: connect
> 29 déc. 2010 15:36:57 com.sun.messaging.jms.ra.ResourceAdapter start
> SEVERE: MQJMSRA_RA4001: start:Aborting:JMSException on
> createConnection=[C4003]: Error occurred on connection creation
> [localhost:7676]. - cause: java.net.ConnectException: Connection refused:
> connect
> com.sun.messaging.jms.JMSException: [C4003]: Error occurred on connection
> creation [localhost:7676]. - cause: java.net.ConnectException: Connection
> refused: connect
> at
> com.sun.messaging.jmq.jmsclient.ExceptionHandler.throwConnectionException(ExceptionHandler.java:274)
> at
> com.sun.messaging.jmq.jmsclient.ExceptionHandler.handleConnectException(ExceptionHandler.java:220)
> at
> com.sun.messaging.jmq.jmsclient.PortMapperClient.readBrokerPorts(PortMapperClient.java:241)
> at
> com.sun.messaging.jmq.jmsclient.PortMapperClient.init(PortMapperClient.java:150)
> at
> com.sun.messaging.jmq.jmsclient.PortMapperClient.<init>(PortMapperClient.java:92)
> at
> com.sun.messaging.jmq.jmsclient.protocol.tcp.TCPConnectionHandler.<init>(TCPConnectionHandler.java:165)
> at
> com.sun.messaging.jmq.jmsclient.protocol.tcp.TCPStreamHandler.openConnection(TCPStreamHandler.java:135)
> at
> com.sun.messaging.jmq.jmsclient.ConnectionInitiator.createConnection(ConnectionInitiator.java:778)
> at
> com.sun.messaging.jmq.jmsclient.ConnectionInitiator.createConnectionNew(ConnectionInitiator.java:254)
> at
> com.sun.messaging.jmq.jmsclient.ConnectionInitiator.createConnection(ConnectionInitiator.java:208)
> at
> com.sun.messaging.jmq.jmsclient.ConnectionInitiator.createConnection(ConnectionInitiator.java:158)
> at
> com.sun.messaging.jmq.jmsclient.ProtocolHandler.init(ProtocolHandler.java:836)
> at
> com.sun.messaging.jmq.jmsclient.ProtocolHandler.<init>(ProtocolHandler.java:1528)
> at
> com.sun.messaging.jmq.jmsclient.ConnectionImpl.openConnection(ConnectionImpl.java:2366)
> at
> com.sun.messaging.jmq.jmsclient.ConnectionImpl.init(ConnectionImpl.java:1047)
> at
> com.sun.messaging.jmq.jmsclient.ConnectionImpl.<init>(ConnectionImpl.java:433)
> at
> com.sun.messaging.jmq.jmsclient.UnifiedConnectionImpl.<init>(UnifiedConnectionImpl.java:60)
> at
> com.sun.messaging.jmq.jmsclient.XAConnectionImpl.<init>(XAConnectionImpl.java:58)
> at
> com.sun.messaging.XAConnectionFactory.createXAConnection(XAConnectionFactory.java:91)
> at
> com.sun.messaging.XAConnectionFactory.createXAConnection(XAConnectionFactory.java:69)
> at
> com.sun.messaging.jms.ra.ResourceAdapter.start(ResourceAdapter.java:321)
> at
> com.sun.enterprise.connectors.jms.system.ActiveJmsResourceAdapter$1.run(ActiveJmsResourceAdapter.java:357)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> com.sun.enterprise.connectors.jms.system.ActiveJmsResourceAdapter.startResourceAdapter(ActiveJmsResourceAdapter.java:350)
> at
> com.sun.enterprise.connectors.ActiveOutboundResourceAdapter.init(ActiveOutboundResourceAdapter.java:130)
> at
> com.sun.enterprise.connectors.inbound.ActiveInboundResourceAdapterImpl.init(ActiveInboundResourceAdapterImpl.java:86)
> at
> com.sun.enterprise.connectors.ActiveRAFactory.instantiateActiveResourceAdapter(ActiveRAFactory.java:130)
> at
> com.sun.enterprise.connectors.ActiveRAFactory.createActiveResourceAdapter(ActiveRAFactory.java:101)
> at
> com.sun.enterprise.connectors.service.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:216)
> at
> com.sun.enterprise.connectors.ConnectorRuntime.createActiveResourceAdapter(ConnectorRuntime.java:349)
> at
> com.sun.enterprise.resource.naming.ConnectorObjectFactory.getObjectInstance(ConnectorObjectFactory.java:108)
> at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
> at
> com.sun.enterprise.naming.impl.SerialContext.getObjectInstance(SerialContext.java:472)
> at
> com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:437)
> at javax.naming.InitialContext.lookup(Unknown Source)
> at
> com.gtw.terminal.connectors.RemoteServerConnector.registerOnTopic(RemoteServerConnector.java:63)
> at
> com.gtw.terminal.windows.GottwareRemoteMainWindow$LoadCurvePanelTask.doInBackground(GottwareRemoteMainWindow.java:122)
> at
> com.gtw.terminal.windows.GottwareRemoteMainWindow$LoadCurvePanelTask.doInBackground(GottwareRemoteMainWindow.java:108)
> at javax.swing.SwingWorker$1.call(Unknown Source)
> at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
> at java.util.concurrent.FutureTask.run(Unknown Source)
> at javax.swing.SwingWorker.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
> Caused by: java.net.ConnectException: Connection refused: connect
> 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.SocksSocketImpl.connect(Unknown Source)
> at java.net.Socket.connect(Unknown Source)
> at java.net.Socket.connect(Unknown Source)
> at java.net.Socket.<init>(Unknown Source)
> at java.net.Socket.<init>(Unknown Source)
> at
> com.sun.messaging.jmq.jmsclient.PortMapperClient.makeSocketWithTimeout(PortMapperClient.java:268)
> at
> com.sun.messaging.jmq.jmsclient.PortMapperClient.readBrokerPorts(PortMapperClient.java:220)
> ... 42 more
> 29 déc. 2010 15:36:57
> com.sun.enterprise.connectors.ActiveOutboundResourceAdapter init
> SEVERE: rardeployment.start_failed
> javax.resource.spi.ResourceAdapterInternalException:
> java.security.PrivilegedActionException:
> javax.resource.spi.ResourceAdapterInternalException: MQJMSRA_RA4001:
> start:Aborting:JMSException on createConnection=[C4003]: Error occurred on
> connection creation [localhost:7676]. - cause: java.net.ConnectException:
> Connection refused: connect
> at
> com.sun.enterprise.connectors.jms.system.ActiveJmsResourceAdapter.startResourceAdapter(ActiveJmsResourceAdapter.java:366)
> at
> com.sun.enterprise.connectors.ActiveOutboundResourceAdapter.init(ActiveOutboundResourceAdapter.java:130)
> at
> com.sun.enterprise.connectors.inbound.ActiveInboundResourceAdapterImpl.init(ActiveInboundResourceAdapterImpl.java:86)
> at
> com.sun.enterprise.connectors.ActiveRAFactory.instantiateActiveResourceAdapter(ActiveRAFactory.java:130)
> at
> com.sun.enterprise.connectors.ActiveRAFactory.createActiveResourceAdapter(ActiveRAFactory.java:101)
> at
> com.sun.enterprise.connectors.service.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:216)
> at
> com.sun.enterprise.connectors.ConnectorRuntime.createActiveResourceAdapter(ConnectorRuntime.java:349)
> at
> com.sun.enterprise.resource.naming.ConnectorObjectFactory.getObjectInstance(ConnectorObjectFactory.java:108)
> at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
> at
> com.sun.enterprise.naming.impl.SerialContext.getObjectInstance(SerialContext.java:472)
> at
> com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:437)
> at javax.naming.InitialContext.lookup(Unknown Source)
> at
> com.gtw.terminal.connectors.RemoteServerConnector.registerOnTopic(RemoteServerConnector.java:63)
> at
> com.gtw.terminal.windows.GottwareRemoteMainWindow$LoadCurvePanelTask.doInBackground(GottwareRemoteMainWindow.java:122)
> at
> com.gtw.terminal.windows.GottwareRemoteMainWindow$LoadCurvePanelTask.doInBackground(GottwareRemoteMainWindow.java:108)
> at javax.swing.SwingWorker$1.call(Unknown Source)
> at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
> at java.util.concurrent.FutureTask.run(Unknown Source)
> at javax.swing.SwingWorker.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
> Caused by: java.security.PrivilegedActionException:
> javax.resource.spi.ResourceAdapterInternalException: MQJMSRA_RA4001:
> start:Aborting:JMSException on createConnection=[C4003]: Error occurred on
> connection creation [localhost:7676]. - cause: java.net.ConnectException:
> Connection refused: connect
> at java.security.AccessController.doPrivileged(Native Method)
> at
> com.sun.enterprise.connectors.jms.system.ActiveJmsResourceAdapter.startResourceAdapter(ActiveJmsResourceAdapter.java:350)
> ... 21 more
> Caused by: javax.resource.spi.ResourceAdapterInternalException:
> MQJMSRA_RA4001: start:Aborting:JMSException on createConnection=[C4003]:
> Error occurred on connection creation [localhost:7676]. - cause:
> java.net.ConnectException: Connection refused: connect
> at
> com.sun.messaging.jms.ra.ResourceAdapter.start(ResourceAdapter.java:333)
> at
> com.sun.enterprise.connectors.jms.system.ActiveJmsResourceAdapter$1.run(ActiveJmsResourceAdapter.java:357)
> ... 23 more
> Caused by: com.sun.messaging.jms.JMSException: [C4003]: Error occurred on
> connection creation [localhost:7676]. - cause: java.net.ConnectException:
> Connection refused: connect
> at
> com.sun.messaging.jmq.jmsclient.ExceptionHandler.throwConnectionException(ExceptionHandler.java:274)
> at
> com.sun.messaging.jmq.jmsclient.ExceptionHandler.handleConnectException(ExceptionHandler.java:220)
> at
> com.sun.messaging.jmq.jmsclient.PortMapperClient.readBrokerPorts(PortMapperClient.java:241)
> at
> com.sun.messaging.jmq.jmsclient.PortMapperClient.init(PortMapperClient.java:150)
> at
> com.sun.messaging.jmq.jmsclient.PortMapperClient.<init>(PortMapperClient.java:92)
> at
> com.sun.messaging.jmq.jmsclient.protocol.tcp.TCPConnectionHandler.<init>(TCPConnectionHandler.java:165)
> at
> com.sun.messaging.jmq.jmsclient.protocol.tcp.TCPStreamHandler.openConnection(TCPStreamHandler.java:135)
> at
> com.sun.messaging.jmq.jmsclient.ConnectionInitiator.createConnection(ConnectionInitiator.java:778)
> at
> com.sun.messaging.jmq.jmsclient.ConnectionInitiator.createConnectionNew(ConnectionInitiator.java:254)
> at
> com.sun.messaging.jmq.jmsclient.ConnectionInitiator.createConnection(ConnectionInitiator.java:208)
> at
> com.sun.messaging.jmq.jmsclient.ConnectionInitiator.createConnection(ConnectionInitiator.java:158)
> at
> com.sun.messaging.jmq.jmsclient.ProtocolHandler.init(ProtocolHandler.java:836)
> at
> com.sun.messaging.jmq.jmsclient.ProtocolHandler.<init>(ProtocolHandler.java:1528)
> at
> com.sun.messaging.jmq.jmsclient.ConnectionImpl.openConnection(ConnectionImpl.java:2366)
> at
> com.sun.messaging.jmq.jmsclient.ConnectionImpl.init(ConnectionImpl.java:1047)
> at
> com.sun.messaging.jmq.jmsclient.ConnectionImpl.<init>(ConnectionImpl.java:433)
> at
> com.sun.messaging.jmq.jmsclient.UnifiedConnectionImpl.<init>(UnifiedConnectionImpl.java:60)
> at
> com.sun.messaging.jmq.jmsclient.XAConnectionImpl.<init>(XAConnectionImpl.java:58)
> at
> com.sun.messaging.XAConnectionFactory.createXAConnection(XAConnectionFactory.java:91)
> at
> com.sun.messaging.XAConnectionFactory.createXAConnection(XAConnectionFactory.java:69)
> at
> com.sun.messaging.jms.ra.ResourceAdapter.start(ResourceAdapter.java:321)
> ... 24 more
> Caused by: java.net.ConnectException: Connection refused: connect
> 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.SocksSocketImpl.connect(Unknown Source)
> at java.net.Socket.connect(Unknown Source)
> at java.net.Socket.connect(Unknown Source)
> at java.net.Socket.<init>(Unknown Source)
> at java.net.Socket.<init>(Unknown Source)
> at
> com.sun.messaging.jmq.jmsclient.PortMapperClient.makeSocketWithTimeout(PortMapperClient.java:268)
> at
> com.sun.messaging.jmq.jmsclient.PortMapperClient.readBrokerPorts(PortMapperClient.java:220)
> ... 42 more
> 29 déc. 2010 15:39:07
> com.gtw.terminal.windows.GottwareRemoteMainWindow$CurveMenuAction
> actionPerformed
> INFO: GottwareRemoteMainWindow: Restoring a curve panel for curve EUR Ois
> Curve
>
> Is there any problem with "EMBEDDED" open mq?
>
> Best Regards
> Edmondo
>