pentaho/pentaho-kettle · critical · IllegalStateException

WrappedWebsphereMQProvider.ErrorLoadingClass

WrappedWebsphereMQProvider.ErrorLoadingClass

Error message

WrappedWebsphereMQProvider.ErrorLoadingClass

What it means

WrappedWebsphereMQProvider.getProvider checks for com.ibm.mq.jms.MQQueue on the plugin classloader before instantiating WebsphereMQProvider; if the class (or any related class) cannot be loaded it throws an IllegalStateException with the localized message 'ErrorLoadingClass'. It means the IBM MQ client jars are not visible to the JMS streaming plugin.

Solutions

  1. Download the IBM MQ client (com.ibm.mq.allclient or the MQ JMS client) and place the jars in the JMS streaming plugin's lib directory (e.g. plugins/streaming/impls/jms/lib), then restart.
  2. Verify the MQ client version matches your MQ server version and the Jakarta/Javax JMS flavor required by your Pentaho release.
  3. Check that the jars are readable and not corrupted (verify jar integrity with 'jar tf').
  4. If classloader isolation is the issue, deploy the client in the location documented for the streaming plugin rather than the server's global lib.

Example fix

// before
plugins/streaming/impls/jms/lib/   (empty — MQ jars missing)
// after
plugins/streaming/impls/jms/lib/com.ibm.mq.allclient-9.x.x.jar
plugins/streaming/impls/jms/lib/javax.jms-api-2.0.1.jar
// then restart Pentaho
Defensive patterns

Strategy: validation

Validate before calling

try {
  Class.forName( "com.ibm.mq.jms.MQQueue", false, WrappedWebsphereMQProvider.class.getClassLoader() );
  System.out.println( "IBM MQ client present" );
} catch ( ClassNotFoundException e ) {
  System.err.println( "Install IBM MQ client jars in the JMS plugin lib directory" );
}

Try / catch

try {
  JmsProvider p = websphereContext.getProvider();
} catch ( IllegalStateException e ) {
  log.error( "IBM MQ client jars missing from classpath: " + e.getMessage(), e );
}

Prevention

When it happens

Trigger: Building a JMS consumer/producer with connection type WEBSPHERE when the IBM MQ classes (com.ibm.mq.jms.MQQueue and dependencies like com.ibm.mq.jakarta/jms, bstring, J2EE jars) are absent from the plugin's classloader.

Common situations: Pentaho installations without the Websphere MQ client libraries installed into the streaming/JMS plugin's lib directory, wrong MQ client version for the target MQ server, or classloader isolation preventing the plugin from seeing jars placed in the global lib.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/b4075ea98e3b9ac4. Report an issue: GitHub.

Appendix: source

Thrown at plugins/streaming/impls/jms/src/main/java/org/pentaho/di/trans/step/jms/context/WrappedWebsphereMQProvider.java:47

 * This class is used to prevent blueprint from failing with
 * ClassNotFound when loading the WebsphereMQProvider, since
 * that class directly references IBMMQ classes which may not
 * be available.
 * Also makes it possible to give a message for users to
 * check whether they've installed the IBMMQ jars, comparable
 * to the older version of the jms plugin.
 */
public class WrappedWebsphereMQProvider implements JmsProvider {

  @SuppressWarnings( { "squid:S4738", "Guava" } )  //using guava memoize, so no gain switching to java Supplier
  private Supplier<JmsProvider> prov = Suppliers.memoize( this::getProvider );

  private JmsProvider getProvider() {
    try {
      Class.forName( "com.ibm.mq.jms.MQQueue", false, this.getClass().getClassLoader() );
      return new WebsphereMQProvider();
    } catch ( Exception e ) {
      throw new IllegalStateException( getString( PKG, "WrappedWebsphereMQProvider.ErrorLoadingClass" ) );
    }
  }

  @Override public boolean supports( ConnectionType type ) {
    return type == WEBSPHERE;
  }

  @Override public String getConnectionDetails( JmsDelegate meta ) {
    return prov.get().getConnectionDetails( meta );
  }

  @Override public JMSContext getContext( JmsDelegate meta ) {
    return prov.get().getContext( meta );
  }

  @Override public Destination getDestination( JmsDelegate meta ) {
    return prov.get().getDestination( meta );
  }

View on GitHub (pinned to f3058517a1)