struts2+spring+hibernate的问题
[标签:struts2,spring,hibernate]高手些帮我看看因为关联了另外一个表现在插入的时候就出问题了[com.opensymphony.xwork2.ut...
[ 标签:struts2,spring,hibernate ] 高手些帮我看看因为关联了另外一个表现在插入的时候就出问题了[com.opensymphony.xwork2.util.logging.commons.CommonsLogger.warn(CommonsLogger.java:49)] WARN Error setting expression 'TEmployee' with value '[Ljava.lang.String;@18a80d4'
ognl.MethodFailedException: Method "setTEmployee" failed for object controler.SalaryAction.AddSalary@99d56b [java.lang.NoSuchMethodException: controler.SalaryAction.AddSalary.setTEmployee([Ljava.lang.String;)]
at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1265)
at ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java:1454)
at ognl.ObjectPropertyAccessor.setPossibleProperty 这个问题怎么解决的?? 展开
ognl.MethodFailedException: Method "setTEmployee" failed for object controler.SalaryAction.AddSalary@99d56b [java.lang.NoSuchMethodException: controler.SalaryAction.AddSalary.setTEmployee([Ljava.lang.String;)]
at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1265)
at ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java:1454)
at ognl.ObjectPropertyAccessor.setPossibleProperty 这个问题怎么解决的?? 展开
1个回答
2013-07-07
展开全部
<bean> <propertyname="hibernateProperties"> <props> <propkey="hibernate.dialect">
org.hibernate.dialect.HSQLDialect </prop> <propkey="hibernate.show_sql">true</prop> <propkey="hbm2ddl.auto">update</prop> <!--如果开启,Hibernate将收集有助于性能调节的统计数据.取值true|false--> <propkey="hibernate.generate_statistics">true</prop> <!--指定Hibernate在何时释放JDBC连接.--> <propkey="hibernate.connection.release_mode">
auto </prop> </props> </property> </bean>这个bean有问题,hibernateProperties是要放在sessionFactory这个bean内部的,而不是想你这样另外建出一个没有名字的bean
org.hibernate.dialect.HSQLDialect </prop> <propkey="hibernate.show_sql">true</prop> <propkey="hbm2ddl.auto">update</prop> <!--如果开启,Hibernate将收集有助于性能调节的统计数据.取值true|false--> <propkey="hibernate.generate_statistics">true</prop> <!--指定Hibernate在何时释放JDBC连接.--> <propkey="hibernate.connection.release_mode">
auto </prop> </props> </property> </bean>这个bean有问题,hibernateProperties是要放在sessionFactory这个bean内部的,而不是想你这样另外建出一个没有名字的bean
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询