Java – GlassFish 4.1 deployment failed on eclipse Luna using JDK 8

You cannot use JDK 8, GlassFish 4.1 to deploy GlassFish on eclipse Luna jsp.

Exception stack trace:

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)

Session data:

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

Solution

When adding GlassFish server in eclipse, you can choose "keep session during redeployment" There is an error in the GlassFish tool plug-in (at least as of January 22, 2015) The violation code is located in Oracle. In the computepreservesessions() method eclipse. tools. glassfish. Abstractglassfishserver If uncheck this option, the method returns null, the key is inserted into the map below the call stack, and others check the empty key and say: "cannot initialize the runner class"

Basically, check "preserve session across redeployment", undeploy any previously failed deployments, and then redeploy

Fit me.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>