如何将glassfish安装到netbeans中

时间:2009-09-10 10:29:58

标签: glassfish netbeans6.7

Glassfish已经安装到Netbeans中。但我忘记了密码和用户名。 (它不是adminadminadmin)所以我重新安装到桌面。我跟着glassfish configuration之后我尝试将Netbeans和glassfish联系起来。首先我创建了Netbeans 6.7.1 Tools / servers / add Server / glassfish v2.1
选择服务器位置,我下载并配置了glassfish文件。注册本地域名已被选中。然后我点击下一步。

选择域文件夹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 个答案:

答案 0 :(得分:1)

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

服务器尝试侦听已在使用的端口。如果另一台服务器已在运行或未正确释放其资源,则会发生这种情况。

如果另一台服务器在同一主机上运行,​​请停止其他服务器或配置另一台端口。

如果端口因清理不正确而被阻止,请尝试终止所有java进程并重新启动NetBeans / Glassfish。如果这样做无效,请重新启动计算机。