SSH报错记录

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: warning no match for this type name: cn.xiaou.dao.impl [Xlint:invalidAbsoluteTypeName]

Spring切点配置问题

<aop:pointcut expression="execution(* cn.xiaou.dao.impl.*.*(..))" id="txPc"/>

 Error creating bean with name 'cd' defined in class path resource [applicationContext.xml]:

Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required

使用Hibernate模板Spring必须注入SessionFactory

<bean name = "customerDap" class = "cn.xiaou.dao.impl.CustomerDaoImpl">
        <!-- 注入sessionFactory类 -->
        <property name="sessionFactory" ref="sessionFactory"/>
</bean>

StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.

未未找到log4j2配置文件,使用默认的配置文件


Exception occurred during processing request: null
java.lang.NullPointerException
    at cn.xiaou.web.CustomerAction.list(CustomerAction.java:26)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

忘记注入配置CustomerAction在Spring未注入配置


 

 Exception occurred during processing request:

Unable to instantiate Action, customerAction,  defined for 'customer_list' in namespace '/'Error creating bean with name 'customerAction' defined in class path resource [applicationContext.xml]:

Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException:
Invalid property 'customerService' of bean class [cn.xiaou.web.CustomerAction]:

Bean property 'customerService'is not writable or has an invalid setter method.
Does the parameter type of the setter match the return type of the getter?

在CustomerAction属性注入出现错误,注入的变量名与注入的name名字不同

private CustomerService cs;
<bean name="customerAction" class="cn.xiaou.web.CustomerAction" scope="prototype">
        <property name="cs" ref = "customerService"/>
</bean>

 

posted @ 2018-07-07 15:42  Masukotto&xiaou  阅读(222)  评论(0编辑  收藏  举报