1 Reply Latest reply on Oct 10, 2007 10:59 AM by nicos109

    couldn't deserialize object

    nicos109

      Hello,

      I've tried a very basic example of serializable variable in jbpm and it throws :
      Error getting variable map: An exception of type "org.jbpm.JbpmException" was thrown. The message is: couldn't deserialize object

      This action is triggered on "task-start" event

      package com.action.creation;
      
      import java.util.Vector;
      
      import org.jbpm.graph.def.ActionHandler;
      import org.jbpm.graph.exe.ExecutionContext;
      
      public class BasicAction implements ActionHandler {
      
       private static final long serialVersionUID = 9087034555867614310L;
      
       public void execute(ExecutionContext executionContext) throws Exception {
       Vector myVector = new Vector();
       myVector.add("elem1");
       myVector.add("elem2");
       executionContext.getContextInstance().createVariable("myVector",myVector);
       }
      }
      


      Then I try to use the variable in the xhtml file for this task :
      <c:forEach var="elem" items="#{var['myVector']}" >
       <h:outputText value="$elem"/>
      </c:forEach>
      


      When I try to get the variable from the action class, it works. So the exception is thrown by the forEach tag.

      Any ideas ?

      Thanks,
      Nicolas.

        • 1. Re: couldn't deserialize object
          nicos109

          Sorry, this example worked.
          But as soon as the class of the variable is my own, it throws the exception, although the class implements Serializable ans has a generated serial serialVersionUID.