2014年5月14日星期三

hibernate automatically create table failed

configuration file : class = "org.apache.commons.dbcp.BasicDataSource"
destroy-method = "close">

value = "jdbc: mysql :/ / localhost: 3306/forum characterEncoding = UTF-8?" />




class = "org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"
destroy-method = "destroy">



com.helloweenvsfei.forum.bean.Category
com.helloweenvsfei.forum.bean.Board
com.helloweenvsfei.forum.bean.Thread
com.helloweenvsfei.forum.bean.Person
com.helloweenvsfei.forum.bean.Reply





org.hibernate.dialect.MySQLDialect

true
true
update



error message:
[org.springframework.web.context.ContextLoader] - [ERROR] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/ WEB-INF/classes/applicationContext.xml ]: Invocation of init method failed; nested exception is net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException--> null
possible problems in where?
------ Solution ---------------------------------------- ----
reflecting a proxy object is null . java.lang.reflect.InvocationTargetException--> null
------ Solution ---------------------------- ----------------
this file is not automatically generated bar
------ For reference only ------------ ---------------------------

still do not understand
------ For reference only ---------------------------------------
problem has been resolved. Since the spring of cglib package is automatically imported 1.2 myeclipse conflict , importing 2.0 just fine thank you upstairs

没有评论:

发表评论