常见异常续二

异常:严重: 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错误可能是参数定义有问题!
解决办法:修改参数!
 
 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值