STS Tomcat Deploy导致IllegalArgumentException

时间:2012-09-16 03:11:58

标签: java spring tomcat http-status-code-404

我正在使用以下堆栈,spring框架,Tomcat 7.0和maven,并尝试编译和'在服务器上运行',我似乎无法访问localhost地址。我从浏览器404 /Dugsi_Manager收到的信息不可用。

  • 第一次尝试将此项目切换到maven项目并尝试'更新maven配置'。 (事实上​​,这不会让事情变得更糟,因为我的堆栈跟踪显示缺少几个Bean定义。)
  • 第二次尝试是删除所有tomcat实例并创建新实例,并确保部署程序集包含所有.M2 Repo jar。不行。

截至目前的堆栈追踪。

    Sep 15, 2012 10:07:09 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
Sep 15, 2012 10:07:09 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Dugsi_Manager' did not find a matching property.
Sep 15, 2012 10:07:10 PM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Sep 15, 2012 10:07:10 PM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Sep 15, 2012 10:07:10 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1046 ms
Sep 15, 2012 10:07:10 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Sep 15, 2012 10:07:10 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.12
Sep 15, 2012 10:07:10 PM org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base /Users/warz07/Documents/workspace-sts-2.8.0.RELEASE/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Dugsi_Manager does not exist or is not a readable directory
    at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:140)
    at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4814)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4994)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
    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:303)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
Sep 15, 2012 10:07:10 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error in resourceStart()
Sep 15, 2012 10:07:10 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error getConfigured
Sep 15, 2012 10:07:10 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/Dugsi_Manager] startup failed due to previous errors
Sep 15, 2012 10:07:10 PM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Sep 15, 2012 10:07:10 PM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Sep 15, 2012 10:07:10 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 374 ms

1 个答案:

答案 0 :(得分:0)

  • 首先:您需要确保Eclipse编译文件! - 您可以检查它:如果有WAR文件,那么编译过程就会起作用。
  • 第二:确保depoyment过程有效:清理服务器并发布项目,然后启动服务器