{"record":{"id":"842c64bb446bd473","repo":"pentaho/pentaho-kettle","slug":"error-creating-class-for-ic-i-getname","errorCode":null,"errorMessage":"Error creating class for : + ic[i].getName()","messagePattern":"Error creating class for : \\+ ic\\[i\\]\\.getName\\(\\)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"critical","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/symmetriccrypto/symmetricalgorithm/SymmetricCryptoMeta.java","lineNumber":106,"sourceCode":"    }\n\n    throw new CryptoException( BaseMessages.getString(\n      PKG, \"SymmetricCryptoMeta.CouldNotFoundAlgorithm\", cryptograhname ) );\n  }\n\n  public static final synchronized SymmetricCryptoInterface[] getSymmetricCryptoInterfaces() {\n    if ( allSymmetricCryptoInterface != null ) {\n      return allSymmetricCryptoInterface;\n    }\n\n    Class<?>[] ic = SymmetricCryptoInterface.implementingClasses;\n    allSymmetricCryptoInterface = new SymmetricCryptoInterface[ic.length];\n    for ( int i = 0; i < ic.length; i++ ) {\n      try {\n        Class.forName( ic[i].getName() );\n        allSymmetricCryptoInterface[i] = (SymmetricCryptoInterface) ic[i].newInstance();\n      } catch ( Exception e ) {\n        throw new RuntimeException( \"Error creating class for : \" + ic[i].getName(), e );\n      }\n    }\n    return allSymmetricCryptoInterface;\n  }\n\n  public String getAlgorithm() {\n    return cryptographyInterface.getAlgorithm();\n  }\n\n  public int getAlgorithmType() {\n    return cryptographyInterface.getAlgorithmType();\n  }\n\n  public String getDefaultScheme() {\n    return cryptographyInterface.getDefaultScheme();\n  }\n\n  public static int getAlgorithmTypeFromCode( String code ) {","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/symmetriccrypto/symmetricalgorithm/SymmetricCryptoMeta.java#L88-L124","documentation":"SymmetricCryptoMeta.getSymmetricCryptoInterfaces wraps reflection failures (Class.forName + newInstance) in a RuntimeException 'Error creating class for : <className>' when instantiating a registered algorithm plugin class fails during static registry initialization. Because it is static-init code, this typically blows up on first use of any symmetric crypto API.","triggerScenarios":"First call to getSymmetricCryptoInterfaces()/di() when a listed class (from a plugin discovery list 'ic') is absent from the classpath, throws in its constructor/static init, or lacks a public no-arg constructor.","commonSituations":"Plugin JAR removed or not deployed; duplicate/partial Kettle installation; plugin class fails in its own static initializer due to missing dependency (e.g. BouncyCastle absent); classloader conflicts in embedded usage.","solutions":["Read the wrapped cause: ClassNotFoundException → deploy the plugin JAR; ExceptionInInitializerError → fix the class's own init failure","Ensure all crypto plugin JARs are present in the Pentaho plugins/lib directory","Verify each SymmetricCryptoInterface implementation has a public no-arg constructor","Check for classloader conflicts when embedding Pentaho in another application"],"exampleFix":"// before: deploying without the provider dependency\n// plugins/ contains custom crypto JAR but not BouncyCastle jar\n// after: include the dependency\n// plugins/lib/bcprov-jdk15on.jar alongside the crypto plugin JAR","handlingStrategy":"try-catch","validationCode":"// force registry init early and report clearly\ntry {\n  SymmetricCryptoMeta.getSymmetricCryptoInterfaces();\n} catch (RuntimeException e) {\n  throw new IllegalStateException(\"Crypto plugin registry failed to init\", e);\n}","typeGuard":null,"tryCatchPattern":"try { interfaces = SymmetricCryptoMeta.getSymmetricCryptoInterfaces(); } catch (RuntimeException e) { log.error(\"Plugin class init failed: \" + e.getCause(), e); }","preventionTips":["Deploy all plugin JARs and their dependencies together","Smoke-test crypto registry init at application startup","Keep a complete, unmodified Pentaho installation"],"tags":["reflection","class-not-found","plugin","static-init"],"backgroundTag":"module-init-failed","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"}