title: java.lang.NoClassDefFoundError: Failed to link org/pentaho/di/core/attributes/metastore/EmbeddedMetaStore
body: <p>I'm building a batch with Pentaho Kettle to process some files. This batch is started by a servlet. However, when I try to start it, I get the following warn which actually block the process: </p>
  
  <pre><code>WARN  [org.jboss.modules] (Batch Thread - 2) Failed to define class org.pentaho.di.core.attributes.metastore.EmbeddedMetaStore in Module "deployment.my-program-1.0.0.0-SNAPSHOT.war:main" from Service Module Loader: java.lang.NoClassDefFoundError: Failed to link org/pentaho/di/core/attributes/metastore/EmbeddedMetaStore (Module "deployment.my-program-1.0.0.0-SNAPSHOT.war:main" from Service Module Loader): org/pentaho/metastore/api/BaseMetaStore
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
  at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:446)
  at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:274)
  at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:78)
  at org.jboss.modules.Module.loadModuleClass(Module.java:605)
  at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
  at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
  at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
  at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
  at org.pentaho.di.base.AbstractMeta.&lt;init&gt;(AbstractMeta.java:162)
  at org.pentaho.di.job.JobMeta.&lt;init&gt;(JobMeta.java:201)
  at org.pentaho.di.job.JobMeta.&lt;init&gt;(JobMeta.java:755)
  </code></pre>
  
  <p>However, when I look in my lib folder, the jar containing this class (<strong>kettle-engine-8.2.0.0-342.jar</strong>) is there and the class is also in it.</p>
  
  <p>I'm using a JBoss EAP 7.0 with Java 1.8.0.161 on my computer for development. I start it with my IDE (Eclipse Photon). Here are my dependencies in the pom.xml:</p>
  
  <pre><code>&lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax&lt;/groupId&gt;
          &lt;artifactId&gt;javaee-api&lt;/artifactId&gt;
          &lt;version&gt;7.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- vf2 debug --&gt;
      &lt;dependency&gt;
           &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
          &lt;artifactId&gt;commons-vfs2&lt;/artifactId&gt;
          &lt;version&gt;2.2&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- maven-war-plugin--&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
          &lt;version&gt;3.2.2&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- pentaho kettle --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;pentaho-kettle&lt;/groupId&gt;
          &lt;artifactId&gt;kettle-core&lt;/artifactId&gt;
          &lt;version&gt;8.2.0.0-342&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;pentaho-kettle&lt;/groupId&gt;
          &lt;artifactId&gt;kettle-engine&lt;/artifactId&gt;
          &lt;version&gt;8.2.0.0-342&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;com.googlecode.json-simple&lt;/groupId&gt;
          &lt;artifactId&gt;json-simple&lt;/artifactId&gt;
          &lt;version&gt;1.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.codehaus.janino&lt;/groupId&gt;
          &lt;artifactId&gt;janino&lt;/artifactId&gt;
          &lt;version&gt;2.5.16&lt;/version&gt;
      &lt;/dependency&gt;       
      &lt;dependency&gt;
          &lt;groupId&gt;org.mozilla&lt;/groupId&gt;
          &lt;artifactId&gt;rhino&lt;/artifactId&gt;
          &lt;version&gt;1.7R3&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- this correct an error --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-lang&lt;/groupId&gt;
          &lt;artifactId&gt;commons-lang&lt;/artifactId&gt;
          &lt;version&gt;2.6&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- netty version override to correct netty 3.7 bug / FYI, pentaho don't use netty anyway--&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;io.netty&lt;/groupId&gt;
          &lt;artifactId&gt;netty&lt;/artifactId&gt;
          &lt;version&gt;3.9.0.Final&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p><strong>Important : this issue does not occur when using previous version of kettle-core and kettle-engine (tested with 7.0).</strong> 
  It's an embedded call so I do not directly call this class in my code.</p>
  
  <p>I do not have multiple versions of this jar in my classpath.  </p>