1 Reply Latest reply on Jan 26, 2012 6:15 AM by salaboy21

    Serializable hates me!

    nt2005

      Hey Guys,

       

      That is my line of codes I´m using, to start a process in an environment:

      EntityManagerFactory emf = entityManager.getEntityManagerFactory();
              TransactionManagerService tms = new TransactionManagerService();
      
      
              Environment env = KnowledgeBaseFactory.newEnvironment();
              env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
              env.set(EnvironmentName.TRANSACTION_MANAGER, tms.getTransactionManager());
      
              // load up the knowledge base
              KnowledgeBase kbase = readKnowledgeBase(processid);
      
              StatefulKnowledgeSession ksession = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, null, env);
      
                //workitems
                // hidden
      
                process = ksession.startProcess("de.toni.myprocess", params);
      

       

      The problem is, that all classes must implement java.io.Serializable.

       

      I got this problem at my own classes <- I can fix (implement Serializable)

      I got this problem at Buffered BufferedImage <- I can "fix", I use int[] instead

      I got this problem at  org.drools.persistence.jpa.processinstance.JPAWorkItemManager <- What The Hell??? I CANT FIX!

       

      I don´t use this class so jbpm use it... I´m a little bit angry about that, maybe someone can help me, please.

       

      ERROR [org.drools.persistence.SingleSessionCommandService] Could not commit session: java.lang.IllegalArgumentException: IOException while storing workItem 39: org.drools.persistence.jpa.processinstance.JPAWorkItemManager
          at org.drools.persistence.info.WorkItemInfo.update(WorkItemInfo.java:129) [:5.3.1.Final]
          at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.internalExecuteWorkItem(JPAWorkItemManager.java:44) [:5.3.1.Final]
          at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:105) [:5.2.0.Final]
          at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:122) [:5.2.0.Final]
          at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:185) [:5.2.0.Final]
          at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:150) [:5.2.0.Final]
          ...
      
        • 1. Re: Serializable hates me!
          salaboy21

          Your problem is probably related with the information that you are storing int he process.. Can you share with us the process variables that you are using and the dataInput/output that you are using?

          Cheers