当前位置: 代码迷 >> Java Web开发 >> Context [] startup failed due to previous errors解决方案
  详细解决方案

Context [] startup failed due to previous errors解决方案

热度:3251   发布时间:2013-02-25 21:14:54
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 ms2012-7-20 17:00:45 org.apache.catalina.core.StandardService startInternal信息: Starting service Catalina2012-7-20 17:00:45 org.apache.catalina.core.StandardEngine startInternal信息: Starting Servlet Engine: Apache Tomcat/7.0.222012-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\localhost2012-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 listenerStart2012-7-20 17:00:46 org.apache.catalina.core.StandardContext startInternal严重: Context [/soft] startup failed due to previous errors2012-7-20 17:00:46 org.apache.catalina.startup.HostConfig deployDirectory信息: Deploying web application directory docs2012-7-20 17:00:46 org.apache.catalina.startup.HostConfig deployDirectory信息: Deploying web application directory examples2012-7-20 17:00:46 org.apache.catalina.startup.HostConfig deployDirectory信息: Deploying web application directory host-manager2012-7-20 17:00:46 org.apache.catalina.startup.HostConfig deployDirectory信息: Deploying web application directory manager2012-7-20 17:00:46 org.apache.catalina.startup.HostConfig deployDirectory信息: Deploying web application directory ROOT2012-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"
maxActive="100" maxIdle="30" maxWait="10000"
username="root" password="root" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/juddi"/>
  相关解决方案
本站暂不开放注册!
内测阶段只得通过邀请码进行注册!