Uploaded image for project: 'OpenWebBeans'
  1. OpenWebBeans
  2. OWB-1267

SeContainer Fails with NPE when starting from Exec Maven Plugin

    XMLWordPrintableJSON

Details

    • Question
    • Status: Resolved
    • Minor
    • Resolution: Not A Problem
    • 2.0.7
    • None
    • None

    Description

       

      I am using OWB and the CDI 2.0 spec, starting my injection with the following code:

      SeContainer container = SeContainerInitializer.newInstance().initialize()

       

      When I run the program via main, the program runs fine. But, when I run the program with the Exec Maven Plugin, using the following command:

      mvn clean package exec:exec

      I get the following error:

       

      Exception in thread "main" java.lang.NullPointerException
      at org.apache.openwebbeans.se.OWBInitializer.newContainer(OWBInitializer.java:107)
      at org.apache.openwebbeans.se.OWBInitializer.initialize(OWBInitializer.java:91)
      at org.apache.openwebbeans.se.SeInitializerFacade.initialize(SeInitializerFacade.java:137)
      at com.my.package.core.Main.main(Main.java:11)
      

      Also, I am packaging all of the dependencies into a single jar using the Apache Maven Assembly Plugin. Running the jar with the following command produces the same output mentioned above:

      java -jar target/my-jar-with-dependencies.jar

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            poeia James Chen-Smith
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: