Component bundles are not loaded.

I just want to know if anyone has ever had this error and how did they solve it "Component bundles are not loaded"? Basically this is a M2EE error. Ever since I started using version 5 of the Mendix Modeler I get this at least 7 times a day. Here is the stack trace: com.mendix.m2ee.api.AdminException: Component bundles are not loaded. at com.mendix.core.impl.MxRuntimeImpl.start( at com.mendix.core.impl.MxRuntimeImpl.start( at com.mendix.m2ee.appcontainer.actions.StartAction.startRuntime( at com.mendix.m2ee.appcontainer.actions.StartAction.execute( at com.mendix.m2ee.appcontainer.server.handler.HttpAdminHandler.handle( at org.eclipse.jetty.server.handler.HandlerWrapper.handle( at org.eclipse.jetty.server.Server.handle( at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest( at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete( at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete( at org.eclipse.jetty.http.HttpParser.parseNext( at org.eclipse.jetty.http.HttpParser.parseAvailable( at org.eclipse.jetty.server.AsyncHttpConnection.handle( at at$ at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob( at org.eclipse.jetty.util.thread.QueuedThreadPool$ at
4 answers

The times I encountered this stacktrace, it was always accompanied by a stacktrace indicating issues with the project's Java version. In these cases there was a mismatch between the JDK with which the MDA was created, and the Java version which the environment is set up to use. So in other words, if the modeler is configured to use a Java 8 JDK whereas the environment is configured to use a Java 7 JDK (either through the m2ee.yaml file or the setting in the cloud portal) you'd get this error.

So unless there's other issues which generate a similar stacktrace, could be worthwile to compare the java version your environment uses and the JDK configured in the modeler used to generate the MDA.

Typical stacktrace for this:

ERROR - OSGi: (1/2) Unsupported class version error for bundle 'project'. Probably your project was compiled with Java 8, but you are currently running Mendix with Java 7. Please run Mendix using Java 8 or recompile the actions using Java 7 or by setting the Java source and target version to 7.
ERROR - OSGi: (2/2) [system.UserActionsRegistrar] Unexpected throwable from attempt to collect dependencies (bundle: project, service: )
ERROR - OSGi: (1/28) java.lang.UnsupportedClassVersionError: system/UserActionsRegistrar : Unsupported major.minor version 52.0
ERROR - OSGi: (2/28) at java.lang.ClassLoader.defineClass1(Native Method)
ERROR - OSGi: (3/28) at java.lang.ClassLoader.defineClass(Unknown Source)
ERROR - OSGi: (4/28) at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(
ERROR - OSGi: (5/28) at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(
ERROR - OSGi: (6/28) at org.apache.felix.framework.BundleWiringImpl.access$400(
ERROR - OSGi: (7/28) at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(
ERROR - OSGi: (8/28) at java.lang.ClassLoader.loadClass(Unknown Source)
ERROR - OSGi: (9/28) at org.apache.felix.framework.Felix.loadBundleClass(
ERROR - OSGi: (10/28) at org.apache.felix.framework.BundleImpl.loadClass(
ERROR - OSGi: (11/28) at org.apache.felix.scr.impl.manager.AbstractComponentManager.initDependencyManagers(
ERROR - OSGi: (12/28) at org.apache.felix.scr.impl.manager.AbstractComponentManager.collectDependencies(
ERROR - OSGi: (13/28) at org.apache.felix.scr.impl.manager.AbstractComponentManager$Unsatisfied.activate(
ERROR - OSGi: (14/28) at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(
ERROR - OSGi: (15/28) at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(
ERROR - OSGi: (16/28) at org.apache.felix.scr.impl.config.ImmediateComponentHolder.enableComponents(
ERROR - OSGi: (17/28) at org.apache.felix.scr.impl.BundleComponentActivator.initialize(
ERROR - OSGi: (18/28) at org.apache.felix.scr.impl.BundleComponentActivator.<init>(
ERROR - OSGi: (19/28) at org.apache.felix.scr.impl.Activator.loadComponents(
ERROR - OSGi: (20/28) at org.apache.felix.scr.impl.Activator.bundleChanged(
ERROR - OSGi: (21/28) at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(
ERROR - OSGi: (22/28) at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(
ERROR - OSGi: (23/28) at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(
ERROR - OSGi: (24/28) at org.apache.felix.framework.Felix.fireBundleEvent(
ERROR - OSGi: (25/28) at org.apache.felix.framework.Felix.startBundle( ERROR - OSGi: (26/28) at org.apache.felix.framework.Felix.setActiveStartLevel(
ERROR - OSGi: (27/28) at
ERROR - OSGi: (28/28) at Source)
ERROR - M2EE: Component bundles are not loaded.
ERROR - M2EE: (1/19) com.mendix.m2ee.api.AdminException: Component bundles are not loaded.
ERROR - M2EE: (2/19) at com.mendix.core.impl.MxRuntimeImpl.start(
ERROR - M2EE: (3/19) at com.mendix.core.impl.MxRuntimeImpl.start(
ERROR - M2EE: (4/19) at com.mendix.m2ee.appcontainer.actions.StartAction.startRuntime(
ERROR - M2EE: (5/19) at com.mendix.m2ee.appcontainer.actions.StartAction.execute(
ERROR - M2EE: (6/19) at com.mendix.m2ee.appcontainer.server.handler.HttpAdminHandler.handle(
ERROR - M2EE: (7/19) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
ERROR - M2EE: (8/19) at org.eclipse.jetty.server.Server.handle(
ERROR - M2EE: (9/19) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(
ERROR - M2EE: (10/19) at org.eclipse.jetty.server.AbstractHttpConnection.content(
ERROR - M2EE: (11/19) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(
ERROR - M2EE: (12/19) at org.eclipse.jetty.http.HttpParser.parseNext(
ERROR - M2EE: (13/19) at org.eclipse.jetty.http.HttpParser.parseAvailable(
ERROR - M2EE: (14/19) at org.eclipse.jetty.server.AsyncHttpConnection.handle(
ERROR - M2EE: (15/19) at
ERROR - M2EE: (16/19) at$
ERROR - M2EE: (17/19) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
ERROR - M2EE: (18/19) at org.eclipse.jetty.util.thread.QueuedThreadPool$
ERROR - M2EE: (19/19) at Source)


I have seen this error a lot of times as well. Usually with other people working on the project. Have never been able to find the real cause. As you describe, it seems like sometimes specific people run into this all the time for a few days, and suddenly it disappears and is gone for a few months.

What's always worth a try is cleaning the deployment dir, or if that doesn't help, checking out a fresh copy of the project and work on that.


In my case, killing tsvncache.exe did the trick. I found the culprit using Process Explorer (from Microsoft Sysinternals) and search for the name of the folder that contains my Mendix projects. See also


In my case, the app was using a local Postgres database and I needed to create the correct user id & password.  Without them I got the m2ee Component bundles are not loaded error.