0

Jboss Server 5.1.0.GAを手動で起動し、次のpom.xmlを使用して停止しました。以下のコードはMaven2.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 に答える