Bug 832436 - Oracle DB & human tasks - skipping tasks causes NPE
Summary: Oracle DB & human tasks - skipping tasks causes NPE
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: jBPM Console
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: CR1
: BRMS 5.3.0.GA
Assignee: Kris Verlaenen
QA Contact:
URL:
Whiteboard:
: 832375 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-15 11:54 UTC by Zuzana Krejčová
Modified: 2023-05-31 22:25 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
exceptions thrown (6.32 KB, text/plain)
2012-06-15 11:54 UTC, Zuzana Krejčová
no flags Details

Description Zuzana Krejčová 2012-06-15 11:54:55 UTC
Created attachment 592112 [details]
exceptions thrown

Description of problem:
Testing with Oracle db (Oracle Database 11g, 11.2.0.2.0), every time I try to skip a task marked as skippable, I get:

ERROR [org.jbpm.task.service.TaskServerHandler] (Thread-27) 
java.lang.NullPointerException
	at java.io.ObjectOutputStream$BlockDataOutputStream.getUTFLength(ObjectOutputStream.java:2106)

It looks like the task was partially skipped, it disappears from personal tasks, but the process instance does not continue it's run. It stays stuck on that task. The diagram shows the marker still at the task that was supposed to be skipped.

If I try to terminate a process instance with a task marked as not skippable (and guess it would do the same if I tried to delete it) I get the same plus a CCE:

ERROR [STDERR] (Thread-44) Exception in thread "Thread-44" 
ERROR [STDERR] (Thread-44) java.lang.RuntimeException: Client Exception with class class org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1 using port 5446
ERROR [STDERR] (Thread-44) 	at org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1.run(HornetQTaskClientConnector.java:119)
ERROR [STDERR] (Thread-44) 	at java.lang.Thread.run(Thread.java:662)
ERROR [STDERR] (Thread-44) Caused by: java.lang.ClassCastException: org.jbpm.process.workitem.wsht.CommandBasedWSHumanTaskHandler$AbortTaskResponseHandler cannot be cast to org.jbpm.task.service.TaskClientHandler$TaskSummaryResponseHandler
ERROR [STDERR] (Thread-44) 	at org.jbpm.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:171)
ERROR [STDERR] (Thread-44) 	at org.jbpm.task.service.hornetq.HornetQTaskClientHandler.messageReceived(HornetQTaskClientHandler.java:56)
ERROR [STDERR] (Thread-44) 	at org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1.run(HornetQTaskClientConnector.java:108)
ERROR [STDERR] (Thread-44) 	... 1 more

The task stays there, available.


There seems to be no problem with terminating process instances that have skippable tasks. And no problem at all with other tested databases - this happens only with Oracle.



Version-Release number of selected component (if applicable):
BRMS 5.3 ER9

Comment 1 Marco Rietveld 2012-06-15 13:21:32 UTC
*** Bug 832375 has been marked as a duplicate of this bug. ***

Comment 2 Marco Rietveld 2012-06-16 13:12:25 UTC
The problem is a result of two things: 

1. Oracle doesn't differentiate between "" (empty string) and null. 
2. DataOutput.writeUTF( null ) throws an NPE. 

What's happening is that information relating to a task, that contains fields with "", is 
a. being saved (at which point oracle converts the "" to a null). 
b. being retrieved (the fields in the retrieved field get set to null)
c. and then the same field is getting saved (at which point an NPE is being thrown because the field written by writeUTF() is null). 

This is happening because other information relating to a task is being modified, but not the information/field in question.

Comment 3 Marco Rietveld 2012-06-17 10:49:51 UTC
I received an e-mail from Prakash yesterday with the following: 

"Please go ahead and commit the changes. I will take care if ACK it. ALT will set the blocker at some point."

I'll be committing the fix to the community 5.2.x branch soon.

Comment 4 Marco Rietveld 2012-06-18 14:19:02 UTC
The commit is available here: 

https://github.com/droolsjbpm/jbpm/commit/8f250db3461845e6d645cb69dba17096fc671b41

Comment 5 Ryan Zhang 2012-06-21 02:47:01 UTC
This issue should contain the fixes.
Please verify it on CR1.

Comment 6 Lukáš Petrovický 2012-06-21 10:33:49 UTC
Oracle tests pass now.


Note You need to log in before you can comment on or make changes to this bug.