论坛首页 Java企业应用论坛

『出错』我用ant编译好workbench.war文件,拷贝到tomcat web...

浏览 8390 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2004-06-07  
软件环境:
ant1.6.1
tomcat5.0.19
tapestry3.0
配置文件:
workbench自带的build.xml文件
错误提示信息:
启动tomcat后提示信息
上略
信息: Installing web application at context path /workbench from URL file:D:/tom
cat/webapps/workbench
2004-6-7 14:10:47 org.apache.catalina.core.StandardHostDeployer install
信息: Error installing
org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging
.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@a0864
f for org.apache.commons.logging.impl.Log4JLogger
        at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactory
Impl.java:532)
        at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactory
Impl.java:272)
        at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactory
Impl.java:246)
        at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)
        at org.apache.catalina.session.ManagerBase.<init>(ManagerBase.java:107)
        at org.apache.catalina.session.StandardManager.<init>(StandardManager.ja
va:111)
        at org.apache.catalina.startup.ContextConfig.managerConfig(ContextConfig
.java:348)
        at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:65
2)
        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi
g.java:253)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:166)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
222)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:866)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:85
0)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:638)

        at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDep
loyer.java:320)
        at org.apache.catalina.core.StandardHost.install(StandardHost.java:875)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:657
)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:476
)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1008)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:394)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:166)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1134)

        at org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1126)

        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:521
)
        at org.apache.catalina.core.StandardService.start(StandardService.java:5
19)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:234
5)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:594)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
Caused by: org.apache.commons.logging.LogConfigurationException: No suitable Log
constructor [Ljava.lang.Class;@a0864f for org.apache.commons.logging.impl.Log4J
Logger
        at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogF
actoryImpl.java:432)
        at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactory
Impl.java:525)
        ... 33 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)
        at java.lang.Class.getConstructor0(Class.java:1922)
        at java.lang.Class.getConstructor(Class.java:1019)
        at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogF
actoryImpl.java:429)
        ... 34 more
2004-6-7 14:10:47 org.apache.catalina.startup.HostConfig deployWARs
严重: Exception while expanding web application archive workbench.war
java.io.IOException: org.apache.commons.logging.LogConfigurationException: org.a
pache.commons.logging.LogConfigurationException: No suitable Log constructor [Lj
ava.lang.Class;@a0864f for org.apache.commons.logging.impl.Log4JLogger
        at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDep
loyer.java:326)
        at org.apache.catalina.core.StandardHost.install(StandardHost.java:875)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:657
)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:476
)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1008)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:394)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:166)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1134)

        at org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1126)

        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:521
)
        at org.apache.catalina.core.StandardService.start(StandardService.java:5
19)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:234
5)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:594)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
2004-6-7 14:10:47 org.apache.catalina.core.StandardHostDeployer install
信息: Installing web application at context path /webdav from URL file:D:\tomcat
\webapps\webdav
2004-6-7 14:10:48 org.apache.catalina.core.StandardHostDeployer install
信息: Installing web application at context path /tomcat-docs from URL file:D:\t
omcat\webapps\tomcat-docs
2004-6-7 14:10:48 org.apache.catalina.core.StandardHostDeployer install
信息: Installing web application at context path /workbench from URL file:D:\tom
cat\webapps\workbench
2004-6-7 14:10:48 org.apache.catalina.core.StandardHostDeployer install
信息: Error installing
org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging
.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@302e6
7 for org.apache.commons.logging.impl.Log4JLogger
        at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactory
Impl.java:532)
        at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactory
Impl.java:272)
        at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactory
Impl.java:246)
        at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)
        at org.apache.catalina.session.ManagerBase.<init>(ManagerBase.java:107)
        at org.apache.catalina.session.StandardManager.<init>(StandardManager.ja
va:111)
        at org.apache.catalina.startup.ContextConfig.managerConfig(ContextConfig
.java:348)
        at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:65
2)
        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi
