JBoss Community

Exception retrieving task

created by jnorris in jBPM - View the full discussion

Hi All,

 

I'm getting the exception shown below when trying to get a task using the Mina server in the demo task server included with the installer.  I've deployed and started a process definition that has a single human task in it.  A row is inserted into the TASK table in the Oracle 11g DB.  Other task tables with data are CONTENT (1 row), I18NText (2 rows), PEOPLEASSIGNMENTS_BAS (1 row - 'Administrator') and PEOPLEASSIGNMENTS_POTOWNERS (1 row - 'john').  One item of interest is that the column TASKINITIATOR_ID for the task is null.  User 'john' started the process and is the single ActorId in the process defintion.  Both the CREATEDBY_ID and ACTUALOWNER_ID columns for the task row are set to 'john'.

 

Client code:

String name = "ksclient-" + UUID.randomUUID();

TaskClient client = new TaskClient( new MinaTaskClientConnector( name,                    new MinaTaskClientHandler( SystemEventListenerFactory.getSystemEventListener())));

client.connect( "127.0.0.1", 9123 );

Task jbpmTask = this.getTask( id.longValue() );

 

utility method used in multiple places:

public Task getTask( long taskId, TaskClient client )

{

          BlockingGetTaskResponseHandler responseHandler = new BlockingGetTaskResponseHandler();

          client.getTask( taskId, responseHandler );

          responseHandler.waitTillDone( 1000 );

          return responseHandler.getTask();

}

 

Any help in resolving this would be appreciated.

 

Jim

 

Here's the exception:

     [java] Task service started correctly!

     [java] Task service running ...

     [java] Hibernate: select task0_.id as id11_3_, task0_.archived as archived11_3_, task0_.allowedToDelegate as allowedT3_11_3_, task0_.taskInitiator_id as taskIni27_11_3_, task0_.priority as priori

ty11_3_, task0_.activationTime as activati5_11_3_, task0_.actualOwner_id as actualO28_11_3_, task0_.createdBy_id as createdBy29_11_3_, task0_.createdOn as createdOn11_3_, task0_.documentAccessType as

document7_11_3_, task0_.documentContentId as document8_11_3_, task0_.documentType as document9_11_3_, task0_.expirationTime as expirat10_11_3_, task0_.faultAccessType as faultAc11_11_3_, task0_.faultC

ontentId as faultCo12_11_3_, task0_.faultName as faultName11_3_, task0_.faultType as faultType11_3_, task0_.outputAccessType as outputA15_11_3_, task0_.outputContentId as outputC16_11_3_, task0_.outpu

tType as outputType11_3_, task0_.parentId as parentId11_3_, task0_.previousStatus as previou19_11_3_, task0_.processId as processId11_3_, task0_.processInstanceId as process21_11_3_, task0_.processSes

sionId as process22_11_3_, task0_.skipable as skipable11_3_, task0_.status as status11_3_, task0_.workItemId as workItemId11_3_, task0_.OPTLOCK as OPTLOCK11_3_, user1_.id as id6_0_, user2_.id as id6_1

_, user3_.id as id6_2_ from Task task0_ left outer join OrganizationalEntity user1_ on task0_.taskInitiator_id=user1_.id left outer join OrganizationalEntity user2_ on task0_.actualOwner_id=user2_.id

left outer join OrganizationalEntity user3_ on task0_.createdBy_id=user3_.id where task0_.id=?

     [java] org.apache.mina.filter.codec.ProtocolEncoderException: java.lang.NullPointerException

     [java]     at org.apache.mina.filter.codec.ProtocolCodecFilter.filterWrite(ProtocolCodecFilter.java:355)

     [java]     at org.apache.mina.core.filterchain.DefaultIoFilterChain.callPreviousFilterWrite(DefaultIoFilterChain.java:509)

     [java]     at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1400(DefaultIoFilterChain.java:46)

     [java]     at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.filterWrite(DefaultIoFilterChain.java:808)

     [java]     at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.filterWrite(DefaultIoFilterChain.java:734)

     [java]     at org.apache.Hibernate: select names0_.Task_Names_Id as Task5_1_, names0_.id as id1_, names0_.id as id7_0_, names0_.language as language7_0_,mina.core.filterchain.DefaultIoFilterChain

