GlassFish 4.1 deploy is failing on eclipse Luna with JDK 8

前端 未结 2 991
梦毁少年i
梦毁少年i 2021-01-14 12:34

Cannot deploy Glassfish.jsp on eclipse Luna, with JDK 8, glassfish 4.1.

Exception Stack Trace:

    org.glassfish.tools.ide.admin.CommandException: Ca         


        
2条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-14 13:06

    When you add your Glassfish server in Eclipse, there is an option to "Preserve sessions across redeployment". There is a bug in the Glassfish tools plugin (as of January 22, 2015 at least). The offending code is in oracle.eclipse.tools.glassfish.AbstractGlassfishServer in the computePreserveSessions() method. If you UNCHECK the option, the method returns null, that key is inserted into a Map further down the call stack, and someone else checks for null keys, and boom: "Cannot initialize Runner class".

    Basically, check "Preserve sessions across redeployment", undeploy any previously failed deployments, and redeploy.

    Works for me.

提交回复
热议问题