[jbpm-issues] [JBoss JIRA] Commented: (JBPM-2619) couldn't deserialize object
R An (JIRA)
jira-events at lists.jboss.org
Tue Jan 19 23:35:47 EST 2010
[ https://jira.jboss.org/jira/browse/JBPM-2619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12507104#action_12507104 ]
R An commented on JBPM-2619:
----------------------------
Please ignore the text above - its not a bug.
The problem above was owing to a tomcat instance downloaded from Apache, not the the one bundled with jbpm 4.3 distribution - the exception was caused by my custom class beng part of my web application WEB-INF/lib - and a jar in the global classpath attempting to deserialize it - j2ee classloader hierarchy does not allow that. Workaround was to copy the custom class to global classpath.
> couldn't deserialize object
> ---------------------------
>
> Key: JBPM-2619
> URL: https://jira.jboss.org/jira/browse/JBPM-2619
> Project: jBPM
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Runtime Engine
> Affects Versions: jBPM 4.1
> Environment: java 1.6
> Database : db2
> Reporter: Robin Thomas
>
> I have set a bean object as process instance variable. Say Employee which has getter and setter methods for all the fields.
> Map<String,Object> variables =new HashMap<String,Object>();
> variables.put("employee",new Employee("dfdf","dfsd","","sdfsd"));
> ProcessInstance processInstance = executionService.startProcessInstanceByKey(processDefKey, variables);
> while retriving using the below code :
> TaskService taskService = processEngine.getTaskService();
> Set<String> a=taskService.getVariableNames("107");
> taskService.getVariables("107",a );
> gets the following error:
> Exception in thread "main" org.jbpm.api.JbpmException: couldn't deserialize object
> at org.jbpm.pvm.internal.type.converter.SerializableToBytesConverter.revert(SerializableToBytesConverter.java:65)
> at org.jbpm.pvm.internal.type.Variable.getValue(Variable.java:104)
> at org.jbpm.pvm.internal.model.ScopeInstanceImpl.getVariable(ScopeInstanceImpl.java:183)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:197)
> at org.jbpm.pvm.internal.model.ExecutionImpl_$$_javassist_4.getVariable(ExecutionImpl_$$_javassist_4.java)
> at org.jbpm.pvm.internal.model.ScopeInstanceImpl.getVariable(ScopeInstanceImpl.java:188)
> at org.jbpm.pvm.internal.cmd.GetTaskVariablesCmd.execute(GetTaskVariablesCmd.java:53)
> at org.jbpm.pvm.internal.cmd.GetTaskVariablesCmd.execute(GetTaskVariablesCmd.java:35)
> at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
> at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)
> at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:46)
> at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
> at org.jbpm.pvm.internal.svc.TaskServiceImpl.getVariables(TaskServiceImpl.java:194)
> at com.test.AppClient.main(AppClient.java:89)
> Caused by: java.lang.ClassNotFoundException: com.mbrdi.travelservice.client.TestBO
> at java.net.URLClassLoader$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Unknown Source)
> at java.io.ObjectInputStream.resolveClass(Unknown Source)
> at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
> at java.io.ObjectInputStream.readClassDesc(Unknown Source)
> at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
> at java.io.ObjectInputStream.readObject0(Unknown Source)
> at java.io.ObjectInputStream.readObject(Unknown Source)
> at org.jbpm.pvm.internal.type.converter.SerializableToBytesConverter.revert(SerializableToBytesConverter.java:63)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbpm-issues
mailing list