{"record":{"id":"b4075ea98e3b9ac4","repo":"pentaho/pentaho-kettle","slug":"wrappedwebspheremqprovider-errorloadingclass","errorCode":"WrappedWebsphereMQProvider.ErrorLoadingClass","errorMessage":"WrappedWebsphereMQProvider.ErrorLoadingClass","messagePattern":"WrappedWebsphereMQProvider\\.ErrorLoadingClass","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"critical","filePath":"plugins/streaming/impls/jms/src/main/java/org/pentaho/di/trans/step/jms/context/WrappedWebsphereMQProvider.java","lineNumber":47,"sourceCode":" * This class is used to prevent blueprint from failing with\n * ClassNotFound when loading the WebsphereMQProvider, since\n * that class directly references IBMMQ classes which may not\n * be available.\n * Also makes it possible to give a message for users to\n * check whether they've installed the IBMMQ jars, comparable\n * to the older version of the jms plugin.\n */\npublic class WrappedWebsphereMQProvider implements JmsProvider {\n\n  @SuppressWarnings( { \"squid:S4738\", \"Guava\" } )  //using guava memoize, so no gain switching to java Supplier\n  private Supplier<JmsProvider> prov = Suppliers.memoize( this::getProvider );\n\n  private JmsProvider getProvider() {\n    try {\n      Class.forName( \"com.ibm.mq.jms.MQQueue\", false, this.getClass().getClassLoader() );\n      return new WebsphereMQProvider();\n    } catch ( Exception e ) {\n      throw new IllegalStateException( getString( PKG, \"WrappedWebsphereMQProvider.ErrorLoadingClass\" ) );\n    }\n  }\n\n  @Override public boolean supports( ConnectionType type ) {\n    return type == WEBSPHERE;\n  }\n\n  @Override public String getConnectionDetails( JmsDelegate meta ) {\n    return prov.get().getConnectionDetails( meta );\n  }\n\n  @Override public JMSContext getContext( JmsDelegate meta ) {\n    return prov.get().getContext( meta );\n  }\n\n  @Override public Destination getDestination( JmsDelegate meta ) {\n    return prov.get().getDestination( meta );\n  }","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/streaming/impls/jms/src/main/java/org/pentaho/di/trans/step/jms/context/WrappedWebsphereMQProvider.java#L29-L65","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["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.","Verify the MQ client version matches your MQ server version and the Jakarta/Javax JMS flavor required by your Pentaho release.","Check that the jars are readable and not corrupted (verify jar integrity with 'jar tf').","If classloader isolation is the issue, deploy the client in the location documented for the streaming plugin rather than the server's global lib."],"exampleFix":"// before\nplugins/streaming/impls/jms/lib/   (empty — MQ jars missing)\n// after\nplugins/streaming/impls/jms/lib/com.ibm.mq.allclient-9.x.x.jar\nplugins/streaming/impls/jms/lib/javax.jms-api-2.0.1.jar\n// then restart Pentaho","handlingStrategy":"validation","validationCode":"try {\n  Class.forName( \"com.ibm.mq.jms.MQQueue\", false, WrappedWebsphereMQProvider.class.getClassLoader() );\n  System.out.println( \"IBM MQ client present\" );\n} catch ( ClassNotFoundException e ) {\n  System.err.println( \"Install IBM MQ client jars in the JMS plugin lib directory\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  JmsProvider p = websphereContext.getProvider();\n} catch ( IllegalStateException e ) {\n  log.error( \"IBM MQ client jars missing from classpath: \" + e.getMessage(), e );\n}","preventionTips":["Install the IBM MQ allclient jar in plugins/streaming/impls/jms/lib before using the WEBSPHERE connection type.","Match the MQ client version to your MQ server and PDI release.","Verify jar presence after every Pentaho upgrade — upgrades can wipe plugin lib dirs.","Smoke-test Class.forName on com.ibm.mq.jms.MQQueue in your deployment checklist."],"tags":["jms","websphere-mq","classpath","missing-dependency"],"backgroundTag":"class-not-found","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}