1 Reply Latest reply on Jun 12, 2011 9:07 AM by java-lover java-lover

    Can't deploy Maven jar (MDB) on JbossAS6

    Jamshed Katta Newbie

      I am using jboss6, message driven bean, hibernate and maven2 in my application when i try to compile my mdb using maven2 and deploy on jboss6 i get the following error:

       

      Failed to create Resource MessageBean.jar - cause: java.lang.Exception:Failed to start deployment [vfs:///opt/jboss6/server/default/deploy/MessageBean.jar] during deployment of 'MessageBean.jar' - cause: java.lang.RuntimeException:org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS): DEPLOYMENTS MISSING DEPENDENCIES: Deployment "jboss.j2ee:jar=MessageBean.jar,name=MessageBean,service=EJB3" is missing the following dependencies: Dependency "interface org.jboss.ejb3.timerservice.spi.TimerServiceFactory" (should be in state "Installed", but is actually in state "Instantiated") DEPLOYMENTS IN ERROR: Deployment "interface org.jboss.ejb3.timerservice.spi.TimerServiceFactory" is in error due to the following reason(s): Instantiated -> org.jboss.deployers.client.spi.IncompleteDeploymentException:Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS): DEPLOYMENTS MISSING DEPENDENCIES: Deployment "jboss.j2ee:jar=MessageBean.jar,name=MessageBean,service=EJB3" is missing the following dependencies: Dependency "interface org.jboss.ejb3.timerservice.spi.TimerServiceFactory" (should be in state "Installed", but is actually in state "Instantiated") DEPLOYMENTS IN ERROR: Deployment "interface org.jboss.ejb3.timerservice.spi.TimerServiceFactory" is in error due to the following reason(s): Instantiated

       

      Here is my pom.xml

       

      <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/maven-v4_0_0.xsd">

          <modelVersion>4.0.0</modelVersion>

          <groupId>com.mycompany</groupId>

          <artifactId>MessageBean</artifactId>

          <packaging>ejb</packaging>

          <version>1.0-SNAPSHOT</version>

          <name>MessageBean Java EE 6 EJB</name>

          <url>http://maven.apache.org</url>

       

          <dependencies>

              <dependency>

                  <groupId>log4j</groupId>

                  <artifactId>log4j</artifactId>

                  <version>1.2.12</version>

              </dependency>

               <dependency>

                  <groupId>org.jboss.ejb3</groupId>

                  <artifactId>jboss-ejb3-timerservice-spi</artifactId>

                  <version>1.0.4</version>

              </dependency>

       

              <dependency>

                  <groupId>org.hibernate</groupId>

                  <artifactId>hibernate</artifactId>

                  <version>3.0</version>

                  <type>jar</type>

                  <scope>compile</scope>

              </dependency>

              <dependency>

                  <groupId>org.jboss.ejb3</groupId>

                  <artifactId>jboss-ejb3-ext-api</artifactId>

                  <version>1.0.0</version>

              </dependency>

              <dependency>

                  <groupId>org.slf4j</groupId>

                  <artifactId>jcl-over-slf4j</artifactId>

                  <version>1.5.6</version>

                  <scope>test</scope>

              </dependency>

              <dependency>

                  <groupId>org.slf4j</groupId>

                  <artifactId>slf4j-api</artifactId>

                  <version>1.5.6</version>

                  <scope>test</scope>

              </dependency>

              <dependency>

                  <groupId>javax</groupId>

                  <artifactId>javaee-api</artifactId>

                <version>6.0</version>

                 <type>jar</type>

                 <scope>provided</scope>

                  <!-- end -->

              </dependency>

             <dependency>

                  <groupId>javax</groupId>

                  <artifactId>javaee-api</artifactId>

                  <version>6.0</version>

                  <scope>provided</scope>

              </dependency>

              <dependency>

                  <groupId>junit</groupId>

                  <artifactId>junit</artifactId>

                  <version>3.8.2</version>

                  <scope>test</scope>

              </dependency>

       

          </dependencies>

       

          <repositories>

              <repository>

                  <id>java.net2</id>

                  <name>Java.Net Maven2 Repository, hosts the javaee-api dependency</name>

                  <url>http://download.java.net/maven/2</url>

              </repository>

              <repository>

                  <id>jboss-public-repository-group</id>

                  <name>JBoss Public Maven Repository Group</name>

                  <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>

                  <layout>default</layout>

                  <releases>

                      <enabled>true</enabled>

                      <updatePolicy>never</updatePolicy>

                  </releases>

                  <snapshots>

                      <enabled>true</enabled>

                      <updatePolicy>never</updatePolicy>

                  </snapshots>

              </repository>

              <repository>

                  <id>jboss</id>

                  <url>http://repository.jboss.com/maven2</url>

                  <releases>

                      <enabled>true</enabled>

                  </releases>

                  <snapshots>

                      <enabled>false</enabled>

                  </snapshots>

              </repository>

              <repository>

                  <id>jboss-snapshot</id>

                  <url>http://snapshots.jboss.org/maven2</url>

                  <releases>

                      <enabled>true</enabled>

                  </releases>

                  <snapshots>

                      <enabled>true</enabled>

                  </snapshots>

              </repository>

          </repositories>

          <build>

              <plugins>

                  <plugin>

                      <groupId>org.apache.maven.plugins</groupId>

                      <artifactId>maven-compiler-plugin</artifactId>

                      <version>2.0.2</version>

                      <configuration>

                          <source>1.6</source>

                          <target>1.6</target>

                      </configuration>

                  </plugin>

                  <plugin>

                      <groupId>org.apache.maven.plugins</groupId>

                      <artifactId>maven-ejb-plugin</artifactId>

                      <version>2.1</version>

                      <configuration>

                          <ejbVersion>3.1</ejbVersion>

                      </configuration>

                  </plugin>

                  <plugin>

                      <groupId>org.apache.maven.plugins</groupId>

                      <artifactId>maven-compiler-plugin</artifactId>

                      <version>2.3.2</version>

                      <configuration>

                          <source>1.6</source>

                          <target>1.6</target>

                      </configuration>

                  </plugin>

                  <plugin>

                      <artifactId>maven-compiler-plugin</artifactId>

                      <configuration>

                          <source>1.5</source>

                          <target>1.5</target>

                      </configuration>

                  </plugin>

                  <plugin>

                      <artifactId>maven-war-plugin</artifactId>

                      <version>2.0</version>

                  </plugin>

              </plugins>

              <finalName>MessageBean</finalName>

          </build>

          <profiles>

              <profile>

                  <id>endorsed</id>

                  <activation>

                      <property>

                          <name>sun.boot.class.path</name>

                      </property>

                  </activation>

                  <build>

                      <plugins>

                          <plugin>

                              <groupId>org.apache.maven.plugins</groupId>

                              <artifactId>maven-compiler-plugin</artifactId>

                              <version>2.0.2</version>

                              <dependencies>

                                  <dependency>

                                      <groupId>javax</groupId>

                                      <artifactId>javaee-endorsed-api</artifactId>

                                      <version>6.0</version>

                                  </dependency>

                              </dependencies>

                          </plugin>

                      </plugins>

                  </build>

              </profile> 

          </profiles>

      </project>

       

      I am not using ejb3 timer in my application as of now

       

      What seems to be the problem ? please help

        • 1. Re: Can't deploy Maven jar (MDB) on JbossAS6
          java-lover java-lover Newbie

          To solve the problem you always need to first isolate the problem.

          Try use the latest Maven see http://maven.apache.org/download.html, i.e.Maven 3.0.3.  If that works then the problem is solved.

          Next test to see if it works on Jboss5 and if it does then you know its a Jboss 6 problem.

          Try to compile without Maven so you can see if it's a maven issue or the way you are deploying to Jboss6.

           

          Look into the Jboss Jira see https://issues.jboss.org/secure/Dashboard.jspa and the Maven Jira to see if there are any reported bugs and maybe a work around.  Search on this website and google for the words org.jboss.ejb3.timerservice.spi.TimerServiceFactory to see if anyone else has a simmilar issue.  If not then its most likely something you are doing wrong and another reason you need to urgenly isolate the problem to solve it. This is usually the appoach to solving problems that involve different techologies that are being used together.

           

          Once you have isolated the problem, create a new post and hopefully this time you will be able to know if the problem is related to maven, the version of Jboss, a dependency problem, JARs not loaded in the required order, configuration issues, a reported problem or something else.