Tech Blog

ColdFusion MX: ‘Exception occurred trying to get an MBean’ error when using wsconfig & Java 1.5

by Rolando on Apr.16, 2007, under ColdFusion

When registering Apache 2.x with ColdFusion MX 7.0x using JVM 1.5 you might get this error “Exception occurred trying to get an MBean”
First make sure you have the wsconfig hot fix from Adobe (http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=fa9e26a2).
The ColdFusion webserver configuration utility, known as wsconfig, may encounter the error ‘Exception occured trying to get an MBean.’ The wsconfig utility can be run in either graphical mode or console mode. In either mode, if the wsconfig utility is executed with the Sun JVM version 1.5, then this error will occur. Macromedia has not tested Sun JVM 1.5 with ColdFusion MX for use in running the ColdFusion server or for running the wsconfig utility. It appears that the Sun JVM 1.5 is more strict about getter/setter method invocation.
To fix this problem you can install JVM 1.4 and ensure that the wsconfig is executed using this version of the JVM (You can have multiple JVM’s installed in your system). You can download JVM 1.4 at: http://java.sun.com/j2se/1.4.2/download.html
Note: You only need the JRE (no need for the SDK now).
After installing JRE 1.4, modify the jvm.config file located at [cf root folder]/bin folder (in Windows).
Open the file an edit the line
java.home=
by adding the path to the jvm 1.4. In Windows this is usually found at
C:/Program Files/Java/jre1.4.xx
As you can see I’m using the forward-slash (/) instead of the usual back-slash (\).
The end product should look like:
java.home=C:/Program Files/Java/jre1.4.xx
Save the file.
Notice that I tried using the wsconfig.jar file but it seems that the jar file does not use the jvm.config file always using the default JVM. To avoid this make sure you execute the wsconfig.exe file instead, located at
[cf root folder]\bin
:

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...