2 Replies Latest reply on Jun 18, 2007 4:57 AM by Ricardo Marques

    java.lang.ClassCastException: org.hibernate.collection.Persi

    Ricardo Marques Novice

      Hi guys

      I'm having this exception:

      15:22:17,093 ERROR [STDERR] java.lang.ClassCastException: org.hibernate.collection.PersistentList
      15:22:17,093 ERROR [STDERR] at com.pep.workflow.console.beans.Task.fetchComments(Task.java:188)
      15:22:17,093 ERROR [STDERR] at com.pep.workflow.console.beans.Task.initialize(Task.java:238)
      15:22:17,093 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      15:22:17,093 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      15:22:17,500 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      15:22:17,500 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      15:22:17,500 ERROR [STDERR] at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
      15:22:17,500 ERROR [STDERR] at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
      15:22:17,500 ERROR [STDERR] at javax.faces.component.UICommand.broadcast(UICommand.java:106)
      15:22:17,500 ERROR [STDERR] at javax.faces.component.UIData.broadcast(UIData.java:513)
      15:22:17,500 ERROR [STDERR] at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
      15:22:17,500 ERROR [STDERR] at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
      15:22:17,500 ERROR [STDERR] at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
      15:22:17,500 ERROR [STDERR] at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
      15:22:17,500 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
      15:22:17,500 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      15:22:17,500 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      15:22:17,500 ERROR [STDERR] at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
      15:22:17,500 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      15:22:17,500 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      15:22:17,500 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      15:22:17,500 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      15:22:17,500 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      15:22:17,500 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      15:22:17,500 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      15:22:17,500 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
      15:22:17,500 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      15:22:17,500 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      15:22:17,500 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      15:22:17,500 ERROR [STDERR] at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      15:22:17,500 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      15:22:17,500 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      15:22:17,500 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      15:22:17,500 ERROR [STDERR] at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      15:22:17,500 ERROR [STDERR] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      15:22:17,500 ERROR [STDERR] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      15:22:17,500 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
      15:22:17,500 ERROR [Task] Error initializing task page: java.lang.ClassCastException: org.hibernate.collection.PersistentList
      


      while executing this code using the command interface:

      public Object execute(JbpmContext jbpmContext) throws Exception {
      
       TaskInstance taskInstance = jbpmContext.getTaskInstance(this.taskInstanceId);
      
       List comments = taskInstance.getComments();
      
       return comments;
       }


      This is a very simple code, and by the output i supose that the problem comes from hibernate, that i don't have knowledge of it.

      Any ideia that it could be?

      Thanks