sts平台clean自带的tomcat报错

clean时:

Removing obsolete files from server...
Could not clean server of obsolete files: null
java.lang.NullPointerException

运行时:

七月 26, 2017 12:02:26 上午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 925 ms
七月 26, 2017 12:02:26 上午 org.apache.catalina.startup.Catalina start
严重: The required Server component failed to start so Tomcat is unable to start.
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[-1]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:625)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:769)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:439)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:925)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 11 more

 

主要是因为 1.此tomcat不支持修改host的name属性,必须修改为原属性

2.修改之后需要右键STS-tomcat,找到browse Devlopment选项,进而找到tomcat的conf/server.xml,修改成与项目视图中的server.xml一样内存

 如果都不行,删除tomcat,删除G:\sts\workspacemy\.metadata\.plugins\org.eclipse.wst.server.core\路径下除publish.xml外的文件(或都删了,未试)

,再重新安装

另此路径也关键:G:\sts\workspacemy\.metadata\.plugins\org.eclipse.wst.server.core

posted @ 2017-07-26 00:08  雾火  阅读(1221)  评论(0编辑  收藏  举报