Org.hibernate.HibernateException:Unable to instantiate default Tuplizer [ Org.hibernate.tuple.entity.PojoEntityTuplizer]

Source: Internet
Author: User
Tags log4j

The following exception occurred while inserting the list data using hibernate:

1Slf4j:the requested version 1.6 by your SLF4J binding are not compatible with [1.5.5, 1.5.6, 1.5.7, 1.5.8]2Slf4j:see http://Www.slf4j.org/codes.html#version_mismatch for further details.3Log4j:warn No appenders could be found forLogger (org.hibernate.cfg.Environment).4 Log4j:warn Initialize the log4j system properly.5Log4j:warn See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.6Org.hibernate.HibernateException:Unable to instantiatedefaultTuplizer [Org.hibernate.tuple.entity.PojoEntityTuplizer]7At Org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer (entitytuplizerfactory.java:110)8At Org.hibernate.tuple.entity.EntityTuplizerFactory.constructDefaultTuplizer (entitytuplizerfactory.java:135)9At Org.hibernate.tuple.entity.entityentitymodetotuplizermapping.<init> ( Entityentitymodetotuplizermapping.java:80)TenAt Org.hibernate.tuple.entity.entitymetamodel.<init> (entitymetamodel.java:323) One  AAt Org.hibernate.persister.entity.abstractentitypersister.<init> (abstractentitypersister.java:456) -At Org.hibernate.persister.entity.singletableentitypersister.<init> (singletableentitypersister.java:131) -At Org.hibernate.persister.PersisterFactory.createClassPersister (persisterfactory.java:84) theAt Org.hibernate.impl.sessionfactoryimpl.<init> (sessionfactoryimpl.java:267) -At Org.hibernate.cfg.Configuration.buildSessionFactory (configuration.java:1341) -At Com.bdqn.entity.test.Test.setPics (test.java:315) -At Com.bdqn.entity.test.Test.setPhones (test.java:341) +At Com.bdqn.entity.test.Test.main (test.java:67) - caused By:java.lang.reflect.InvocationTargetException + At Sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method) A At sun.reflect.NativeConstructorAccessorImpl.newInstance (Unknown Source) at At sun.reflect.DelegatingConstructorAccessorImpl.newInstance (Unknown Source) - At java.lang.reflect.Constructor.newInstance (Unknown Source) -At Org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer (entitytuplizerfactory.java:107) -... 11 More -caused By:org.hibernate.PropertyNotFoundException:Could not find a getter forPhones inclassCom.bdqn.entity.User -At Org.hibernate.property.BasicPropertyAccessor.createGetter (basicpropertyaccessor.java:306) inAt Org.hibernate.property.BasicPropertyAccessor.getGetter (basicpropertyaccessor.java:299) -At Org.hibernate.mapping.Property.getGetter (property.java:294) toAt Org.hibernate.tuple.entity.PojoEntityTuplizer.buildPropertyGetter (pojoentitytuplizer.java:300) +At Org.hibernate.tuple.entity.abstractentitytuplizer.<init> (abstractentitytuplizer.java:141) -At Org.hibernate.tuple.entity.pojoentitytuplizer.<init> (pojoentitytuplizer.java:78) the... More

Based on the hint in the exception information: Could not find a getter for phones in class Com.bdqn.entity.User

Cause: Discovery is due to an issue with the Get and set method name method names of the property methods used in the entity class! The property is phones, and the method is Setphone (), Getphone (), and the word after get and set is inconsistent with the property

Workaround: Delete the original set and get method and regenerate it!

Org.hibernate.HibernateException:Unable to instantiate default Tuplizer [ Org.hibernate.tuple.entity.PojoEntityTuplizer]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.