0

我正在使用以下堆栈、spring 框架、Tomcat 7.0 和 maven,并试图编译和“在服务器上运行”,我似乎无法访问本地主机地址。我从浏览器收到的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
4

1 回答 1

0
  • 首先:您需要确保 Eclipse 编译文件!-- 你可以检查一下:如果有WAR文件,那么编译过程就可以工作了。
  • 第二:确保部署过程有效:清理服务器并发布项目,然后启动服务器
于 2012-09-16T09:18:56.343 回答