异常:严重: 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 'client' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Error occurred. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/select'. Cause: java.lang.RuntimeException: Could not find SQL statement to include with refid 'paginationStart'
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1175)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:428)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
解决方法:ibatis里面的名字为paginationStart的sql语句有问题,改下就可以了。
异常:Bean property '***' is not writable or has an invalid setter method:2009-09-16 11:18错误出现提示:
org.springframework.beans.NotWritablePropertyExcep tion:Bean property 'SysUserService' is not writable or has an invalid setter method: Does the parameter type of the setter match the return type of the getter?
错误分析 :
根据org.springframework.beans.NotWritablePropertyExcep tion 初步分析是spring配置文件中配置问题 或配置文件中<bean>某个地方写的不对。
出错地点(红色标注为为导致出错的地方):
<bean id="SysUserService" class="softqilu.admin.service.SysUserService">
<property name="SysUserDao" ref="SysUserDao"></property>
</bean>
而 java类中我写set方法中是这么写的
public class SysUserService {
private SysUserDao sysuserdao;
public void setSysuserdao(SysUserDao sysuserdao) {
this.sysuserdao = sysuserdao;
}
}
set 中的属性sysuserdao 和 property name="SysUserDao" 写的不一致
解决方法:
<bean id="SysUserService" class="softqilu.admin.service.SysUserService">
<property name="sysuserdao" ref="SysUserDao"></property>
</bean>
将<property name="sysuserdao" ref="SysUserDao"></property>修改成和set一致 即可。
页面异常:HTTP Status 404 - No result defined for action com.huateng.test.action.UsersAction and result input
解决方法:在Struts.xml文件中的action方法中加入 <result name="input">/LoginAdd.jsp</result>即可,其中LoginAdd.jsp是指验证的页面。
异常:如果报表出现200错误可能是参数定义有问题!
解决办法:修改参数!