将应用程序从Eclipse部署到GlassFish

use*_*755 10 eclipse glassfish deploying glassfish-4

我正在尝试从Eclipse部署应用程序到GlassFish 4服务器,但是我收到此错误:

cannot Deploy elearning
deploy is failing=Application with name [elearning] is not deployed
Run Code Online (Sandbox Code Playgroud)

在glassfish日志文件中没有错误,也没有关于部署的信息.但是在eclipse日志中,存在以下错误:

!ENTRY oracle.eclipse.tools.glassfish 1 1 2014-11-17 16:30:51.474
!MESSAGE GlassFish: Deploy direcotry C:\glassfish4\glassfish\domains\domain1\eclipseApps\elearning

!ENTRY oracle.eclipse.tools.glassfish 4 1 2014-11-17 16:30:51.599
!MESSAGE GlassFish: deploy is failing=
!STACK 0
java.lang.Exception: deploy is failing=Application with name [elearning] is not deployed
    at oracle.eclipse.tools.glassfish.GlassfishServerBehaviourDelegate.publishDeployedDirectory(GlassfishServerBehaviourDelegate.java:612)
    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)

!ENTRY oracle.eclipse.tools.glassfish 4 0 2014-11-17 16:30:51.599
!MESSAGE cannot Deploy elearning
!STACK 0
java.lang.Exception: deploy is failing=Application with name [elearning] is not deployed
    at oracle.eclipse.tools.glassfish.GlassfishServerBehaviourDelegate.publishDeployedDirectory(GlassfishServerBehaviourDelegate.java:612)
    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)
Run Code Online (Sandbox Code Playgroud)

哪里可以有问题?

小智 15

我有同样的问题,并在网上搜索了很多,只是通过删除玻璃鱼服务器并重置另一个解决,瞧...


M.P*_*nov 6

虽然接受的答案可能会奏效,但对我来说这不是最好的解决方案.问题很可能会再次发生,然后我们需要重复.

以下答案对我有用:https://stackoverflow.com/a/30507834/1934673

我不知道为什么它适用于罐子,如果未选中复选框,有时会失败.好消息是,这样我们可以解决这个问题,我们不需要删除服务器 - 每次发生错误时都会创建服务器.坏消息是使用罐子的工作速度较慢.