2 Replies Latest reply on Jan 2, 2007 7:52 PM by smichea

    java.lang.ClassCastException: org.jbpm.graph.def.Node

    Pravin kamble Newbie

      I am using JBPM3.1, this code is working with JBPM3.1.2 here is the code.
      *****
      JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance("jbpm.cfg.xml");
      JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
      ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource("forex.xml");
      jbpmContext.deployProcessDefinition(processDefinition);
      jbpmContext.close();

      **********************************************************
      Hibernate: select * from ( select processdef0_.ID_ as ID1_125_, processdef0_.NAME_ as NAME2_125_, processdef0_.VERSION_ as VERSION3_125_, processdef0_.ISTERMINATIONIMPLICIT_ as ISTERMIN4_125_, processdef0_.STARTSTATE_ as STARTSTATE5_125_ from JBPM_PROCESSDEFINITION processdef0_ where processdef0_.NAME_=? order by processdef0_.VERSION_ desc ) where rownum <= ?
      14:32:01,552 INFO [STDOUT] java.lang.ClassCastException: org.jbpm.graph.def.Node$$EnhancerByCGLIB$$7b739752_2
      14:32:01,552 INFO [STDOUT] at org.hibernate.proxy.CGLIBLazyInitializer.getProxy(CGLIBLazyInitializer.java:82)
      14:32:01,552 INFO [STDOUT] at org.hibernate.proxy.CGLIBProxyFactory.getProxy(CGLIBProxyFactory.java:47)
      14:32:01,552 INFO [STDOUT] at org.hibernate.tuple.AbstractEntityTuplizer.createProxy(AbstractEntityTuplizer.java:372)
      14:32:01,552 INFO [STDOUT] at org.hibernate.persister.entity.AbstractEntityPersister.createProxy(AbstractEntityPersister.java:3120)
      14:32:01,552 INFO [STDOUT] at org.hibernate.event.def.DefaultLoadEventListener.createProxyIfNecessary(DefaultLoadEventListener.java:232)
      14:32:01,552 INFO [STDOUT] at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:173)
      14:32:01,552 INFO [STDOUT] at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
      14:32:01,552 INFO [STDOUT] at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:809)
      14:32:01,552 INFO [STDOUT] at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:781)
      14:32:01,552 INFO [STDOUT] at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266)
      14:32:01,552 INFO [STDOUT] at org.hibernate.type.EntityType.resolve(EntityType.java:303)
      14:32:01,552 INFO [STDOUT] at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:113)
      14:32:01,552 INFO [STDOUT] at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
      14:32:01,552 INFO [STDOUT] at org.hibernate.loader.Loader.doQuery(Loader.java:717)
      14:32:01,552 INFO [STDOUT] at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:223)
      14:32:01,552 INFO [STDOUT] at org.hibernate.loader.Loader.doList(Loader.java:2147)
      14:32:01,552 INFO [STDOUT] at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2026)
      14:32:01,552 INFO [STDOUT] at org.hibernate.loader.Loader.list(Loader.java:2021)
      14:32:01,552 INFO [STDOUT] at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369)
      14:32:01,552 INFO [STDOUT] at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:298)
      14:32:01,552 INFO [STDOUT] at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1020)
      14:32:01,552 INFO [STDOUT] at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
      14:32:01,552 INFO [STDOUT] at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:650)
      14:32:01,552 INFO [STDOUT] at org.jbpm.db.GraphSession.findLatestProcessDefinition(GraphSession.java:153)
      14:32:01,552 INFO [STDOUT] at org.jbpm.db.GraphSession.deployProcessDefinition(GraphSession.java:67)
      14:32:01,552 INFO [STDOUT] at org.jbpm.JbpmContext.deployProcessDefinition(JbpmContext.java:173)
      14:32:01,552 INFO [STDOUT] at com.ustrust.service.processdefinitionloader.LoadProcessDefinition.contextInitialized(LoadProcessDefinition.java:28)
      14:32:01,552 INFO [STDOUT] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3669)
      14:32:01,552 INFO [STDOUT] at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104)
      14:32:01,552 INFO [STDOUT] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
      14:32:01,552 INFO [STDOUT] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
      14:32:01,552 INFO [STDOUT] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
      14:32:01,552 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      14:32:01,552 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      14:32:01,552 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      14:32:01,552 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
      14:32:01,552 INFO [STDOUT] at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
      14:32:01,552 INFO [STDOUT] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
      14:32:01,552 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      14:32:01,552 INFO [STDOUT] at org.apache.catalina.core.StandardContext.init(StandardContext.java:5005)
      14:32:01,552 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      14:32:01,552 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      14:32:01,552 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      14:32:01,552 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)