日期:2014-05-17  浏览次数:21010 次

Context [] startup failed due to previous errors
HTML code

2012-7-20 17:00:44 org.apache.catalina.core.AprLifecycleListener init
信息: Loaded APR based Apache Tomcat Native library 1.1.22.
2012-7-20 17:00:44 org.apache.catalina.core.AprLifecycleListener init
信息: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true].
2012-7-20 17:00:45 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-apr-7070"]
2012-7-20 17:00:45 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-apr-8009"]
2012-7-20 17:00:45 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1537 ms
2012-7-20 17:00:45 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
2012-7-20 17:00:45 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.22
2012-7-20 17:00:45 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor apa7soft.xml from I:\apache-tomcat-7.0.11\conf\catalina\localhost
2012-7-20 17:00:45 org.apache.tomcat.util.digester.Digester endElement
警告:   No rules found matching 'Context/Logger'.
2012-7-20 17:00:46 org.apache.catalina.core.StandardContext startInternal
严重: Error listenerStart
2012-7-20 17:00:46 org.apache.catalina.core.StandardContext startInternal
严重: Context [/soft] startup failed due to previous errors
2012-7-20 17:00:46 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory docs
2012-7-20 17:00:46 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory examples
2012-7-20 17:00:46 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory host-manager
2012-7-20 17:00:46 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory manager
2012-7-20 17:00:46 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory ROOT
2012-7-20 17:00:46 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-apr-7070"]
2012-7-20 17:00:46 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-apr-8009"]
2012-7-20 17:00:46 org.apache.catalina.startup.Catalina start
信息: Server startup in 1118 ms



求解

------解决方案--------------------
对于tomcat5.0 配置数据源的时候要求在server.xml中进行修改加上例如:

<DefaultContext reloadable="true" crossContext="true">
<Resource name="jdbc/juddiDB" scope="Shareable" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/juddiDB">
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost/juddi</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>org.gjt.mm.mysql.Driver</value>
</parameter>
<parameter>
<name>username</name>
<value>root</value>
</parameter>
<parameter>
<!--帐号密码根据数据库安装配置修改-->
<name>password</name>
<value>******</value>
</parameter>
</ResourceParams>
</DefaultContext>

这样的代码。

但是对于tomcat6.0.16的版本,配置数据源一般不修改server.xml,而是在context.xml中对数据源进行相应的配置,如:

<Resource name="jdbc/juddiDB" scope="Shareable" type="javax.sql.DataSource&