2009-09-10 59 views
1

Glassfish已經安裝到Netbeans中。但我忘記了密碼和用戶名。 (這不是adminadminadmin)所以我重新安裝到桌面。我跟着glassfish configuration之後我試圖聯合Netbeans和glassfish。首先我創建了Netbeans 6.7.1工具/服務器/添加服務器/ glassfish v2.1
服務器位置選擇在我下載並配置glassfish文件的位置。註冊本地域被選中。然後我點擊下一步。如何將glassfish安裝到netbeans中

選擇域文件夾c:\ Sun \ AppSer \ Domains \ domain1,然後單擊下一步。管理員:admin密碼:adminadmin並點擊完成。

但它不起作用。當我運行一個項目時,它會給出例外

Domain domain1 failed to startup. Please check the server log for more details. 

Caused by: java.lang.RuntimeException: java.rmi.server.ExportException: Port already in use: 8686; nested exception is: 
Caused by: java.rmi.server.ExportException: Port already in use: 8686; nested exception is: 
Caused by: java.net.BindException: Address already in use: JVM_Bind 
CORE5061: Exception : 
com.sun.appserv.server.ServerLifecycleException: WEB0106: An error occurred while stopping the web container 
Caused by: LifecycleException: WEB0103: This web container has not yet been started 
     at com.sun.enterprise.web.WebContainer.stop(WebContainer.java:912) 
     at com.sun.enterprise.web.PEWebContainer.stopInstance(PEWebContainer.java:815) 
     ... 10 more 
CORE5051: Shutting down all J2EE applications ... 
CORE5068 : Stopping all J2EE Connector 1.5 Compliant resource adapters ... 
CORE 5061 : Resource adapters Stop() Complete 
CORE5052: Application shutdown complete. 
CORE5061: Exception : 
java.lang.NullPointerException 

我該如何擺脫這些異常?

回答

1
Caused by: java.lang.RuntimeException: java.rmi.server.ExportException: Port already in use: 8686; 

服務器嘗試偵聽已在使用的端口。如果另一臺服務器已在運行或未正確釋放其資源,則會發生這種情況。

如果另一臺服務器在同一主機上運行,​​請停止另一臺服務器或配置其他端口。

如果端口由於不正確的清理而被阻止,請嘗試終止所有java進程並重新啓動NetBeans/Glassfish。如果這沒有幫助,請重新啓動計算機。