8 Replies Latest reply on May 12, 2011 10:55 AM by fn0000rd

    JBoss 5.1 Cargo Remote Deployment

    gillonv

      Hello,

       

      I am having an issue deploying a War to Jboss 5.1 using the Cargo Plugin.

       

      Here is my config:

                          <plugin>

                              <groupId>org.codehaus.cargo</groupId>

                              <artifactId>cargo-maven2-plugin</artifactId>

                              <version>${cargo.plugin.version}</version>

                              <configuration>

                                  <container>

                                      <containerId>jboss51x</containerId>

                                      <type>remote</type>

                                      <log>${basedir}/target/cargo.log</log>

                                      <timeout>30000</timeout>

                                  </container>

                                  <configuration>

                                      <type>runtime</type>

                                      <properties>

                                          <cargo.hostname>myhostName</cargo.hostname>

                                          <cargo.rmi.port>1099</cargo.rmi.port>

                                          <cargo.logging>high</cargo.logging>

                                          <cargo.remote.username>user</cargo.remote.username>

                                          <cargo.remote.password>pwd</cargo.remote.password>

                                          <cargo.servlet.port>XXXX</cargo.servlet.port>

                                      </properties>

      <!--                                 <deployer> -->

                                              <!--  You have to again specify that the type for the deployer --> 

      <!--                                    <type>remote</type> -->

      <!--                                    <deployables>  -->

                                          <!-- This deployable specifies the webapp you want to deploy -->

      <!--                                        <deployable>   -->

                                                  <!-- <location>target/micses-web-${project.version}.war</location> -->

      <!--                                            <groupId>${pom.groupId}</groupId>   -->

      <!--                                            <artifactId>${pom.artifactId}</artifactId>   -->

      <!--                                            <type>${pom.packaging}</type>   -->

                                                  <!--

                                                      <properties> <context>/${project.artifactId}</context>

                                                      </properties>

                                                  -->

      <!--                                        </deployable> -->

      <!--                                    </deployables> -->

      <!--                                </deployer> -->

                                  </configuration>

                              </configuration>

                              <executions>

                                  <execution>

                                      <id>verify-deploy</id>

                                      <phase>install</phase>

                                      <goals>

                                          <!--<goal>deployer-stop</goal>-->

                                          <!--<goal>deployer-undeploy</goal>-->

                                          <goal>deployer-deploy</goal>

                                          <goal>start</goal>

                                      </goals>

                                  </execution>

                              </executions>

      <dependencies>

                      <dependency>

                          <groupId>org.codehaus.cargo</groupId>

                          <artifactId>cargo-core-tools-jboss-deployer-5.1-and-onwards</artifactId>

                          <version>${cargo.plugin.version}</version>

                      </dependency>               

                      <dependency>

                          <groupId>org.jboss.integration</groupId>

                          <artifactId>jboss-profileservice-spi</artifactId>

                          <version>${jboss.version}</version>

                      </dependency>

                      <dependency>

                          <groupId>org.jboss.jbossas</groupId>

                          <artifactId>jboss-as-client</artifactId>

                          <version>${jboss.version}</version>

                          <type>pom</type>

                      </dependency>

                      </dependencies>

                          </plugin>

              </plugins>

          </build>

      .....................

              <cargo.plugin.version>1.0.6</cargo.plugin.version>

              <jboss.version>5.1.0.GA</jboss.version>

       

      Error message:

      java.lang.ClassNotFoundException: org.jboss.profileservice.management.client.upload.DeploymentProgressImpl

          at org.jboss.remoting.serialization.ClassLoaderUtility.loadClass(ClassLoaderUtility.java:103)

          at org.jboss.remoting.loading.RemotingClassLoader.loadClass(RemotingClassLoader.java:86)

          at java.lang.Class.forName0(Native Method)

          at java.lang.Class.forName(Class.java:247)

          at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.resolveClass(ObjectInputStreamWithClassLoader.java:179)

          at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)

          at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)

          at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)

          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

          at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)

          at org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:119)

          at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)

          at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)

          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

          at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)

          at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)

          at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)

          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

          at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)

          at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObjectVersion2_2(JavaSerializationManager.java:238)

          at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:138)

          at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:123)

          at org.jboss.invocation.unified.marshall.InvocationUnMarshaller.read(InvocationUnMarshaller.java:59)

          at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedRead(MicroSocketClientInvoker.java:1220)

          at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:850)

          at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:165)

          at org.jboss.remoting.Client.invoke(Client.java:1724)

          at org.jboss.remoting.Client.invoke(Client.java:629)

          at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.aspects.remoting.MergeMetaDataInterceptor.invoke(MergeMetaDataInterceptor.java:74)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.aop.generatedproxies.AOPProxy$1.distribute(AOPProxy$1.java)

          at org.codehaus.cargo.tools.jboss.JBossDeployer.deploy(JBossDeployer.java:65)

       

      When I try the Goal deployer-undeploy I am getting the following messages on the JBoss server console, which prooves me that at least the connection is correctly setup::

      WARN  [DeploymentManagerImpl] Null or empty names.

       

      My question is:

      Why is it trying to reference: org.jboss.profileservice.management.client.upload.DeploymentProgressImpl

      when I am using Jboss 5.1 which only contains the profileservirce-5.1.0.ga.jar with

      org.jboss.profileservice.management.upload.DeploymentProgressImpl

       

      I have setup the pom.xml file as indicated here: http://cargo.codehaus.org/JBoss+Remote+Deployer

       

      Thanks in advance.Please feel free to contact me if you need more information.

        • 1. JBoss 5.1 Cargo Remote Deployment
          gillonv

          Correction: our server is JBoss EAP 5.1 and I heard that JBoss EAP 5.1 is between 5.1.0.GA and 6.0, is that correct? In that case, how can I get the EAP 5.1 libraries? Should I use the 6.0 libraries?

           

          Please help!

          • 2. JBoss 5.1 Cargo Remote Deployment
            alesj
            Correction: our server is JBoss EAP 5.1

            Then it means you should have official support, simply ask there to help you.

            • 3. JBoss 5.1 Cargo Remote Deployment
              gillonv

              Contacted support through SR, their response was they dont officially support Cargo but they suggested the following which didnt work.

              <dependency>

                    <groupId>org.jboss.integration</groupId>

                    <artifactId>jboss-profileservice-spi</artifactId>

                    <version>5.1.0.GA</version>

                    <scope>system</scope>

                    <systemPath>${jboss.home}/client/jboss-profileservice-client.jar</systemPath>

                  </dependency>

               

              JBoss EAP is on UNIX server. Maven deployment is on Windows.Is that an issue?

              I am not very familiar with Cargo RMI deployment.

               

              Thanks


              • 4. JBoss 5.1 Cargo Remote Deployment
                fn0000rd

                Did you find a solution to this? I'm running into the same issue, with a similar configuration. I've tried 4 different versions of Cargo, with no luck...

                • 5. JBoss 5.1 Cargo Remote Deployment
                  gillonv

                  Yes I did, I should have posted it but I was not 100% sure it is the right way to do so.

                  Anyway, on top of my head, I had the JAR stored locally on my C drive (that's where my build process was) and then set the system path in the pom to that location.

                  My guess is that the jar is being referenced locally at deployment, where I thought it was referenced on the server by the remote service.

                   

                  Try storing the JAR to a location that the Maven build can access.

                   

                  Let me know if that doesn't work.

                  • 6. JBoss 5.1 Cargo Remote Deployment
                    fn0000rd

                    Which jar do you mean?

                     

                    If you mean the jboss-as-profileservice, it doesn't have:

                     

                    org.jboss.profileservice.management.client.upload.DeploymentProgressImpl

                     

                    It has:

                     

                    org.jboss.profileservice.management.upload.DeploymentProgressImpl <---- there's no client in the namespace.

                     

                    I've found org.jboss.profileservice.management.client.upload.DeploymentProgressImpl, but only in JBoss 6 jars....

                    • 7. JBoss 5.1 Cargo Remote Deployment
                      gillonv

                      The Jar name is jboss-profileservice-client.jar.

                      This Jar should be in your Jboss Server installation, so something like <<Jboss installation directory>>\jboss-as\client

                      Copy that jar from the Jboss server if your Maven cannot access it directly.

                      • 8. JBoss 5.1 Cargo Remote Deployment
                        fn0000rd

                        Thanks, that did it.

                         

                        I couldn't find the jboss-profileservice-client.jar in any public Maven repositories, at least not for 5.1.0.GA, so I snagged the one from the server and added it to our internal Maven repository manually, so it can just be part of the regular build.

                         

                        Works like a charm now.