Community
Participate
Working Groups
Build Identifier: When run or debug a tomcat server whith "Serve modules without publishing" options selected, it'l get a NullPointerException. Reproducible: Always Steps to Reproduce: 1.Create a tomcat server with "Serve modules without publishing" selected. 2.Add a web project to the server and press run or debug button. 3.The server start with a NullPointerException and the web project fails.
The Eclipse version is Helios JEE package.
Can you post the stacktrace that you get? the latest NPE that we got reports of was Bug# 318492
(In reply to comment #2) > Can you post the stacktrace that you get? the latest NPE that we got reports of > was Bug# 318492 严重: Error starting static Resources java.lang.IllegalArgumentException: Document base E:\......\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\brick_spot_sys does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4048) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4217) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:722) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:583) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) 2010-7-19 11:17:35 org.apache.catalina.core.StandardContext start 严重: Error in resourceStart() 2010-7-19 11:17:35 org.apache.catalina.core.StandardContext start 严重: Error getConfigured 2010-7-19 11:17:35 org.apache.catalina.core.StandardContext start 严重: Context [/sys] startup failed due to previous errors 2010-7-19 11:17:35 org.apache.catalina.core.StandardContext stop 信息: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/sys] has not been started 2010-7-19 11:17:35 org.apache.coyote.http11.Http11Protocol start 信息: Starting Coyote HTTP/1.1 on http-6080 2010-7-19 11:17:36 org.apache.jk.common.ChannelSocket init 信息: JK: ajp13 listening on /0.0.0.0:6009 2010-7-19 11:17:36 org.apache.jk.server.JkMain start 信息: Jk running ID=0 time=0/312 config=null 2010-7-19 11:17:36 org.apache.catalina.startup.Catalina start 信息: Server startup in 1751 ms
I'm not able to duplicate this problem with the steps provided. Since there doesn't seem to be an indication that projects aren't working with "Serve modules without publishing" enabled, I'll assume it is working given this NPE occurs. With "Serve modules without publishing" enabled, no <Context> should have a docBase pointing to the ".../tmp0/wtpwebapps" folder. This log output suggests that somehow, a <Context> in the server.xml found under the Servers project in your workspace got "disconnected" from it's associated project. As a result, it's seen as an "external" <Context> and is not be adjusted for "Serve modules without publishing". As long as this "disconnected" <Context> is present, you will get this error. Manually removing it should get rid of the error. The question is how the brick_spot_sys project got "disconnected". If the NPE is still occurring, please attach the server.xml found under the Servers project in your workspace. Also, does the brick_spot_sys project still exist in your workspace?
It seems WTP 3.2.1.v201007151559 has resolved this problem. I've updated and it works well.