GlassFish 4.1在使用JDK 8和eclipse Luna部署时失败

3

无法在JDK 8、Glassfish 4.1和Eclipse Luna上部署Glassfish.jsp。

异常堆栈跟踪:

    org.glassfish.tools.ide.admin.CommandException: Cannot initialize Runner class
        at org.glassfish.tools.ide.admin.AdminFactory.newRunner(AdminFactory.java:180)
        at org.glassfish.tools.ide.admin.AdminFactoryHttp.getRunner(AdminFactoryHttp.java:110)
        at org.glassfish.tools.ide.admin.ServerAdmin.exec(ServerAdmin.java:75)
        at oracle.eclipse.tools.glassfish.GlassfishServerBehaviourDelegate.publishDeployedDirectory(GlassfishServerBehaviourDelegate.java:608)
        at oracle.eclipse.tools.glassfish.GlassfishV4ServerBehavior.publishModuleForGlassFishV3(GlassfishV4ServerBehavior.java:96)
        at oracle.eclipse.tools.glassfish.GlassfishV4ServerBehavior.publishModule(GlassfishV4ServerBehavior.java:56)
        at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModule(ServerBehaviourDelegate.java:1091)
        at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModules(ServerBehaviourDelegate.java:1183)
        at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:987)
        at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:774)
        at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:3157)
        at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:345)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

会话数据:

eclipse.buildId=4.4.1.M20140925-0400
java.version=1.8.0_25
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=es_MX
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

我也遇到了完全相同的问题。是不是Eclipse Luna的Glassfish工具出了问题? - Nagesh Kumar
2个回答

5
当你在Eclipse中添加Glassfish服务器时,有一个选项是“跨部署保留会话”。截至2015年1月22日,Glassfish工具插件存在一个错误。问题出现在oracle.eclipse.tools.glassfish.AbstractGlassfishServercomputePreserveSessions()方法中。如果你取消勾选该选项,则该方法将返回null,该键将被插入到调用堆栈的下一层中,然后其他人会检查null键,结果就会出现“无法初始化Runner类”的问题。

基本上,勾选“跨部署保留会话”,撤销以前失败的部署,然后重新部署。

对我有效。


2
是的,看起来Eclipse Luna版本的Glassfish存在问题。 参见:https://github.com/spring-projects/spring-boot/issues/1355 解决方法: 1)通过Eclipse将其导出为WAR文件。 2)使用以下地址:

http://localhost:4848/common/index.jsf

通过“应用程序”选项卡进行部署。

1
希望这个问题能够得到解决。我不知道如何使用 Eclipse 调试器的解决方法。 - JDOaktown

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接