If your Glassfish v2.1 won't start...

If your Glassfish v2.1 won't start and the problem persists, there is probably a problem with your embedded JMS broker. I found in my logfiles the following hint:

[#|2010-01-14T10:27:36.227+0100|SEVERE|sun-appserver9.1|javax.enterprise.resource.resourceadapter|_ThreadID=10;_ThreadName=main;_RequestID=e2ff9fe6-ceb2-4436-bc22-5b88ed5dd49b;|RAR6035 : Resource adapter start failed : {0} javax.resource.spi.ResourceAdapterInternalException: MQJMSRA_RA4001: start:Aborting:Exception starting EMBEDDED broker=EMBEDDED Broker start failure:code = 1 at com.sun.messaging.jms.ra.ResourceAdapter.start(ResourceAdapter.java:476) at com.sun.enterprise.connectors.ActiveInboundResourceAdapter$1.run(ActiveInboundResourceAdapter.java:135) at java.security.AccessController.doPrivileged(Native Method) at com.sun.enterprise.connectors.ActiveInboundResourceAdapter.(ActiveInboundResourceAdapter.java:131) at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.(ActiveJmsResourceAdapter.java:247) 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:224) at com.sun.enterprise.jms.JmsProviderLifecycle.onStartup(JmsProviderLifecycle.java:428) at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:442) at com.sun.enterprise.server.ondemand.OnDemandServer.onStartup(OnDemandServer.java:120) at com.sun.enterprise.server.PEMain.run(PEMain.java:411) at com.sun.enterprise.server.PEMain.main(PEMain.java:338) 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:412) Caused by: java.lang.RuntimeException: EMBEDDED Broker start failure:code = 1 at com.sun.messaging.jms.ra.EmbeddedBrokerRunner.start(EmbeddedBrokerRunner.java:268) at com.sun.messaging.jms.ra.ResourceAdapter.start(ResourceAdapter.java:472) ... 18 more |#]

The solution is simple: removal of the glassfish-v2/domains/domain1/imq/instances/imqbroker/lock file and restart the server. The cause of the problem is frequent change of the ipadress and booting glassfish without network on linux.


In addition to the information provided by Adam. If for some reasons the "lock" file is not under the specified directory, you can also remove from the same directory the transaction related files. The files have a 'trans' prefix. In some cases the files are corrupted when Glassfish is not properly shutdown.

Posted by Yves do Rego on January 15, 2010 at 12:21 AM CET #

Thanks a lot. It worked.

Posted by nisha on January 17, 2011 at 10:55 AM CET #

Thank you

Posted by apichat on January 24, 2011 at 05:48 AM CET #

Great! It worked for me. Thank You!

Posted by Bala on July 11, 2011 at 05:56 PM CEST #

Muuuchas Gracias!

Posted by steelbloom on August 17, 2012 at 03:34 AM CEST #

I wish this was on stack overflow so that I could UPVOTE!!! Thank you very much.

Posted by Jamie on August 24, 2012 at 06:08 AM CEST #


thanks! I appreciate your nice comment more than a generic upvote :-)


Posted by Adam Bien on August 24, 2012 at 10:38 AM CEST #

Thanks a million, it still works like a charm. It prevented quite a few headaches. I'll tell my boss to buy your books immediately :)

Posted by Jurri on October 05, 2012 at 04:11 AM CEST #

thanks a lot for the solution guide~ it save my day :}

Posted by on November 30, 2012 at 06:24 AM CET #

Thanks a lot... No one else recommended this (or encountered this issue).

Posted by Solamalai on May 15, 2013 at 12:37 PM CEST #

Thank you very much.....

Posted by RK on March 25, 2014 at 01:46 PM CET #

It worked for me. Awesome. Saved my a lot of time.

Posted by sandip priyadarshi on September 02, 2014 at 07:22 PM CEST #

Thank you very much

Posted by Erik on September 19, 2014 at 09:51 AM CEST #

thanks alot yaaar

Posted by seshaphani on December 16, 2014 at 03:50 PM CET #

thank you!

Posted by Axel on March 22, 2016 at 05:43 PM CET #

Thank you a lot, you saved my time and my day :)

Posted by FStarred on April 01, 2016 at 10:54 AM CEST #

It worked!! Thank you so much :D

Posted by nattacha on December 07, 2016 at 03:26 AM CET #

Post a Comment:
  • HTML Syntax: NOT allowed
...the last 150 posts
...the last 10 comments