title: JNI error at Weld Example
body: <p>Actually i want to create a small "Hello WOrld"-like Example of a JavaSE-Application with Weld-SE, but it seems that there is a runtime error.</p>
  
  <p>Here is my class:</p>
  
  <pre><code>package de.mycompany.weldapp;
  
  import java.util.List;
  
  import javax.enterprise.event.Observes;
  import javax.inject.Singleton;
  
  import org.jboss.weld.environment.se.bindings.Parameters;
  import org.jboss.weld.environment.se.events.ContainerInitialized;
  
  @Singleton
  public class App 
  {
     public void printHello(@Observes ContainerInitialized event,     @Parameters List&lt;String&gt; parameters) {
         System.out.println("Hello " + parameters.get(0));
     }
  }
  </code></pre>
  
  <p>An here is my pom.xml:</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
  &lt;groupId&gt;de.mycompany&lt;/groupId&gt;
  &lt;artifactId&gt;weldapp&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;
  
  &lt;name&gt;weldapp&lt;/name&gt;
  &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
  &lt;properties&gt;
    &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;org.jboss.weld.se&lt;/groupId&gt;
      &lt;artifactId&gt;weld-se-shaded&lt;/artifactId&gt;
      &lt;version&gt;3.0.2.Final&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;junit&lt;/groupId&gt;
      &lt;artifactId&gt;junit&lt;/artifactId&gt;
      &lt;version&gt;3.8.1&lt;/version&gt;
      &lt;scope&gt;test&lt;/scope&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
      &lt;version&gt;3.7.0&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;javax.enterprise&lt;/groupId&gt;
      &lt;artifactId&gt;cdi-api&lt;/artifactId&gt;
      &lt;version&gt;2.0&lt;/version&gt;
      &lt;scope&gt;provided&lt;/scope&gt;
    &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;build&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
        &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
        &lt;version&gt;3.0.2&lt;/version&gt;
        &lt;configuration&gt;
          &lt;archive&gt;
            &lt;manifest&gt;
              &lt;mainClass&gt;de.mycompany.weldapp.App&lt;/mainClass&gt;
            &lt;/manifest&gt;
          &lt;/archive&gt;
        &lt;/configuration&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>I have installed Java JDK 1.8.0_151 and Maven 3.5.2.
  The compile-process was successful, but when i execute the created jar-file in the target-directory, i will get the following error all the time:</p>
  
  <pre><code>A JNI error has occurred, plase check your installation and try again.
  Exception in thread "main" java.lang.noClassDefFoundError: org/jboss/environment/se/events/ContainerInitialized
  at java.lang.Class.getDeclaredMethods0(native Method)
  ... 
  Caused by : java.lang.ClassNotFoundException: org.jboss.weld.environment.se.events.ContainerInitialized
  at java.net.URLCLassLoader.findClass(Unknown Source)
  ...
  </code></pre>
  
  <p>Is there anything that i did not mention or that i am doing wrong? Is there any dependency, that was not included?</p>
  
  <p>I have installed Java, Maven and Eclipse again, but nothing helped.</p>
  
  <p>Thanks a lot
  Daniel</p>