flowable/flowable-engine · error · JMException

${e.getMessage()}

Error message

${e.getMessage()}

What it means

DefaultManagementMBeanAssembler.assemble() builds a RequiredModelMBean and calls setManagedResource(obj, "ObjectReference"). The JMX API throws InvalidTargetObjectTypeException if the resource type string is not a supported value; this assembler translates it into a JMException, preserving the original message via e.getMessage().

Source

Thrown at modules/flowable-jmx/src/main/java/org/flowable/management/jmx/DefaultManagementMBeanAssembler.java:56

    @Override
    public ModelMBean assemble(Object obj, ObjectName name) throws JMException {
        ModelMBeanInfo mbi = null;

        // use the default provided mbean which has been annotated with JMX annotations
        LOGGER.trace("Assembling MBeanInfo for: {} from @ManagedResource object: {}", name, obj);
        mbi = assembler.getMBeanInfo(obj, null, name.toString());

        if (mbi == null) {
            return null;
        }

        RequiredModelMBean mbean = new RequiredModelMBean(mbi);

        try {
            mbean.setManagedResource(obj, "ObjectReference");
        } catch (InvalidTargetObjectTypeException e) {
            throw new JMException(e.getMessage());
        }

        // Allows the managed object to send notifications
        if (obj instanceof NotificationSenderAware) {
            ((NotificationSenderAware) obj).setNotificationSender(new NotificationSenderAdapter(mbean));
        }

        return mbean;
    }

}

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Inspect the JMException message (it carries the original InvalidTargetObjectTypeException text) to identify the rejected resource type
  2. Verify the JMX provider/MBeanServer supports the "ObjectReference" resource type
  3. Run on a standard platform MBean server (java.lang.management) rather than a custom one
  4. Check application-server JMX configuration if deploying inside a container
Defensive patterns

Strategy: try-catch

Validate before calling

if (obj == null) throw new IllegalArgumentException("managed resource must not be null");
// verify standard platform MBean server is in use
MBeanServer server = ManagementFactory.getPlatformMBeanServer();

Try / catch

try {
    assembler.assemble(obj, mbeanInfo, name);
} catch (JMException e) {
    log.error("MBean assembly failed: " + e.getMessage(), e);
}

Prevention

When it happens

Trigger: mbean.setManagedResource throwing InvalidTargetObjectTypeException during assemble(); this happens when the resource type string passed to setManagedResource is rejected by the MBean server implementation.

Common situations: Registering Flowable-managed objects as JMX MBeans where the underlying MBeanServer (or platform server) rejects the "ObjectReference" resource type; unusual JMX provider implementations or non-standard application servers.

Understand the failure class

Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/21210a456f3b9ea4. Report an issue: GitHub.