Hibernate Troubleshooting

sponsored links
org.hibernate.PropertyAccessException: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of com.pure.domain.Member.setLogincount
	org.hibernate.tuple.PojoTuplizer.setPropertyValuesWithOptimizer(PojoTuplizer.java:203)

According to error, I found that may be due to the set method is not wrong, checked several times and found nothing wrong, and later the Internet looking for a bit, there are the older generation was also encountered such problems. http://hi.baidu.com/nickshen3/blog/item/0dbbacc2d511701f0ef47727.html
exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer = false for more info) setter of ...
Reason: null query results include figures for some of the items contains null, the definition must be used when the wrapper types, and can not be primitive types, such as the use of Integer and so on, and can not be dished out int otherwise exception!
Solution: map int, double the field, when under construction, some int or double fields default 0, resulting in exception setting property value with CGLIB setter wrong these fields. These fields have default values final. The default value is set up problems can be resolved.
But I found in mapping in peacetime, many people use the wrapper class, so even if there is null value, nor will the problem, but I do not know a good thing to set default values; or direct the use of packaging type, also called upon to Big Brother advice. [size = medium]
org.hibernate.PropertyAccessException: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of com.pure.domain.Member.setLogincount
	org.hibernate.tuple.PojoTuplizer.setPropertyValuesWithOptimizer(PojoTuplizer.java:203)
	org.hibernate.tuple.PojoTuplizer.setPropertyValues(PojoTuplizer.java:173)
	org.hibernate.persister.entity.BasicEntityPersister.setPropertyValues(BasicEntityPersister.java:2919)
	org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:113)
	org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:530)
	org.hibernate.loader.Loader.doQuery(Loader.java:436)
	org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218)
	org.hibernate.loader.Loader.doList(Loader.java:1593)
	org.hibernate.loader.Loader.list(Loader.java:1577)
	org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:395)
	org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:271)
	org.hibernate.impl.SessionImpl.list(SessionImpl.java:844)
	org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
	com.pure.dao.hibernate.MemberHibernateDAO$2.doInHibernate(MemberHibernateDAO.java:60)
	org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:362)
	org.springframework.orm.hibernate3.HibernateTemplate.executeFind(HibernateTemplate.java:332)
	com.pure.dao.hibernate.MemberHibernateDAO.getMemberList(MemberHibernateDAO.java:53)
	com.pure.domain.logic.impl.MemberFacadeImpl.getMemberList(MemberFacadeImpl.java:38)
	com.pure.web.spring.manager.member.MemberListController.memberList(MemberListController.java:66)
	com.pure.web.spring.manager.member.MemberListController.handleRequest(MemberListController.java:31)
	org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:45)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:820)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:755)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:350)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:78)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)

[/ size]
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of Hibernate Troubleshooting

  • Ask! Hibernate project to do when to do what the strategy is necessary to optimize the system performance, that is, how to improve the retrieval performance strategy?

    Ask! Hibernate project to do when to do what the strategy is necessary to optimize the system performance, that is, how to improve the retrieval performance strategy? I had not thought about it, only know about the cache settings, please show Big Bro ...

  • Wait for prompt js General category

    This is a very easy-to-use widget, the parameters have default values, default values, see the Notes wait = new WaitingTip(); wait.show(document.getElementById('id')); //Parameter 1 is displayed, in reference to the object ... wait.hide(); //Hide The use

  • JS after ajax request return of the problem can not be implemented

    1: Send ajax request, in the onComplete, if back when the html contains a javascript, then these javascrip and will not be realized, it does not mean not to implement. This problem has troubled me for a long time, behind the hair and then put this kn ...

  • Rails2.0.2 change the default DB adpter

    In Rails2.0.2 rails demo ... ... MissingSourceFile in SayController # hello no such file to load - sqlite3 RAILS_ROOT: / home / kenb / rails-projects / demo ... ... Checked config / database.yml, adpter default is set become the sqlite3. Check the ra ...

  • [Ask] Rest nested resources helper method

    (Novice, studying RestFul_Rails, rails 2.2.2) Nested resource definition is as follows: And in the project under the index view using the following code: Results page error: iterations_path undefined I would like to ask how are going on? The teaching ...

  • hibernate (jpa) composite primary key annotation statement Ways

    In the design of the database tables are designed with a composite primary key of the table, that table's record by more than one field joint identification, such as: Table CREATE TABLE TB_HOUR_DATA ( STAT_DATE DATE NOT NULL, PATH_ID NUMBER(20) NOT NULL,

  • Some interview questions java

    The first is the company give you a chance to meet, it is necessary to know to meet from time to equal the interview, and have a lot of companies to see you at the first time will give you a ready point of doing something trivial, these questions, althoug

  • JAVA interview questions

    JAVA interview questions 1, object-oriented features of what has 1. Abstract 2. Inheritance 3. Packaging 4. Polymorphisms 2, String data types are the most basic right? Basic data types include byte, int, char, long, float, double, boolean and short. java

  • Struts2 + hibernate + spring problem user log in

    dao layer services layer action jsp <tr> <td align="center"> <b> user name: </ b> </ td> <td> <s: textfield name = "czyNumber" cssClass = "textstyle" theme = "simple" size = &q

blog comments powered by Disqus
Recent
Recent Entries
Tag Cloud
Random Entries