MQ Broker Does Not Start Up and the Logs End with a Line Containing Message Code B1239

(Doc ID 1178443.1)

Last updated on JULY 12, 2017

Applies to:

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

Symptoms

The Message Queue (MQ)  broker process (imqbrokerd) does not start up.  Specifically, if the MQ broker was started at the terminal console, you would see the following exceptions:

Exception in thread "main" java.lang.StackOverflowError
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
...
at java.lang.Class.forName(Class.java:169)
at com.sun.messaging.jmq.jmsserver.management.agent.Agent.initJesmf(Agent.java:530)
at com.sun.messaging.jmq.jmsserver.management.agent.Agent.init(Agent.java:520)
at com.sun.messaging.jmq.jmsserver.management.agent.Agent.<init>(Agent.java:182)
at com.sun.messaging.jmq.jmsserver.Broker._start(Broker.java:1055)
at com.sun.messaging.jmq.jmsserver.Broker.start(Broker.java:417)
at com.sun.messaging.jmq.jmsserver.Broker.start(Broker.java:388)
at com.sun.messaging.jmq.jmsserver.Broker.main(Broker.java:1942)


Now, there are situations where MQ brokers are started through startup scripts or started by the GlassFish Enterprise Server as it message queue broker.  In those cases, the full error message is not logged, and there is little in the broker's log file to indicate what the problem is.  For example, this is what you can see in the log file located in the MQ broker instance's log directory (IMQ_VARHOME/instances/<brokername>/log/log.txt:

================================================================================
Sun Java(tm) System Message Queue 4.1
Sun Microsystems, Inc.
Version: 4.1 Patch 1 (Build 4-a)
Compile: Mon Nov 5 13:31:01 PST 2007

Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. Use is
subject to license terms.
================================================================================
Java Runtime: 1.6.0_18 Sun Microsystems Inc. /java/jdk6_18/jre
[17/Aug/2010:08:50:50 GMT] License: Sun Java(tm) System Message Queue 4.1 Enterprise Edition
[17/Aug/2010:08:50:50 GMT] IMQ_HOME=/glassfish/imq
[17/Aug/2010:08:50:50 GMT] IMQ_VARHOME=/demo/demomq
[17/Aug/2010:08:50:50 GMT] SunOS 5.10 sparc anonymousbox (2 cpu) anonymous
[17/Aug/2010:08:50:50 GMT] Max file descriptors: 16384 (16384)
[17/Aug/2010:08:50:50 GMT] Java Heap Size: max=174784k, current=35328k
.....
[17/Aug/2010:08:50:50 GMT] [B1136]: Processing stored transactions
[17/Aug/2010:08:50:50 GMT] [B1284]: 0 cluster transactions remain in PREPARED state, 0 in COMMITTED state waiting for remote broker completion
[17/Aug/2010:08:50:50 GMT] Of 0 remote transactions, 0 in PREPARED state, 0 in COMMITTED state
[17/Aug/2010:08:50:50 GMT] [B1013]: Auto Creation of Queues is enabled
[17/Aug/2010:08:50:50 GMT] [B1151]: Loading destination mq.sys.dmq [Queue] with 0 messages
[17/Aug/2010:08:50:50 GMT] [B1152]: Loading of destination mq.sys.dmq [Queue] complete
[17/Aug/2010:08:50:50 GMT] [B1239]: Using platform MBean server


The log file will show that the last line for the process before it stops to be "[B1239]: Using platform MBean server".

Changes

This problem can be encountered if the JDK is updated to JDK 6 update 18 and later.

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