Exception in thread "main" org.hibernate.HibernateException: Javassist Enhancement failed: com.jerryboom.cache.vo.UserModelat
org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxy(JavassistLazyInitializer.java:142)at
org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.getProxy(JavassistProxyFactory.java:71)at
org.hibernate.tuple.entity.AbstractEntityTuplizer.createProxy(AbstractEntityTuplizer.java:631)at
org.hibernate.persister.entity.AbstractEntityPersister.createProxy(AbstractEntityPersister.java:3737)at
org.hibernate.event.def.DefaultLoadEventListener.createProxyIfNecessary(DefaultLoadEventListener.java:360)at
org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:281)at
org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:152)at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1090)at
org.hibernate.impl.SessionImpl.load(SessionImpl.java:985)at
org.hibernate.impl.SessionImpl.load(SessionImpl.java:978)at
com.jerryboom.cache.CacheApp.testLazy(CacheApp.java:62)at
com.jerryboom.cache.CacheApp.main(CacheApp.java:72)Caused by:
java.lang.InstantiationException: com.jerryboom.cache.vo.UserModel_$$_javassist_0at
java.lang.Class.newInstance(Unknown Source)at
org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxy(JavassistLazyInitializer.java:139)... 11 moreCaused by: java.lang.NoSuchMethodException: com.jerryboom.cache.vo.UserModel_$$_javassist_0.()at
java.lang.Class.getConstructor0(Unknown Source)... 13 more
对应的实体类中需要添加相应的public修饰的无参构造方法