netbeans 7和glassfish3的新手

时间:2011-09-07 15:48:58

标签: netbeans glassfish-3

我刚刚在Windows XP机器上安装了带有glassfish 3的Netbeans 7.0.1。我开始学习一些JSF并尝试启动它。但是玻璃鱼未能开始:

SEVERE: Shutting down v3 due to startup exception : No free port within range: 8080=com.sun.enterprise.v3.services.impl.monitor.MonitorableSelectorHandler@1815aa4

Deployment error:
GlassFish Server 3.1 Start Failed
See the server log for details.
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:223)
    at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:106)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    at sun.reflect.GeneratedMethodAccessor92.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:390)
    at org.apache.tools.ant.Target.performTasks(Target.java:411)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:284)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:539)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
BUILD FAILED (total time: 32 seconds)

看起来正在使用端口8080(我确认在8080上运行另一个应用程序我无法更改)。如何重新配置​​Netbeans和glassfish以在其他端口上运行?

由于

哈迪

1 个答案:

答案 0 :(得分:4)

  1. 找到您的Glassfish安装目录(例如C:\Program Files\glassfish-3.1

  2. 找到位于安装目录下的domain.xml文件:\glassfish-3.1\glassfish\domains\domain1\config\domain.xml

  3. 在文本编辑器中打开

  4. 搜索8080.您应该在名为network-listener的XML节点下找到它。

  5. 将8080更改为更合适的端口(我不得不尝试多次,因为我的下一次尝试8086也被其他东西使用了。)