[jboss-dev-forums] [Design of JBoss jBPM] - Get a list of taskinstances using jpdl- error-local class i

AnuradhaS do-not-reply at jboss.com
Tue Aug 14 04:02:12 EDT 2007


I have written a code to get a list of taskinstances for a particular user using jpdl.

But i am getting an exception in it

Exception : java.lang.reflect.UndeclaredThrowableException
Cause : java.io.InvalidClassException: org.hibernate.collection.AbstractPersistentCollection; local class incompatible: stream classdesc serialVersionUID = 7602608801868099635, local class serialVersionUID = -5723701046347946317
StackTrace : [Ljava.lang.StackTraceElement;@18ee9d6


The code is-

package com.sample.action;

import javax.rmi.*; 
import javax.naming.*;
import org.jbpm.ejb.*;
import org.jbpm.command.*;
import org.jbpm.taskmgmt.exe.TaskInstance;
import java.util.List;

public class Test1 
{
	 public static void main (String[] args) 
     {
            String[] actors = {"Anuradhaps"};
	        try
            {
	        	Context c = new InitialContext();
	        	Object o = c.lookup ("ejb/CommandServiceBean");
	        	RemoteCommandServiceHome home =(RemoteCommandServiceHome)PortableRemoteObject.narrow (o,RemoteCommandServiceHome.class);
	        	RemoteCommandService RemoteCommandService = home.create();
	        	GetTaskListCommand command = new GetTaskListCommand(actors);
	        	List result = (List) RemoteCommandService.execute(command);
	        	if ( result.isEmpty())
	        	{
	        		System.out.println("List empty");
	        	}
	        	else
	        	{
	        		TaskInstance TaskInstance=null;
	        		while(result.iterator().hasNext())
	        		{
            			TaskInstance =(TaskInstance)result.iterator().next();
            			System.out.println("name of task : " + TaskInstance.getName());
	        		}
	        	}
            }
	        catch(Exception e)
            {
               	System.out.println("Exception : " +e.toString());
               	System.out.println("Cause : " +e.getCause());
               	System.out.println("StackTrace : " +e.getStackTrace());
                System.out.println("Message : " +e.getMessage());
            }
     }
}

Please help me solve this issue.

Regards,
Anuradha


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073858#4073858

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073858



More information about the jboss-dev-forums mailing list