g.java:253)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:166)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
222)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:866)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:85
0)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:638)

        at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDep
loyer.java:320)
        at org.apache.catalina.core.StandardHost.install(StandardHost.java:875)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
ava:727)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:477
)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1008)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:394)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:166)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1134)

        at org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1126)

        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:521
)
        at org.apache.catalina.core.StandardService.start(StandardService.java:5
19)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:234
5)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:594)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
Caused by: org.apache.commons.logging.LogConfigurationException: No suitable Log
constructor [Ljava.lang.Class;@302e67 for org.apache.commons.logging.impl.Log4J
Logger
        at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogF
actoryImpl.java:432)
        at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactory
Impl.java:525)
        ... 33 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)
        at java.lang.Class.getConstructor0(Class.java:1922)
        at java.lang.Class.getConstructor(Class.java:1019)
        at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogF
actoryImpl.java:429)
        ... 34 more
2004-6-7 14:10:48 org.apache.catalina.startup.HostConfig deployDirectories
严重: Error deploying web application directory workbench
java.io.IOException: org.apache.commons.logging.LogConfigurationException: org.a
pache.commons.logging.LogConfigurationException: No suitable Log constructor [Lj
ava.lang.Class;@302e67 for org.apache.commons.logging.impl.Log4JLogger
        at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDep
loyer.java:326)
        at org.apache.catalina.core.StandardHost.install(StandardHost.java:875)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
ava:727)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:477
)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1008)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:394)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:166)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1134)

        at org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1126)

        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:521
)
        at org.apache.catalina.core.StandardService.start(StandardService.java:5
19)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:234
5)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:594)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
2004-6-7 14:10:48 org.apache.catalina.core.StandardHostDeployer install
下略
你的分析:
ant编译workbench自动build.xml文件提示信息:
Buildfile: build.xml

init:
    [mkdir] Created dir: E:\MyProject\tapestry\examples\Workbench\classes

compile:
    [javac] Compiling 43 source files to E:\MyProject\tapestry\examples\Workbenc
h\classes
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -deprecation for details.

install:
    [mkdir] Created dir: E:\MyProject\tapestry\examples\Workbench\.build
    [mkdir] Created dir: E:\MyProject\tapestry\lib\examples
     [copy] Copying 1 file to E:\MyProject\tapestry\examples\Workbench\.build
      [war] Building war: E:\MyProject\tapestry\lib\examples\workbench.war

BUILD SUCCESSFUL
Total time: 9 seconds

好像很正常,但是将编译好的war文件copy至tomcat的webapps目录下
启动tomcat回提示一堆错误
这是怎么回事呢?
   发表时间:2004-06-07  
错误信息不是打出来了么:
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
0 请登录后投票
   发表时间:2004-06-07  
可是发布好的workbench.war文件里有log4j1.2.6.jar文件啊
0 请登录后投票
   发表时间:2004-06-08  
我的workbench.war通过tomcat发布不出错了
可是访问http://localhost:8080/workbench/app
出来是空白页,这又是怎么回事?
0 请登录后投票
   发表时间:2004-07-09  
我弄了半天,也出错了,不知道是哪里出问题了,后台也没错误提示

HTTP Status 503 - Servlet simple is currently unavailable

--------------------------------------------------------------------------------

type Status report

message Servlet simple is currently unavailable

description The requested service (Servlet simple is currently unavailable) is not currently available.


--------------------------------------------------------------------------------

Apache Tomcat/4.1.30
0 请登录后投票
   发表时间:2004-07-09  
好像是缺少两个,以前有一个帖子说过,我也遇到类似事情
ognl 和 assert 两个具体名字不记得了
0 请登录后投票
   发表时间:2004-07-09  
http://forum.iteye.com/viewtopic.php?t=4987&highlight=tapestry
0 请登录后投票
论坛首页 Java企业应用版

跳转论坛:
Global site tag (gtag.js) - Google Analytics