zoukankan      html  css  js  c++  java
  • HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTup

    Caused by: org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
        at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:108)
        at org.hibernate.tuple.entity.EntityTuplizerFactory.constructDefaultTuplizer(EntityTuplizerFactory.java:133)
        at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:80)
        at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:322)
        at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:473)
        at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:133)
        at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:84)
        at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:284)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1840)
        at util.HibernateSessionFactory.<clinit>(HibernateSessionFactory.java:15)
        ... 1 more
    Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
        at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:105)
        ... 10 more
    Caused by: org.hibernate.PropertyNotFoundException: Could not find a getter for wineClass in class model.WineClass
        at org.hibernate.property.BasicPropertyAccessor.createGetter(BasicPropertyAccessor.java:326)
        at org.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:320)
        at org.hibernate.mapping.Property.getGetter(Property.java:304)
        at org.hibernate.tuple.entity.PojoEntityTuplizer.buildPropertyGetter(PojoEntityTuplizer.java:297)
        at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:155)
        at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:77)

        ... 15 more

    第一种情况:查阅资料说是缺少javassist.jar,而我的这个包是绝对没错的,重新加载了一还是不行。

    第二种情况:查看映射文件,突然发现Could not find a getter for wineClass in class model.WineClass所以明白了,属性没有对应,说明映射文件和模型类中的属性对应有错,于是解决。


  • 相关阅读:
    屏蔽指定IP访问网站
    如何辨别一个网站是否是基于织梦搭建
    PC端访问移动站跳转PC站
    点击/swt/直接跳转商务通(1)
    页面加入视频
    dedecms教程:搜索页显示条数更改
    青蛙走迷宫问题(体力值)
    计算n的阶乘(n!)末尾0的个数
    Leetcode27--->Remove Element(移除数组中给定元素)
    Leetcode26--->Remove Duplicates from Sorted Array(从排序数组中移除相同的元素)
  • 原文地址:https://www.cnblogs.com/molashaonian/p/7242065.html
Copyright © 2011-2022 走看看