Hi,
Can someone please open my eyes and tell me why I'm getting this classcast exception? Also why hibernate is using a sorted set (TreeSet) since my mapping says it's unsorted?
Hibernate version:
2.1.4
Mapping document (fragment):
<set name="participationCriteria" lazy="true" inverse="true" cascade="none" sort="unsorted" batch-size="1" outer-join="auto">
<key>
<column name="f_participation_criteria"/>
</key>
<one-to-many class="eu.dgentr.ida.eproc.common.pojo.ParticipationCriterionVO"/>
</set>
code:
pcVO.getParticipationCriteria().add(pcnVO);
Exception:
13:07:44,031 INFO [STDOUT] java.lang.ClassCastException: eu.dgentr.ida.eproc.common.pojo.ParticipationCriterionVO
13:07:44,031 INFO [STDOUT] at java.util.TreeMap.compare(TreeMap.java:1085)
13:07:44,031 INFO [STDOUT] at java.util.TreeMap.put(TreeMap.java:463)
13:07:44,031 INFO [STDOUT] at java.util.TreeSet.add(TreeSet.java:209)
13:07:44,031 INFO [STDOUT] at eu.dgentr.ida.eproc.call4tenders.presentation.EditParticipationConditionsAction.addParticipationCondition(U
13:07:44,031 INFO [STDOUT] at eu.dgentr.ida.eproc.call4tenders.presentation.EditParticipationConditionsAction.execute(Unknown Source)
13:07:44,031 INFO [STDOUT] at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:462)
13:07:44,031 INFO [STDOUT] at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:267)
13:07:44,031 INFO [STDOUT] at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1187)
13:07:44,031 INFO [STDOUT] at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:451)
13:07:44,031 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
13:07:44,031 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
13:07:44,031 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
13:07:44,031 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
13:07:44,031 INFO [STDOUT] at eu.dgentr.ida.eproc.authorization.presentation.SecurityFilter.doFilter(Unknown Source)
13:07:44,031 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
13:07:44,031 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
13:07:44,031 INFO [STDOUT] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
13:07:44,031 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
13:07:44,046 INFO [STDOUT] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
13:07:44,046 INFO [STDOUT] at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
13:07:44,046 INFO [STDOUT] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
13:07:44,046 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
13:07:44,046 INFO [STDOUT] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:72)
13:07:44,046 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
13:07:44,046 INFO [STDOUT] at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:275)
13:07:44,046 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
13:07:44,046 INFO [STDOUT] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
13:07:44,046 INFO [STDOUT] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
13:07:44,046 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
13:07:44,046 INFO [STDOUT] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
13:07:44,046 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
13:07:44,046 INFO [STDOUT] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
13:07:44,046 INFO [STDOUT] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
13:07:44,046 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
13:07:44,046 INFO [STDOUT] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
13:07:44,046 INFO [STDOUT] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
13:07:44,046 INFO [STDOUT] at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
13:07:44,046 INFO [STDOUT] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
13:07:44,046 INFO [STDOUT] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
13:07:44,046 INFO [STDOUT] at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
13:07:44,046 INFO [STDOUT] at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
13:07:44,046 INFO [STDOUT] at java.lang.Thread.run(Thread.java:534)
|