hibernate-4.1.7+struts2问题(求解)
使用了最新的struts和hibernate,前台页面页面报错,错误信息为
type Exception report
message
description
The server encountered an internal error () that prevented it from fulfilling this request.exception
java.lang.reflect.InvocationTargetException sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:601)
………………………………………………………………………………………………
root cause
java.lang.NoSuchMethodError: org.hibernate.SessionFactory.openSession()Lorg/hibernate/classic/Session;
com.lizp.util.HibernateUtil.openSession(HibernateUtil.java:30)
com.lizp.dao.impl.PersonDAOImpl.savePerson(PersonDAOImpl.java:20)
com.lizp.service.impl.PersonServiceImpl.savePerson(PersonServiceImpl.java:15)
com.lizp.action.person.PersonAction.savePerson(PersonAction.java:50)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:601)
myeclipse后台输出为:
十月 03, 2012 10:08:34 下午 org.hibernate.annotations.common.Version <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
十月 03, 2012 10:08:34 下午 org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.1.7.Final}
十月 03, 2012 10:08:34 下午 org.hibernate.cfg.Environment <clinit>
INFO: HHH000206:
hibernate.properties not found十月 03, 2012 10:08:34 下午 org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
十月 03, 2012 10:08:34 下午 org.hibernate.cfg.Configuration configure
INFO: HHH000043: Configuring from resource: /hibernate.cfg.xml
十月 03, 2012 10:08:34 下午 org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: HHH000040: Configuration resource: /hibernate.cfg.xml
十月 03, 2012 10:08:34 下午 org.hibernate.cfg.Configuration addResource
INFO: HHH000221: Reading mappings from resource: Person.hbm.xml
十月 03, 2012 10:08:34 下午 org.hibernate.cfg.Configuration doConfigure
INFO: HHH000041: Configured SessionFactory: null
十月 03, 2012 10:08:35 下午 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000402: Using Hibernate built-in connection pool (not for production use!)
十月 03, 2012 10:08:35 下午 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000115: Hibernate connection pool size: 20
十月 03, 2012 10:08:35 下午 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000006: Autocommit mode: false
十月 03, 2012 10:08:35 下午 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000401: using driver [com.mysql.jdbc.Driver] at URL [jdbc:mysql://localhost:3306/hibernate]
十月 03, 2012 10:08:35 下午 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000046: Connection properties: {user=root, password=****}
十月 03, 2012 10:08:35 下午 org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using di