-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: java.lang.ClassCastException: java.lang.Boolean in Hibernate
PostPosted: Thu Nov 30, 2006 12:01 pm 
Newbie

Joined: Mon Nov 27, 2006 4:10 am
Posts: 4
Hi

I am getting this error while commiting transaction. My hibernate version is 3.0.5.

I can't move to any next version bcoz of issue of backward compatiablity.

Any help/suggestion would be highly appriciated. If it is bug & there is no fix in this version, only then i can move to next version but that has a big cost to me.

**********************************************
Stack Trace:
**********************************************





java.lang.ClassCastException: java.lang.Boolean
at org.hibernate.type.ArrayType.getElementsIterator(ArrayType.java:48)
at org.hibernate.type.CollectionType.getElementsIterator(CollectionType.java:189)
at org.hibernate.engine.Cascades.getLoadedElementsIterator(Cascades.java:961)
at org.hibernate.engine.Cascades$5.getCascadableChildrenIterator(Cascades.java:158)
at org.hibernate.engine.Cascades.cascadeCollection(Cascades.java:893)
at org.hibernate.engine.Cascades.cascadeAssociation(Cascades.java:792)
at org.hibernate.engine.Cascades.cascade(Cascades.java:720)
at org.hibernate.engine.Cascades.cascade(Cascades.java:847)
at org.hibernate.event.def.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:121)
at org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:112)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:5
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:730)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:324)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:86)
at DFacesContext.commitTransaction(DFacesContext.java:125)
at DataModel.getLinks(DataModel.java:1931)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:400)
at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:71)
at org.apache.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(ELParserHelper.java:532)
at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:380)
at javax.faces.component.UIData.getValue(UIData.java:779)
at org.apache.myfaces.custom.crosstable.UIColumns.createDataModel(UIColumns.java:284)
at org.apache.myfaces.custom.crosstable.UIColumns.getDataModel(UIColumns.java:267)
at org.apache.myfaces.custom.crosstable.UIColumns.getRowCount(UIColumns.java:79)
at org.apache.myfaces.renderkit.html.ext.HtmlTableRenderer.determineChildColSpan(HtmlTableRenderer.java:362)
at org.apache.myfaces.renderkit.html.HtmlTableRendererBase.renderFacet(HtmlTableRendererBase.java:316)
at org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeBegin(HtmlTableRendererBase.java:76)
at org.apache.myfaces.renderkit.html.ext.HtmlTableRenderer.encodeBegin(HtmlTableRenderer.java:38)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:307)
at javax.faces.component.UIData.encodeBegin(UIData.java:360)
at org.apache.myfaces.component.html.ext.HtmlDataTableHack.encodeBegin(HtmlDataTableHack.java:126)
at org.apache.myfaces.component.html.ext.HtmlDataTable.encodeBegin(HtmlDataTable.java:310)
at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:441)
at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:203)
at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:85)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:450)
at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:203)
at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:85)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:450)
at org.apache.myfaces.renderkit.RendererUtils.renderChildren(RendererUtils.java:427)
at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:448)
at org.apache.myfaces.renderkit.RendererUtils.renderChildren(RendererUtils.java:427)
at org.apache.myfaces.renderkit.html.HtmlGroupRendererBase.encodeEnd(HtmlGroupRendererBase.java:62)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:349)
at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:253)
at org.apache.myfaces.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTagBase.java:55)
at org.apache.jsp.datatable.datatable_005fprojectpage_jsp._jspService(datatable_005fprojectpage_jsp.java:566)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:95)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at UserAuthorizationFilter.doFilter(UserAuthorizationFilter.java:33)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:595)




Regards

Ganesh


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 02, 2006 4:42 am 
Newbie

Joined: Mon Nov 27, 2006 4:10 am
Posts: 4
Hello Everybody

If someone needs some more details then i can send the same.
Please help !!!!

Regards

Ganesh Bansal


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 02, 2006 7:22 am 
Newbie

Joined: Mon Jan 05, 2004 11:04 am
Posts: 16
Hi,

you need to post

- mapping file
- hibernate code
- sql-output (show_sql=true)

_________________
_________________
Siegbert

Please don't forget to give credit if/when you get helpful information.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 05, 2006 3:57 am 
Newbie

Joined: Mon Nov 27, 2006 4:10 am
Posts: 4
Hi

I have more than 250 hbm.xml. and this case is not reproducable (we don't have steps to re-produce this). At any point of time, this exception comes but don't re-produce each time. Also our hibernate code is very distributed so it's not possible to mail all the code.

Regards

Ganesh Bansal


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 05, 2006 4:56 am 
Expert
Expert

Joined: Tue Nov 23, 2004 7:00 pm
Posts: 570
Location: mostly Frankfurt Germany
It is very rare that you use 250 hbm at the same time in the moment where the problem happens.

Read the stacktrace and find out which mapping and which source code is called. e.g. DataModel.getLinks(DataModel.java:1931)

Create a simple test case to reproduce the problem.

_________________
Best Regards
Sebastian
---
Training for Hibernate and Java Persistence
Tutorials for Hibernate, Spring, EJB, JSF...
eBook: Hibernate 3 - DeveloperGuide
Paper book: Hibernate 3 - Das Praxisbuch
http://www.laliluna.de


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.