[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-6874) java.lang.ClassCastException in JavassistLazyInitializer.getProxy
Vladimir Tsichevski (JIRA)
noreply at atlassian.com
Fri Dec 2 09:55:22 EST 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44499#comment-44499 ]
Vladimir Tsichevski commented on HHH-6874:
------------------------------------------
Same problem for 4.0.0.CR7
> java.lang.ClassCastException in JavassistLazyInitializer.getProxy
> -----------------------------------------------------------------
>
> Key: HHH-6874
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6874
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Affects Versions: 3.6.8
> Environment: Ubuntu Linux 11.04 x64, JDK 1.6
> Reporter: Vladimir Tsichevski
>
> The following Exception occurs:
> Caused by: java.lang.ClassCastException: ClassX_$$_javassist_129 cannot be cast to javassist.util.proxy.ProxyObject
> at the following line
> ( ( ProxyObject ) proxy ).setHandler( instance );
> where ClassX is a persistent entity with @ManyToOne references of type FetchType.LAZY. The error was not occurred until the FetchType.LAZY modifier was added.
> The full stack trace:
> Thread [main] (Suspended (exception ClassCastException))
> JavassistLazyInitializer.getProxy(Class, String, Class, Class[], Method, Method, CompositeType, Serializable, SessionImplementor) line: 147
> JavassistProxyFactory.getProxy(Serializable, SessionImplementor) line: 71
> PojoEntityTuplizer(AbstractEntityTuplizer).createProxy(Serializable, SessionImplementor) line: 631
> SingleTableEntityPersister(AbstractEntityPersister).createProxy(Serializable, SessionImplementor) line: 3736
> DefaultLoadEventListener.createProxyIfNecessary(LoadEvent, EntityPersister, EntityKey, LoadEventListener$LoadType, PersistenceContext) line: 360
> DefaultLoadEventListener.proxyOrLoad(LoadEvent, EntityPersister, EntityKey, LoadEventListener$LoadType) line: 281
> DefaultLoadEventListener.onLoad(LoadEvent, LoadEventListener$LoadType) line: 152
> SessionImpl.fireLoad(LoadEvent, LoadEventListener$LoadType) line: 1090
> SessionImpl.internalLoad(String, Serializable, boolean, boolean) line: 1038
> ManyToOneType(EntityType).resolveIdentifier(Serializable, SessionImplementor) line: 630
> ManyToOneType(EntityType).resolve(Object, SessionImplementor, Object) line: 438
> TwoPhaseLoad.initializeEntity(Object, boolean, SessionImplementor, PreLoadEvent, PostLoadEvent) line: 139
> QueryLoader(Loader).initializeEntitiesAndCollections(List, Object, SessionImplementor, boolean) line: 982
> QueryLoader(Loader).doQuery(SessionImplementor, QueryParameters, boolean) line: 857
> QueryLoader(Loader).doQueryAndInitializeNonLazyCollections(SessionImplementor, QueryParameters, boolean) line: 274
> QueryLoader(Loader).doList(SessionImplementor, QueryParameters) line: 2542
> QueryLoader(Loader).listIgnoreQueryCache(SessionImplementor, QueryParameters) line: 2276
> QueryLoader(Loader).list(SessionImplementor, QueryParameters, Set, Type[]) line: 2271
> QueryLoader.list(SessionImplementor, QueryParameters) line: 459
> QueryTranslatorImpl.list(SessionImplementor, QueryParameters) line: 365
> HQLQueryPlan.performList(QueryParameters, SessionImplementor) line: 196
> SessionImpl.list(String, QueryParameters) line: 1268
> QueryImpl.list() line: 102
> QueryImpl<X>.getResultList() line: 246
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list