.callPreviousFilterWrite(DefaultIoFilterChain.java:509)

     [java]     at org.apache.mina.core.filt names0_.text as text7_0_ from I18NText names0_ where names0_.Task_Names_Id=?

     [java] Hibernate: select subjects0_.Task_Subjects_Id as erchain.DefaultIoFilterChain.fireFilterWrite(DefaultIoFilterChain.java:501)

     [java]     at org.apache.mina.core.session.AbstractIoSession.Task4_1_, subjects0_.id as id1_, subjects0_.id as id7_0_, subjects0_.language as language7_0_, subjects0_.text as text7_0_ from write(

AbstractIoSession.java:490)

     [java]     at org.apache.mina.core.session.AbstractIoSession.write(AbstractIoSession.java:435)

     [java]     at orgI18NText subjects0_ where subjects0_.Task_Subjects_Id=?

     [java] .jbpm.task.service.mina.MinaSessionWriter.write(MinaSessionWriter.java:31)

     [java]     at org.jbpm.task.service.TaskServerHandler.messageReceived(TaskServerHandler.java:134)

     [java]     at org.jbpm.task.service.mina.MinaTaskServerHandler.messageReceived(MinaTaskServerHandler.java:41)

     [java]     at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:716)

     [java]     at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)

     [java]     at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)

     [java]     at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)

     [java]     at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:427)

     [java]     at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:245)

     [java]     at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)

     [java]     at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)

     [java]     at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)

     [java]     at org.apache.mina.filter.logging.LoggingFilter.messageReceived(LoggingFilter.java:177)

     [java]     at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)

     [java]     at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)

     [java]     at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)

     [java]     at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)

     [java]     at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)

     [java]     at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)

     [java]     at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:692)

     [java]     at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:645)

     [java]     at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:634)

     [java]     at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:66)

     [java]     at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1078)

     [java]     at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)

     [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

     [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

     [java]     at java.lang.Thread.run(Thread.java:662)

     [java] Caused by: java.lang.NullPointerException

     [java]     at java.io.ObjectOutputStream$BlockDataOutputStream.getUTFLength(ObjectOutputStream.java:2106)

     [java]     at java.io.ObjectOutputStream$BlockDataOutputStream.writeUTF(ObjectOutputStream.java:1977)

     [java]     at java.io.ObjectOutputStream.writeUTF(ObjectOutputStream.java:849)

     [java]     at org.jbpm.task.I18NText.writeExternal(I18NText.java:53)

     [java]     at org.jbpm.task.utils.CollectionUtils.writeI18NTextList(CollectionUtils.java:235)

     [java]     at org.jbpm.task.Task.writeExternal(Task.java:92)

     [java]     at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1429)

     [java]     at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1398)

     [java]     at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)

     [java]     at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1346)

     [java]     at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1154)

     [java]     at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)

     [java]     at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)

     [java]     at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)

     [java]     at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)

     [java]     at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)

     [java]     at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)

     [java]     at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)

     [java]     at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)

     [java]     at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)

     [java]     at org.apache.mina.core.buffer.AbstractIoBuffer.putObject(AbstractIoBuffer.java:2011)

     [java]     at org.apache.mina.filter.codec.serialization.ObjectSerializationEncoder.encode(ObjectSerializationEncoder.java:80)

     [java]     at org.apache.mina.filter.codec.ProtocolCodecFilter.filterWrite(ProtocolCodecFilter.java:322)

     [java]     ... 36 more

Reply to this message by going to Community

Start a new discussion in jBPM at Community