I'm trying to use Jetty to debug a Java Web application. I installed the JST plugin like described on this page: http://docs.codehaus.org/display/JETTY/Web+Tooling+Support![]()
Now I have a basic web application (tapestry5 archetype or eclipse default web application template) and I add it to Jetty server. Then I try to start Jetty and I get an error:
Publishing to Jetty6.x... (Time of error......)
Reason:
java.lang.NullPointerException
Could not publish to the server.
In the console, I have:
2008-03-25 18:31:58.627::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
2008-03-25 18:31:58.783::INFO: jetty-6.1.8
2008-03-25 18:31:58.815::INFO: Opened C:\jetty-6.1.8\logs\2008_03_25.request.log
2008-03-25 18:31:58.861::INFO: Started SelectChannelConnector@127.0.0.1:8080
And in Eclipse log file, I have:
!ENTRY org.eclipse.wst.server.core 4 0 2008-03-25 18:32:00.187
!MESSAGE Could not publish to the server.
!STACK 0
java.lang.NullPointerException
at org.eclipse.wst.common.componentcore.internal.util.ComponentUtilities.getDeployUriOfComponent(ComponentUtilities.java:327)
at org.eclipse.jst.j2ee.internal.deployables.J2EEFlexProjDeployable.getURI(J2EEFlexProjDeployable.java:429)
at org.eclipse.jst.server.generic.core.internal.publishers.AntPublisher.guessModuleName(AntPublisher.java:259)
at org.eclipse.jst.server.generic.core.internal.publishers.AntPublisher.getPublishProperties(AntPublisher.java:224)
at org.eclipse.jst.server.generic.core.internal.publishers.AntPublisher.publish(AntPublisher.java:110)
at org.eclipse.jst.server.generic.core.internal.GenericServerBehaviour.publishModule(GenericServerBehaviour.java:84)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModule(ServerBehaviourDelegate.java:749)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModules(ServerBehaviourDelegate.java:835)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:669)
at org.eclipse.wst.server.core.internal.Server.doPublish(Server.java:887)
at org.eclipse.wst.server.core.internal.Server.publish(Server.java:874)
at org.eclipse.wst.server.core.internal.PublishServerJob.run(PublishServerJob.java:72)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
<script type="text/javascript"></script>
<script type="text/javascript"></script>
By the way, I'm also working on a variation of the Jetty eclipse plugin that runs the war exploded, and am reasonably confident this will work in most cases.
<script type="text/javascript"></script>
用户尝试使用Jetty调试Java Web应用时遇到NullPointerException错误,导致无法发布应用到服务器。此问题已确认为Eclipse 3.3.2版本的bug,并提供了升级WST插件或使用早期版本Eclipse的解决办法。
1073






