您好,欢迎来到[编程问答]网站首页   源码下载   电子书籍   软件下载   专题
当前位置:首页 >> 编程问答 >> Java >> Tomcat启动报错,Error listenerStart Context startup failed due to previous errors

Tomcat启动报错,Error listenerStart Context startup failed due to previous errors

来源:网络整理     时间:2016/7/3 15:12:53     关键词:

关于网友提出的“ Tomcat启动报错,Error listenerStart Context startup failed due to previous errors”问题疑问,本网通过在网上对“ Tomcat启动报错,Error listenerStart Context startup failed due to previous errors”有关的相关答案进行了整理,供用户进行参考,详细问题解答如下:

问题: Tomcat启动报错,Error listenerStart Context startup failed due to previous errors
描述:

Tomcat启动报错
启动日志:
2009-11-6 21:39:13 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2009-11-6 21:39:13 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 578 ms
2009-11-6 21:39:13 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2009-11-6 21:39:13 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/5.0.30
2009-11-6 21:39:13 org.apache.catalina.core.StandardHost start
信息: XML validation disabled
2009-11-6 21:39:13 org.apache.catalina.core.StandardHost getDeployer
信息: Create Host deployer for direct deployment ( non-jmx ) 
2009-11-6 21:39:13 org.apache.catalina.core.StandardHostDeployer install
信息: Processing Context configuration file URL file:D:\server\Tomcat 5.0\conf\Catalina\localhost\admin.xml
2009-11-6 21:39:14 org.apache.catalina.core.StandardHostDeployer install
信息: Processing Context configuration file URL file:D:\server\Tomcat 5.0\conf\Catalina\localhost\balancer.xml
2009-11-6 21:39:14 org.apache.catalina.core.StandardHostDeployer install
信息: Processing Context configuration file URL file:D:\server\Tomcat 5.0\conf\Catalina\localhost\manager.xml
2009-11-6 21:39:15 org.apache.catalina.core.StandardHostDeployer install
信息: Installing web application at context path /jsp-examples from URL file:D:\server\Tomcat 5.0\webapps\jsp-examples
2009-11-6 21:39:15 org.apache.catalina.core.StandardHostDeployer install
信息: Installing web application at context path /servlets-examples from URL file:D:\server\Tomcat 5.0\webapps\servlets-examples
2009-11-6 21:39:15 org.apache.catalina.core.StandardHostDeployer install
信息: Installing web application at context path /sshtest from URL file:D:\server\Tomcat 5.0\webapps\sshtest
log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester).
log4j:WARN Please initialize the log4j system properly.
2009-11-6 21:39:17 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2009-11-6 21:39:17 org.apache.catalina.core.StandardContext start
严重: Context startup failed due to previous errors2009-11-6 21:39:17 org.apache.catalina.core.StandardHostDeployer install
信息: Installing web application at context path /tomcat-docs from URL file:D:\server\Tomcat 5.0\webapps\tomcat-docs
2009-11-6 21:39:17 org.apache.catalina.core.StandardHostDeployer install
信息: Installing web application at context path /webdav from URL file:D:\server\Tomcat 5.0\webapps\webdav
2009-11-6 21:39:17 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2009-11-6 21:39:17 org.apache.jk.common.ChannelSocket init
信息: JK2: ajp13 listening on /0.0.0.0:8009
2009-11-6 21:39:17 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/63  c /> 2009-11-6 21:39:17 org.apache.catalina.startup.Catalina start
信息: Server startup in 3657 ms
logs下的详细日志 就是找不到customerService
2009-11-06 21:41:26 StandardContext[/sshtest]Initializing Spring root WebApplicationContext
2009-11-06 21:41:27 StandardContext[/sshtest]Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customerService' defined in ServletContext resource [/WEB-INF/spring/applicationContext-spring.xml]: Instantiation of bean failed; nested exception is java.lang.IllegalStateException: No bean class specified on bean definition
代码文件
applicationContext-spring.xml



<>
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">





 






applicationContext-hibernate.xml


<>
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<>
class="org.apache.commons.dbcp.BasicDataSource">
<>
value="oracle.jdbc.driver.OracleDriver">

<>
value="jdbc:oracle:thin:@localhost:1521:hp">




<>
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">






org.hibernate.dialect.Oracle9Dialect





com/test/hibernate/entity/Customer.hbm.xml








CustomerDAOImpl

public class CustomerDAOImpl extends HibernateDaoSupport implements CustomerDAO {
public void delete(Integer id) {
// TODO Auto-generated method stub
this.getHibernateTemplate().delete(this.getCustomerById(id));
}
public void save(Customer cus) {
// TODO Auto-generated method stub
this.getHibernateTemplate().save(cus);
}
public void update(Integer id) {
// TODO Auto-generated method stub
this.getHibernateTemplate().update(this.getCustomerById(id));
}
public Customer getCustomerById(Integer id) {
// TODO Auto-generated method stub
return (Customer) this.getHibernateTemplate().get(Customer.class, id);
}
public Customer getCustomerByLoginId(String loginId) {
// TODO Auto-generated method stub
String hql="from Customer c where c.loginId = ?";
List  list=this.getHibernateTemplate().find(hql);
Customer cus = list.get(0);
return cus;
}
}

CustomerServiceImpl

public class CustomerServiceImpl implements CustomerService {
private CustomerDAO dao;
public void addUser(Customer user) {
// TODO Auto-generated method stub
dao.save(user);
}
public boolean checkLogin(String loginId, String pass) {
// TODO Auto-generated method stub
Customer cus=dao.getCustomerByLoginId(loginId);
if(cus!=null && cus.getPassword().equals(pass))
return true;
return false;
}
public Customer getCustomer(Integer id) {
// TODO Auto-generated method stub
return dao.getCustomerById(id);
}
public void setCustomerDao(CustomerDAO dao) {
// TODO Auto-generated method stub
this.dao=dao;
}
}

解决方案1:

logs下的详细日志 就是找不到customerService


        
    

customerService只有ID  怎么没有class呢?
以上介绍了“ Tomcat启动报错,Error listenerStart Context startup failed due to previous errors”的问题解答,希望对有需要的网友有所帮助。
本文网址链接:http://www.codes51.com/itwd/2246396.html

相关图片

相关文章