0 Replies Latest reply on May 7, 2015 10:49 AM by juretos

    EJB project

    juretos

      Hey!

       

      I got question about EJB project. I know how to create and deploy an ejb project with maven, which only import default libraries. But if i include dependency for JSON etc, there's a problem. Message Driven Bean class can't find a object from library and wan't deploy?

       

      This is error:

      {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"controlMDB.jar\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"controlMDB.jar\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment \"controlMDB.jar\"

          Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class org.jboss.mdb.ControlMessageMDB with ClassLoader ModuleClassLoader for Module \"deployment.controlMDB.jar:main\" from Service Module Loader

          Caused by: java.lang.NoClassDefFoundError: org/json/JSONException

          Caused by: java.lang.ClassNotFoundException: org.json.JSONException from [Module \"deployment.controlMDB.jar:main\" from Service Module Loader]"}}

       

      Pom.xml file:

      <project>...

        <modelVersion>4.0.0</modelVersion>

        <groupId>accus.ijs.si</groupId>

        <artifactId>controlMDB</artifactId>

        <version>0.0.1-SNAPSHOT</version>

        <packaging>ejb</packaging>

        <name>controlMDB</name>

      <dependecies>

      ....

      </dependencies>

       

      <build>
          <finalName>${project.artifactId}</finalName>
          <plugins>
              <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-ejb-plugin</artifactId>
                  <version>${version.ejb.plugin}</version>
                  <configuration>
                  <generateClient>false</generateClient>
                      <!-- set the EJB version to 3.1 -->
                      <ejbVersion>3.1</ejbVersion>
                  </configuration>
              </plugin>
          </plugins>
      </build>

       

      </project>

       

      Can please help me.

       

      Thank you, Jure.