A GlassFish Instance Doesn't Start Due to a java.lang.NoSuchMethodError Causing a JMS Resource Adapter Failure After Upgrading or Patching the Installation (Doc ID 1298870.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle GlassFish Server - Version 2.1.1 and later
Oracle GlassFish Enterprise Service Bus - Version 2.1 and later
Information in this document applies to any platform.

Symptoms

After performing an in-place upgrade or applying a patch to a GlassFish Server installation, you see an error reporting that the Resource Adapter failed to start due to a NoSuchMethodError.  For example:

[#|2011-02-22T15:23:50.404-0600|SEVERE|sun-appserver2.1.1|javax.enterprise.resource.resourceadapter|_ThreadID=10;_ThreadName=main;_RequestID=d658967f-8eaa-4bfe-bcf9-8e4ad8d2a221;|RAR6035 : Resource adapter start failed : {0}
java.lang.NoSuchMethodError: com.sun.messaging.jmq.jmsserver.Globals.getClusterDiscoveryService()Lcom/sun/messaging/jmq/jmsserver/service/ClusterDiscoveryService;
at com.sun.messaging.jmq.jmsserver.service.PortMapper.<init>(PortMapper.java:154)
at com.sun.messaging.jmq.jmsserver.Globals.getPortMapper(Globals.java:546)
at com.sun.messaging.jmq.jmsserver.Broker._start(Broker.java:753)
at com.sun.messaging.jmq.jmsserver.Broker.start(Broker.java:412)
at com.sun.messaging.jmq.jmsserver.BrokerProcess.start(BrokerProcess.java:219)
at com.sun.messaging.jmq.jmsserver.DirectBrokerProcess.start(DirectBrokerProcess.java:87)
at com.sun.messaging.jmq.jmsclient.runtime.impl.BrokerInstanceImpl.start(BrokerInstanceImpl.java:144)
at com.sun.messaging.jms.ra.EmbeddedBrokerRunner.start(EmbeddedBrokerRunner.java:284)
at com.sun.messaging.jms.ra.LifecycleManagedBroker.__AW_start(LifecycleManagedBroker.java:337)
at com.sun.messaging.jms.ra.LifecycleManagedBroker.start(LifecycleManagedBroker.java)
at com.sun.messaging.jms.ra.ResourceAdapter.__AW_start(ResourceAdapter.java:314)
at com.sun.messaging.jms.ra.ResourceAdapter.start(ResourceAdapter.java)
at com.sun.enterprise.connectors.ActiveInboundResourceAdapter$1.run(ActiveInboundResourceAdapter.java:180)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.connectors.ActiveInboundResourceAdapter.startResourceAdapter(ActiveInboundResourceAdapter.java:174)
at com.sun.enterprise.connectors.ActiveInboundResourceAdapter.<init>(ActiveInboundResourceAdapter.java:132)
at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.<init>(ActiveJmsResourceAdapter.java:235)
at com.sun.enterprise.connectors.ActiveRAFactory.createActiveResourceAdapter(ActiveRAFactory.java:107)
at com.sun.enterprise.connectors.ResourceAdapterAdminServiceImpl.__AW_createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:300)
at com.sun.enterprise.connectors.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java)
at com.sun.enterprise.connectors.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:445)
at com.sun.enterprise.connectors.ConnectorRuntime.createActiveResourceAdapter(ConnectorRuntime.java:230)
at com.sun.enterprise.jms.JmsProviderLifecycle.onStartup(JmsProviderLifecycle.java:451)
at com.sun.enterprise.server.ApplicationServer.__AW_onStartup(ApplicationServer.java:449)
at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java)
at com.sun.enterprise.server.ondemand.OnDemandServer.onStartup(OnDemandServer.java:134)
at com.sun.enterprise.server.PEMain.run(PEMain.java:398)
at com.sun.enterprise.server.PEMain.__AW_main(PEMain.java:325)
at com.sun.enterprise.server.PEMain.main(PEMain.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.server.PELaunch.__AW_main(PELaunch.java:415)
at com.sun.enterprise.server.PELaunch.main(PELaunch.java)
|#]


Another example is:

[#|2011-03-08T16:55:59.790+0000|SEVERE|sun-appserver2.1|javax.enterprise.resource.resourceadapter|_ThreadID=10;_ThreadName=main;_RequestID=707f42c5-eb31-447b-94
b5-022e2b52e0ad;|RAR6035 : Resource adapter start failed : {0}
java.lang.NoSuchMethodError: com.sun.messaging.jmq.jmsserver.service.PortMapper.setParameters(Lcom/sun/messaging/jmq/jmsserver/config/BrokerConfig;)V
        at com.sun.messaging.jmq.jmsserver.Globals.getPortMapper(Globals.java:552)
        at com.sun.messaging.jmq.jmsserver.Broker._start(Broker.java:749)
        at com.sun.messaging.jmq.jmsserver.Broker.start(Broker.java:410)
        at com.sun.messaging.jmq.jmsserver.BrokerProcess.start(BrokerProcess.java:219)
        at com.sun.messaging.jmq.jmsserver.DirectBrokerProcess.start(DirectBrokerProcess.java:87)
        at com.sun.messaging.jmq.jmsclient.runtime.impl.BrokerInstanceImpl.start(BrokerInstanceImpl.java:146)
        at com.sun.messaging.jms.ra.EmbeddedBrokerRunner.start(EmbeddedBrokerRunner.java:284)
        at com.sun.messaging.jms.ra.LifecycleManagedBroker.start(LifecycleManagedBroker.java:337)
        at com.sun.messaging.jms.ra.ResourceAdapter.start(ResourceAdapter.java:308)
        at com.sun.enterprise.connectors.ActiveInboundResourceAdapter$1.run(ActiveInboundResourceAdapter.java:180)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.enterprise.connectors.ActiveInboundResourceAdapter.startResourceAdapter(ActiveInboundResourceAdapter.java:174)
        at com.sun.enterprise.connectors.ActiveInboundResourceAdapter.<init>(ActiveInboundResourceAdapter.java:132)
        at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.<init>(ActiveJmsResourceAdapter.java:234)
        at com.sun.enterprise.connectors.ActiveRAFactory.createActiveResourceAdapter(ActiveRAFactory.java:107)
        at com.sun.enterprise.connectors.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:300)
        at com.sun.enterprise.connectors.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:445)
        at com.sun.enterprise.connectors.ConnectorRuntime.createActiveResourceAdapter(ConnectorRuntime.java:230)
        at com.sun.enterprise.jms.JmsProviderLifecycle.onStartup(JmsProviderLifecycle.java:451)
        at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:449)
        at com.sun.enterprise.server.ondemand.OnDemandServer.onStartup(OnDemandServer.java:134)
        at com.sun.enterprise.server.PEMain.run(PEMain.java:409)
        at com.sun.enterprise.server.PEMain.main(PEMain.java:336)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:415)

Another example is: This one when when GF2.1.1 patch 23 with a newer MQ version

(This is when imqjmsra.jar is from old MQ and the imqbroker.jar is newer):
[#|2014-07-17T12:25:27.956+0000|SEVERE|sun-appserver2.1.1|javax.enterprise.resource.resourceadapter|_ThreadID=10;_ThreadName=main;_RequestID=36f90f3e-3b72-420f-affc-04c89b1e1e2f;|RAR6035 : Resource adapter start failed : {0}
java.lang.NoSuchMethodError: com.sun.messaging.jmq.io.PortMapperTable.setPacketVersion(Ljava/lang/String;)V
        at com.sun.messaging.jmq.jmsserver.service.PortMapper.<init>(PortMapper.java:158)
        at com.sun.messaging.jmq.jmsserver.Globals.getPortMapper(Globals.java:546)
        at com.sun.messaging.jmq.jmsserver.Broker._start(Broker.java:753)
        at com.sun.messaging.jmq.jmsserver.Broker.start(Broker.java:412)
...

or

[#|2014-07-17T12:08:05.310-0500|SEVERE|sun-appserver2.1.1|javax.enterprise.resource.resourceadapter|_ThreadID=10;_ThreadName=main;_RequestID=1d1717d8-7457-4d7e-9ede-93692b4277c4;|RAR6035 : Resource adapter start failed : {0}
java.lang.NoSuchMethodError: com.sun.messaging.jmq.io.PortMapperTable.setBrokerVersion(Ljava/lang/String;)V
    at com.sun.messaging.jmq.jmsserver.service.PortMapper.<init>(PortMapper.java:149)
    at com.sun.messaging.jmq.jmsserver.Globals.getPortMapper(Globals.java:546)
    at com.sun.messaging.jmq.jmsserver.Broker._start(Broker.java:754)
    at com.sun.messaging.jmq.jmsserver.Broker.start(Broker.java:414)
    at com.sun.messaging.jmq.jmsserver.BrokerProcess.start(BrokerProcess.java:219
..

Changes

This problem can be encountered after applying a patch or performing an in-place upgrade.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms