0 Replies Latest reply on Sep 27, 2011 8:52 AM by Sam W

    ClassCastException during deployment with JBOSS 6.0.0.Final

    Sam W Expert

      Hi,

       

      With JBOSS 6.0.0.Final, I created an EAR project which consist of an EJB module and WAR module.

      During the deployment, JBOSS throws the following errors:which I don't understand why:

       

       

      2011-09-27 20:38:47,518 INFO  [org.apache.cxf.transport.servlet.AbstractCXFServlet] (http-0.0.0.0-80-1) Servlet transport factory already registered

      2011-09-27 20:39:09,040 INFO  [org.jboss.system.server.jmx.JMXKernel] (Thread-19) Server exit called, exiting the JVM now!

      2011-09-27 20:39:09,041 INFO  [STDOUT] (Thread-1) Posting Shutdown Request to the server...

      2011-09-27 20:39:09,041 INFO  [org.jboss.bootstrap.impl.base.server.AbstractServer] (Thread-20) Stopping: JBossAS [6.0.0.Final "Neo"]

      2011-09-27 20:39:09,042 INFO  [org.apache.coyote.http11.Http11Protocol] (Thread-20) Pausing Coyote HTTP/1.1 on http-0.0.0.0-80

      2011-09-27 20:39:09,049 INFO  [org.apache.coyote.http11.Http11Protocol] (Thread-20) Stopping Coyote HTTP/1.1 on http-0.0.0.0-80

      2011-09-27 20:39:09,053 INFO  [org.apache.coyote.ajp.AjpProtocol] (Thread-20) Pausing Coyote AJP/1.3 on ajp-0.0.0.0-8009

      2011-09-27 20:39:09,056 INFO  [org.apache.coyote.ajp.AjpProtocol] (Thread-20) Stopping Coyote AJP/1.3 on ajp-0.0.0.0-8009

      2011-09-27 20:40:17,844 INFO  [org.apache.coyote.http11.Http11Protocol] (Thread-2) Starting Coyote HTTP/1.1 on http-0.0.0.0-80

      2011-09-27 20:40:17,846 INFO  [org.apache.coyote.ajp.AjpProtocol] (Thread-2) Starting Coyote AJP/1.3 on ajp-0.0.0.0-8009

      2011-09-27 20:40:17,846 INFO  [org.jboss.bootstrap.impl.base.server.AbstractServer] (Thread-2) JBossAS [6.0.0.Final "Neo"] Started in 29s:814ms

      2011-09-27 20:40:27,628 INFO  [org.apache.cxf.transport.servlet.AbstractCXFServlet] (http-0.0.0.0-80-1) Servlet transport factory already registered

      2011-09-27 21:09:14,115 INFO  [org.jboss.system.server.jmx.JMXKernel] (Thread-18) Server exit called, exiting the JVM now!

      2011-09-27 21:09:14,118 INFO  [STDOUT] (Thread-1) Posting Shutdown Request to the server...

      2011-09-27 21:09:14,118 INFO  [org.jboss.bootstrap.impl.base.server.AbstractServer] (Thread-19) Stopping: JBossAS [6.0.0.Final "Neo"]

      2011-09-27 21:09:14,122 INFO  [org.apache.coyote.http11.Http11Protocol] (Thread-19) Pausing Coyote HTTP/1.1 on http-0.0.0.0-80

      2011-09-27 21:09:14,123 INFO  [org.apache.coyote.http11.Http11Protocol] (Thread-19) Stopping Coyote HTTP/1.1 on http-0.0.0.0-80

      2011-09-27 21:09:14,126 INFO  [org.apache.coyote.ajp.AjpProtocol] (Thread-19) Pausing Coyote AJP/1.3 on ajp-0.0.0.0-8009

      2011-09-27 21:09:14,132 INFO  [org.apache.coyote.ajp.AjpProtocol] (Thread-19) Stopping Coyote AJP/1.3 on ajp-0.0.0.0-8009

      2011-09-27 21:10:22,191 INFO  [org.apache.coyote.http11.Http11Protocol] (Thread-2) Starting Coyote HTTP/1.1 on http-0.0.0.0-8080

      2011-09-27 21:10:22,193 INFO  [org.apache.coyote.ajp.AjpProtocol] (Thread-2) Starting Coyote AJP/1.3 on ajp-0.0.0.0-8009

      2011-09-27 21:10:22,194 INFO  [org.jboss.bootstrap.impl.base.server.AbstractServer] (Thread-2) JBossAS [6.0.0.Final "Neo"] Started in 31s:938ms

      2011-09-27 21:31:22,016 INFO  [org.apache.cxf.transport.servlet.AbstractCXFServlet] (http-0.0.0.0-8080-1) Servlet transport factory already registered

      2011-09-27 21:10:22,191 INFO  [org.apache.coyote.http11.Http11Protocol] (Thread-2) Starting Coyote HTTP/1.1 on http-0.0.0.0-8080

      2011-09-27 21:10:22,193 INFO  [org.apache.coyote.ajp.AjpProtocol] (Thread-2) Starting Coyote AJP/1.3 on ajp-0.0.0.0-8009

      2011-09-27 21:10:22,194 INFO  [org.jboss.bootstrap.impl.base.server.AbstractServer] (Thread-2) JBossAS [6.0.0.Final "Neo"] Started in 31s:938ms

      2011-09-27 21:31:22,016 INFO  [org.apache.cxf.transport.servlet.AbstractCXFServlet] (http-0.0.0.0-8080-1) Servlet transport factory already registered

      2011-09-27 22:13:52,687 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (http-0.0.0.0-8080-1) deploy, ctxPath=/jmx-console

      2011-09-27 22:21:29,024 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (http-0.0.0.0-8080-1) deploy, ctxPath=/jbossws

      2011-09-27 22:33:38,746 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (HDScanner) Error installing to Parse: name=vfs:///usr/local/users/jboss/jboss6/server/default/deploy/CategoryClient-ear.ear state=PreParse mode=M

      anual requiredState=Parse: org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfs:///usr/local/users/jboss/jboss6/server/default/deploy/CategoryClient-ear.ear/CategoryClient-ejb-1.0-SNAPSHOT.jar/

              at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49) [:2.2.0.GA]

              at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:383) [:2.2.0.GA]

              at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:343) [:2.2.0.GA]

              at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:315) [:2.2.0.GA]

              at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(AbstractParsingDeployerWithOutput.java:255) [:2.2.0.GA]

              at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.0.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.0.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.0.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1603) [:2.2.0.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.0.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.0.GA]

              at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.0.GA]

              at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.0.0.Final]

              at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]

              at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(HDScanner.java:240) [:0.2.2]

              at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(HDScanner.java:192) [:0.2.2]

              at org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(TwoPCActionWrapper.java:57) [:0.2.2]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.0.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.0.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1603) [:2.2.0.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.0.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.0.GA]

              at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.0.GA]

              at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.0.0.Final]

              at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]

              at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(HDScanner.java:240) [:0.2.2]

              at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(HDScanner.java:192) [:0.2.2]

              at org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(TwoPCActionWrapper.java:57) [:0.2.2]

              at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.complete(AbstractTwoPhaseModificationAction.java:74) [:0.2.2]

              at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:95) [:0.2.2]

              at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87) [:0.2.2]

              at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234) [:0.2.2]

              at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213) [:0.2.2]

              at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150) [:0.2.2]

              at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:135) [:0.2.2]

              at org.jboss.profileservice.deployment.hotdeploy.HDScanner.scan(HDScanner.java:146) [:0.2.2]

              at org.jboss.profileservice.deployment.hotdeploy.HDScanner.run(HDScanner.java:90) [:0.2.2]

              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_03-p4]

              at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [:1.6.0_03-p4]

              at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [:1.6.0_03-p4]

              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [:1.6.0_03-p4]

              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181) [:1.6.0_03-p4]

              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205) [:1.6.0_03-p4]

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) [:1.6.0_03-p4]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) [:1.6.0_03-p4]

              at java.lang.Thread.run(Thread.java:619) [:1.6.0_03-p4]

      Caused by: java.lang.ClassCastException

              at java.lang.Class.cast(Class.java:2990) [:1.6.0_03-p4]

              at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:263) [jbossxb.jar:2.0.3.GA]

              at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:231) [jbossxb.jar:2.0.3.GA]

              at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:137) [:2.2.0.GA]

              at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:121) [:2.2.0.GA]

              at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:352) [:2.2.0.GA]

              at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:334) [:2.2.0.GA]

              at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:251) [:2.2.0.GA]

              at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:369) [:2.2.0.GA]

              ... 42 more

       

       

      2011-09-27 22:33:38,750 WARN  [org.jboss.profileservice.deployment.hotdeploy.HDScanner] (HDScanner) Scan failed: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

       

       

      *** DEPLOYMENTS IN ERROR: Name -> Error

       

       

      vfs:///usr/local/users/jboss/jboss6/server/default/deploy/CategoryClient-ear.ear -> org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfs:///usr/local/users/jboss/jboss6/server/default/deploy/CategoryClient-ear.ear/CategoryClient-ejb-1.0-SNAPSHOT.jar/

       

       

       

       

      DEPLOYMENTS IN ERROR:

        Deployment "vfs:///usr/local/users/jboss/jboss6/server/default/deploy/CategoryClient-ear.ear" is in error due to the following reason(s): java.lang.ClassCastException

       

       

              at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1370) [:2.2.0.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1316) [:2.2.0.GA]

              at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:968) [:2.2.0.GA]

              at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:82) [:6.0.0.Final]

              at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.checkComplete(ProfileControllerContext.java:138) [:0.2.2]

              at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(HDScanner.java:246) [:0.2.2]

              at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(HDScanner.java:192) [:0.2.2]

              at org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(TwoPCActionWrapper.java:57) [:0.2.2]

              at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.complete(AbstractTwoPhaseModificationAction.java:74) [:0.2.2]

              at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:95) [:0.2.2]

              at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87) [:0.2.2]

              at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234) [:0.2.2]

              at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213) [:0.2.2]

              at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150) [:0.2.2]

              at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:135) [:0.2.2]

              at org.jboss.profileservice.deployment.hotdeploy.HDScanner.scan(HDScanner.java:146) [:0.2.2]

              at org.jboss.profileservice.deployment.hotdeploy.HDScanner.run(HDScanner.java:90) [:0.2.2]

              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_03-p4]

              at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [:1.6.0_03-p4]

              at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [:1.6.0_03-p4]

              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [:1.6.0_03-p4]

              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181) [:1.6.0_03-p4]

              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205) [:1.6.0_03-p4]

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) [:1.6.0_03-p4]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) [:1.6.0_03-p4]

              at java.lang.Thread.run(Thread.java:619) [:1.6.0_03-p4]

       

       

       

       

      I thought I have bundled some duplicated libraries that JBOSS has already had, but I couldn't found any library in my EJB module.

      Here is a list of the files bundled in my EJB jar file:

       

      $ jar -xvf ../CategoryClient-ejb-1.0-SNAPSHOT.jar

        ������META-INF/

        ��� META-INF/MANIFEST.MF

        ������ix/

        ������ix/houseware/

        ������ix/houseware/category/

        ������ix/houseware/category/remote/

        ������ix/houseware/category/service/

        ��� ix/houseware/category/CategoryManagerBean.class

        ��� ix/houseware/category/CategoryManagerLocal.class

        ��� ix/houseware/category/remote/CallerBean.class

        ��� ix/houseware/category/remote/CallerLocal.class

        ��� ix/houseware/category/service/CategorySubcategories.class

        ��� ix/houseware/category/service/CategoryWebService.class

        ��� ix/houseware/category/service/CategoryWebService_Service.class

        ��� ix/houseware/category/service/CreateCategory.class

        ��� ix/houseware/category/service/Find.class

        ��� ix/houseware/category/service/FindAll.class

        ��� ix/houseware/category/service/FindAllResponse.class

        ��� ix/houseware/category/service/FindResponse.class

        ��� ix/houseware/category/service/ObjectFactory.class

        ��� ix/houseware/category/service/package-info.class

        ��� META-INF/application-client.xml

        ��� META-INF/ejb-jar.xml

        ������META-INF/maven/

        ������META-INF/maven/ix.houseware.category/

        ������META-INF/maven/ix.houseware.category/CategoryClient-ejb/

        ��� META-INF/maven/ix.houseware.category/CategoryClient-ejb/pom.xml

        ��� META-INF/maven/ix.houseware.category/CategoryClient-ejb/pom.properties

       

       

      Here is the pom.xml file for the EJB module:

       

       

      <?xml version="1.0" encoding="UTF-8"?>

      <!--

       

       

          Licensed to the Apache Software Foundation (ASF) under one or more

          contributor license agreements.  See the NOTICE file distributed with

          this work for additional information regarding copyright ownership.

          The ASF licenses this file to You under the Apache License, Version 2.0

          (the "License"); you may not use this file except in compliance with

          the License.  You may obtain a copy of the License at

       

       

             http://www.apache.org/licenses/LICENSE-2.0

       

       

          Unless required by applicable law or agreed to in writing, software

          distributed under the License is distributed on an "AS IS" BASIS,

          WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

          See the License for the specific language governing permissions and

          limitations under the License.

      -->

       

       

      <!-- $Rev: 636494 $ $Date: 2008-03-12 21:24:02 +0100 (Wed, 12 Mar 2008) $ -->

       

       

      <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>

          <parent>

              <artifactId>CategoryClient</artifactId>

              <groupId>ix.houseware.category</groupId>

              <version>1.0-SNAPSHOT</version>

          </parent>

       

       

          <groupId>ix.houseware.category</groupId>

          <artifactId>CategoryClient-ejb</artifactId>

          <version>1.0-SNAPSHOT</version>

          <packaging>ejb</packaging>

       

       

          <name>CategoryClient-ejb EJB</name>

          <properties>

          <!--

             - http://docs.codehaus.org/display/MAVENUSER/POM+Element+for+Source+File+Encoding

             -->

              <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

              <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>

          </properties>

          <build>

              <defaultGoal>install</defaultGoal>

              <plugins>

             

                  <!-- this configures the surefire plugin to run your tests with the javaagent enabled -->

                  <plugin>

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

                      <artifactId>maven-surefire-plugin</artifactId>

                      <configuration>

                          <forkMode>pertest</forkMode>

                          <argLine>-javaagent:${basedir}/target/openejb-javaagent-3.0-beta-2.jar</argLine>

                          <workingDirectory>${basedir}/target</workingDirectory>

                      </configuration>

                  </plugin>

       

       

          <!-- this tells maven to copy the openejb-javaagent jar into your target/ directory -->

          <!-- where surefire can see it -->

                  <plugin>

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

                      <artifactId>maven-dependency-plugin</artifactId>

                      <executions>

                          <execution>

                              <id>copy</id>

                              <phase>process-resources</phase>

                              <goals>

                                  <goal>copy</goal>

                              </goals>

                              <configuration>

                                  <artifactItems>

                                      <artifactItem>

                                          <groupId>org.apache.openejb</groupId>

                                          <artifactId>openejb-javaagent</artifactId>

                                          <version>3.0-beta-2</version>

                                          <outputDirectory>${project.build.directory}</outputDirectory>

                                      </artifactItem>

                                  </artifactItems>

                              </configuration>

                          </execution>

                      </executions>

                  </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>

                          <compilerArguments>

                              <endorseddirs>${endorsed.dir}</endorseddirs>

                          </compilerArguments>

                      </configuration>

                  </plugin>

                  <plugin>

                      <groupId>org.codehaus.mojo</groupId>

                      <artifactId>jaxws-maven-plugin</artifactId>

                      <version>1.10</version>

                      <executions>

                          <execution>

                              <goals>

                                  <goal>wsimport</goal>

                              </goals>

                              <configuration>

                                  <wsdlFiles>

                                      <wsdlFile>www.ixsystems.com.au/category-ws-0.0.1-SNAPSHOT/services.wsdl</wsdlFile>

                                  </wsdlFiles>

                                  <wsdlLocation>http://www.ixsystems.com.au/category-ws-0.0.1-SNAPSHOT/services?wsdl</wsdlLocation>

                                  <staleFile>${project.build.directory}/jaxws/stale/services.stale</staleFile>

                              </configuration>

                              <id>wsimport-generate-services</id>

                              <phase>generate-sources</phase>

                          </execution>

                      </executions>

                      <dependencies>

                          <dependency>

                              <groupId>javax.xml</groupId>

                              <artifactId>webservices-api</artifactId>

                              <version>1.4</version>

                          </dependency>

                      </dependencies>

                      <configuration>

                          <sourceDestDir>${project.build.directory}/generated-sources/jaxws-wsimport</sourceDestDir>

                          <xnocompile>true</xnocompile>

                          <verbose>true</verbose>

                          <extension>true</extension>

                          <catalog>${basedir}/src/jax-ws-catalog.xml</catalog>

                          <target>2.0</target>

                      </configuration>

                  </plugin>

              </plugins>

          </build>

          <repositories>

              <repository>

                  <id>apache-m2-snapshot</id>

                  <name>Apache Snapshot Repository</name>

                  <url>http://repository.apache.org/snapshots</url>

              </repository>

          </repositories>

          <dependencies>

              <dependency>

                  <groupId>javax.persistence</groupId>

                  <artifactId>persistence-api</artifactId> 

                  <version>1.0.2</version>

              </dependency>

              <dependency>

                  <groupId>org.apache.openejb</groupId>

                  <artifactId>openejb-core</artifactId>

                  <version>3.1.4</version>

              </dependency>

              <dependency>

                  <groupId>org.apache.openejb</groupId>

                  <artifactId>openejb-spring</artifactId>

                  <version>3.1.4</version>

              </dependency>

       

       

              <dependency>

                  <groupId>org.jboss.spec.javax.ejb</groupId>

                  <artifactId>jboss-ejb-api_3.1_spec</artifactId>

                  <version>1.0.1.Final</version>

              </dependency>

              <dependency>

                  <groupId>junit</groupId>

                  <artifactId>junit</artifactId>

                  <version>4.8.1</version>

                  <scope>test</scope>

              </dependency>

       

       

          </dependencies>

       

       

        <!--

        This section allows you to configure where to publish libraries for sharing.

        It is not required and may be deleted.  For more information see:

        http://maven.apache.org/plugins/maven-deploy-plugin/

        -->

          <distributionManagement>

              <repository>

                  <id>localhost</id>

                  <url>file://${basedir}/target/repo/</url>

              </repository>

              <snapshotRepository>

                  <id>localhost</id>

                  <url>file://${basedir}/target/snapshot-repo/</url>

              </snapshotRepository>

          </distributionManagement>

       

       

      </project>

       

       

      Any suggestion would be very appreciated.

      Thanks

      Sam