views:

295

answers:

0

Hello,

I am trying to start JBoss from ant, using Cargo. In build.xml I have the following targets set:

<project name="" default="" basedir=".">

 <property name="jboss.logging" value="${jboss.home}/server/default/log/jboss.logging.log" />
 <property name="jboss.log" value="${jboss.home}/server/default/log" />
 <property name="myear" value="${out}/casdm.ear" />

  <path id="library.cargo.classpath">
   <fileset dir="${basedir}/lib">
    <include name="commons-logging-1.1.1.jar"/>
    <include name="commons-discovery-0.4.jar"/>
    <include name="cargo-core-uberjar-1.0.jar"/>
    <include name="cargo-ant-1.0.jar" />
   </fileset>
  </path>

  <taskdef resource="cargo.tasks" classpathref="library.cargo.classpath" />

  <target name="jboss-start">
   <echo message="jboss.home:              ${jboss.home}" />
   <echo message="jboss.port:              ${jboss.port}" />
   <echo message="jboss.log:               ${jboss.log}" />
   <echo message="jboss.logging:           ${jboss.logging}" />
   <cargo containerId="jboss4x" home="${jboss.home}" action="start" wait="false" output="${jboss.log}/output.log">
    <configuration type="existing" home="${jboss.home}/server/default/">
     <property name="cargo.jboss.configuration" value="default" />
     <property name="cargo.servlet.port" value="${jboss.port}" />
     <property name="cargo.logging" value="${jboss.logging}" />
     <deployable file="${myear}" type="ear" />
    </configuration>
   </cargo>
  </target>

  <target name="jboss-stop">
   <cargo containerId="jboss4x" home="${jboss.home}" action="stop">
    <configuration type="existing" home="${jboss.home}/server/default/">
     <property name="cargo.jboss.configuration" value="default" />
     <property name="cargo.rmi.port" value="1099" />
    </configuration>
   </cargo>
  </target>
 </project>

In .properties file I've set:


    jboss.home=d:/Java/jboss-4.2.2.GA
    jboss.port=50000
    jboss.logging=INFO

The error I get is: org.codehaus.cargo.container.ContainerException: Failed to create a JBoss 4.2.2 existing configuration.

Anybody happens to know how can it be solved? Any opinion would be more than welcome.