jetty eclipse plugin 问题

用户尝试使用Jetty调试Java Web应用时遇到NullPointerException错误,导致无法发布应用到服务器。此问题已确认为Eclipse 3.3.2版本的bug,并提供了升级WST插件或使用早期版本Eclipse的解决办法。
Hi,

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)

Julien HENRY - 25/Mar/08 08:07 AM Hi, 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>

Alfie Kirkpatrick - 20/May/08 02:23 AM
This error is cause by Eclipse 3.3.2 and the plugin works ok on 3.3.0. If you can get hold of the Europa 'fall' release it will work for you. This issue is also logged as JETTY-577.
Alfie Kirkpatrick - 20/May/08 02:23 AM This error is cause by Eclipse 3.3.2 and the plugin works ok on 3.3.0. If you can get hold of the Europa 'fall' release it will work for you. This issue is also logged as JETTY-577.


<script type="text/javascript"></script>

Alfie Kirkpatrick - 20/May/08 02:55 AM
This is fixed with WST 2.0.2 which is available on the Eclipse update site. I searched for new features to install and drilled into patches and installed all the WST and JST 2.0.2 patches. It's now working for me. Looks like they found this on the day of the winter release... https://bugs.eclipse.org/bugs/show_bug.cgi?id=219627.

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.

Alfie Kirkpatrick - 20/May/08 02:55 AM This is fixed with WST 2.0.2 which is available on the Eclipse update site. I searched for new features to install and drilled into patches and installed all the WST and JST 2.0.2 patches. It's now working for me. Looks like they found this on the day of the winter release... https://bugs.eclipse.org/bugs/show_bug.cgi?id=219627. 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>

Alfie Kirkpatrick - 20/May/08 02:56 AM
Sorry, I searched for updates to existing features – oops. Also, this affects all generic server plugins including JBoss and Glassfish.
Alfie Kirkpatrick - 20/May/08 02:56 AM Sorry, I searched for updates to existing features – oops. Also, this affects all generic server plugins including JBoss and Glassfish.
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值