0

我手动启动了 Jboss Server 5.1.0.GA 并使用以下 pom.xml 停止。下面给出的代码用于 Maven 2.2.1

<plugin>
  <groupId>org.codehaus.cargo</groupId>
  <artifactId>cargo-maven2-plugin</artifactId>
  <version>1.0.6</version>
  <configuration>
    <container>
      <timeout>400000</timeout>
      <containerId>jboss51x</containerId>
      <home>C:/jboss-5.1.0.GA-PaletteConfig-9.5.0.0</home>
    </container>
    <configuration>
      <type>existing</type>
      <home>C:/jboss-5.1.0.GA-PaletteConfig-9.5.0.0/server/default</home>
      <properties>
        <cargo.remote.username>admin</cargo.remote.username>
        <cargo.remote.password>admin</cargo.remote.password>
        <cargo.hostname>127.0.0.1</cargo.hostname>
        <cargo.rmi.port>1080</cargo.rmi.port>
      </properties>
    </configuration>
  </configuration>
  <executions>
    <execution>
      <id>stop-container</id>
      <phase>install</phase>
      <goals>
        <goal>stop</goal>
      </goals>
    </execution>
  </executions>
</plugin>

但我得到一个错误,如下所示:

[WARNING] [talledLocalContainer] Exception in thread "main" 
    javax.naming.CommunicationException: 
  Could not obtain connection to any of these urls: 127.0.0.1:1080
  [Root exception is javax.naming.CommunicationException: Failed to retrieve 
      stub from server /127.0.0.1:1080 
  [Root exception is java.io.EOFException]]
[WARNING] [talledLocalContainer] at 
    org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763)

为什么会这样?

4

1 回答 1

1

你确定端口是1080?默认端口通常是 1099。

于 2012-10-04T16:21:05.800 回答