问什么我的web.xml一加Listener,启动tomcat就出错

来源:百度知道 编辑:UC知道 时间:2024/06/16 22:49:06
我用的是Myeclipse6.0,spring2.0 struts1.2 hibernate 3.1,配置完成后,出错,一开始是在struts-config.xml中加配置applicationContext.xml,报错说找不到,后来我把它加到web.xml中了,可是启动时就说监听初始化错误什么的,去掉Listener启动没事了,可是跳转时报错。
加监听时的错误是
严重: 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 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [javax.sql.DataSource] for property 'dataSource'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type
……
不加时,跳转页面时报的错误是
严重:

你使用的是可能是MyEclipse自带的tomcat,你自己下一个tomcat6.0安装上,配置使用你自己的tomact

配置方法:windows - preferences - MyEclipse Enterprise - servers-tomcat - tomcat6.x 双击

在这个里面有一点要注意,tomcat sercer 选择 Enable

以上是我的回答,如果正确加分,刚才没登录