2012-10-04 37 views
0

我手動啓動了Jboss Server 5.1.0.GA,並使用下面的pom.xml來停止。 下面給出的代碼是在Maven的2.2.1使用Maven停止Jboss服務器時出錯

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

這究竟是爲什麼?

回答

1

你確定端口是1080嗎?默認端口通常爲1099.

+0

127.0.0.1:1080是它在瀏覽器的url區域中顯示的默認服務器 –

+0

用於訪問瀏覽器的端口(默認爲8080)不是用於管理的端口。默認管理端口是1099。 – uaarkoti