Support Article

First insert in table fails

SA-31094

Summary



NullPointerException error thrown on the table Dataset save operation, when running the dataflow for the first time after every server restart.
The issue occurs only for the first insert, subsequent runs of the same dataflow does not throw the exception.


Error Messages



2016-10-07 18:28:25,784 [.PRPCWorkManager : 2] [ STANDARD] [ ] [ <YOUR APP>:01.01.01] ( internal.mgmt.Executable) ERROR - Exception
com.pega.dsm.dnode.api.dataflow.StageException: Exception in stage: <DF STAGE>
at com.pega.dsm.dnode.api.dataflow.DataFlowStage$StageOutputSubscriber.onError(DataFlowStage.java:400)
at com.pega.dsm.dnode.api.dataflow.DataFlowStageProcessor.onError(DataFlowStageProcessor.java:48)
at com.pega.dsm.dnode.api.dataflow.DataFlowStage$StageInputSubscriber.onError(DataFlowStage.java:292)
at com.pega.dsm.dnode.api.dataflow.DataFlowExecutor$SynchronousDataFlowExecutor.doOnError(DataFlowExecutor.java:341)
at com.pega.dsm.dnode.api.dataflow.DataFlow$4$1.doOnError(DataFlow.java:411)
at com.pega.dsm.dnode.api.dataflow.DataFlowStage$StageInputSubscriber.onCompleted(DataFlowStage.java:311)
at com.pega.dsm.dnode.api.dataflow.DataFlowExecutor$SynchronousDataFlowExecutor.doOnCompleted(DataFlowExecutor.java:348)
at com.pega.dsm.dnode.api.dataflow.DataFlowStage$StageOutputSubscriber.onCompleted(DataFlowStage.java:420)
at com.pega.dsm.dnode.api.dataflow.DataFlowStageProcessor.onCompleted(DataFlowStageProcessor.java:53)
at com.pega.dsm.dnode.api.dataflow.DataFlowStage$StageInputSubscriber.onCompleted(DataFlowStage.java:308)
at com.pega.dsm.dnode.api.dataflow.DataFlowExecutor$SynchronousDataFlowExecutor.doOnCompleted(DataFlowExecutor.java:348)
at com.pega.dsm.dnode.api.dataflow.DataFlowStage$StageOutputSubscriber.onCompleted(DataFlowStage.java:420)
at com.pega.dsm.dnode.api.dataflow.DataFlowStageProcessor.onCompleted(DataFlowStageProcessor.java:53)
at com.pega.dsm.dnode.api.dataflow.DataFlowStage$StageInputSubscriber.onCompleted(DataFlowStage.java:308)
at com.pega.dsm.dnode.api.dataflow.DataFlowExecutor$SynchronousDataFlowExecutor.doOnCompleted(DataFlowExecutor.java:348)
at com.pega.dsm.dnode.api.dataflow.DataFlowStage$StageOutputSubscriber.onCompleted(DataFlowStage.java:420)
at com.pega.dsm.dnode.api.dataflow.DataFlowStageProcessor.onCompleted(DataFlowStageProcessor.java:53)
at com.pega.dsm.dnode.api.dataflow.DataFlowStageBatchProcessor.completed(DataFlowStageBatchProcessor.java:83)
at com.pega.dsm.dnode.api.dataflow.DataFlowStageBatchProcessor.onCompleted(DataFlowStageBatchProcessor.java:79)
at com.pega.dsm.dnode.api.dataflow.DataFlowStage$StageInputSubscriber.onCompleted(DataFlowStage.java:308)
at com.pega.dsm.dnode.api.dataflow.DataFlowExecutor$SynchronousDataFlowExecutor.doOnCompleted(DataFlowExecutor.java:348)
at com.pega.dsm.dnode.api.dataflow.DataFlowStage$StageOutputSubscriber.onCompleted(DataFlowStage.java:420)
at com.pega.dsm.dnode.api.dataflow.DataFlowStage$StageInputSubscriber.onCompleted(DataFlowStage.java:308)
at com.pega.dsm.dnode.impl.stream.DataObservableImpl$SafeDataSubscriber.onCompleted(DataObservableImpl.java:304)
at com.pega.dsm.dnode.api.stream.DataObservables$3.emit(DataObservables.java:77)
at com.pega.dsm.dnode.impl.stream.DataObservableImpl$SafeDataSubscriber.subscribe(DataObservableImpl.java:320)
at com.pega.dsm.dnode.impl.stream.DataObservableImpl.subscribe(DataObservableImpl.java:52)
at com.pega.dsm.dnode.api.dataflow.DataFlow$4.emit(DataFlow.java:417)
at com.pega.dsm.dnode.impl.stream.DataObservableImpl$SafeDataSubscriber.subscribe(DataObservableImpl.java:320)
at com.pega.dsm.dnode.impl.stream.DataObservableImpl.subscribe(DataObservableImpl.java:52)
at com.pega.dsm.dnode.impl.stream.DataObservableImpl.await(DataObservableImpl.java:98)
at com.pega.dsm.dnode.impl.stream.DataObservableImpl.toList(DataObservableImpl.java:77)
at com.pegarules.generated.activity.ra_action_pxrunsinglecaseddf_8a4ad3eceacff2e6e344115ad53989ab.step1_circum0(ra_action_pxrunsinglecaseddf_8a4ad3eceacff2e6e344115ad53989ab.java:179)
at com.pegarules.generated.activity.ra_action_pxrunsinglecaseddf_8a4ad3eceacff2e6e344115ad53989ab.perform(ra_action_pxrunsinglecaseddf_8a4ad3eceacff2e6e344115ad53989ab.java:71)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3510)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10587)
at com.pegarules.generated.activity.ra_action_<your activity>_56a1344f5dfa9e5274362bfd5a878ad1.step9_circum0(ra_action_<your activity>_56a1344f5dfa9e5274362bfd5a878ad1.java:726)
at com.pegarules.generated.activity.ra_action_<your activity>_56a1344f5dfa9e5274362bfd5a878ad1.perform(ra_action_<your activity>_56a1344f5dfa9e5274362bfd5a878ad1.java:231)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3510)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10587)
at com.pegarules.generated.activity.ra_action_performasyncoperations_df0417bfbadfe167f2264246710dc21e.step4_circum0(ra_action_performasyncoperations_df0417bfbadfe167f2264246710dc21e.java:383)
at com.pegarules.generated.activity.ra_action_performasyncoperations_df0417bfbadfe167f2264246710dc21e.perform(ra_action_performasyncoperations_df0417bfbadfe167f2264246710dc21e.java:120)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3510)
at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:646)
at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivities(ThreadRunner.java:572)
at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.runActivities(PRThreadImpl.java:458)
at com.pega.pegarules.session.internal.async.agent.QueueProcessor.executeBatchTask(QueueProcessor.java:257)
at com.pega.pegarules.session.internal.async.agent.QueueProcessor.execute(QueueProcessor.java:321)
at com.pega.pegarules.session.internal.async.BatchRequestorTask.run(BatchRequestorTask.java:967)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.performTargetActionWithLock(PRSessionProviderImpl.java:1266)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1015)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:908)
at com.pega.pegarules.session.internal.async.BatchRequestorTask.run(BatchRequestorTask.java:684)
at com.pega.pegarules.session.internal.async.Agent.runBatchTask(Agent.java:821)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.AsyncServant.processAsyncTask(AsyncServant.java:230)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.AsyncServant.invoke(AsyncServant.java:167)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl._invokeEngine_privact(EngineImpl.java:327)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:270)
at com.pega.pegarules.session.internal.engineinterface.etier.ejb.EngineBean.invokeEngine(EngineBean.java:225)
at sun.reflect.GeneratedMethodAccessor90.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:370)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:411)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingThrowable(AppServerBridgeToPega.java:224)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingException(AppServerBridgeToPega.java:246)
at com.pega.pegarules.internal.etier.ejb.EngineBeanBoot.invokeEngine(EngineBeanBoot.java:168)
at com.pega.pegarules.internal.etier.interfaces.EJSLocalStatelessEngineBMT_f2439d86.invokeEngine(Unknown Source)
at com.pega.pegarules.session.internal.engineinterface.etier.mdb.PRAsync.processRequest(PRAsync.java:155)
at com.pega.pegarules.session.internal.engineinterface.etier.asynchbeans.AsyncTask.run(AsyncTask.java:64)
at com.pega.pegarules.session.internal.engineinterface.etier.asynchbeans.RunnableWrapper.run(RunnableWrapper.java:71)
at com.ibm.ws.asynchbeans.J2EEContext$RunProxy.run(J2EEContext.java:271)
at java.security.AccessController.doPrivileged(AccessController.java:360)
at com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:797)
at com.ibm.ws.asynchbeans.WorkWithExecutionContextImpl.go(WorkWithExecutionContextImpl.java:222)
at com.ibm.ws.asynchbeans.ABWorkItemImpl.run(ABWorkItemImpl.java:206)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1881)
Caused by:
com.pega.dsm.dnode.api.DNodeException: Could not perform database dataset operation on <DATASET CLASS>
at com.pega.dsm.dnode.impl.dataset.database.DatabaseOperationsUtil$2.emit(DatabaseOperationsUtil.java:142)
at com.pega.dsm.dnode.impl.stream.DataObservableImpl$SafeDataSubscriber.subscribe(DataObservableImpl.java:320)
at com.pega.dsm.dnode.impl.stream.DataObservableImpl.subscribe(DataObservableImpl.java:52)
at com.pega.dsm.dnode.impl.stream.DataObservableImpl.await(DataObservableImpl.java:98)
at com.pega.dsm.dnode.impl.stream.DataObservableImpl.await(DataObservableImpl.java:87)
at com.pega.dsm.dnode.impl.dataflow.SaveStageProcessor.onNext(SaveStageProcessor.java:98)
at com.pega.dsm.dnode.api.dataflow.DataFlowStageBatchProcessor.commitBatchInternal(DataFlowStageBatchProcessor.java:102)
at com.pega.dsm.dnode.api.dataflow.DataFlowStageBatchProcessor.commitBatch(DataFlowStageBatchProcessor.java:92)
at com.pega.dsm.dnode.api.dataflow.DataFlowStageBatchProcessor.onCompleted(DataFlowStageBatchProcessor.java:78)
at com.pega.dsm.dnode.api.dataflow.DataFlowStage$StageInputSubscriber.onCompleted(DataFlowStage.java:308)
... 71 more
Caused by:
java.lang.NullPointerException
at java.util.TreeMap.getEntry(TreeMap.java:354)
at java.util.TreeMap.get(TreeMap.java:285)
at com.pega.pegarules.data.internal.access.TableInformationImpl.getColumn(TableInformationImpl.java:246)
at com.pega.dsm.dnode.impl.dataset.database.DatabaseSaveOperation.getDeleteColumns(DatabaseSaveOperation.java:203)
at com.pega.dsm.dnode.impl.dataset.database.DatabaseSaveOperation.populateClassAndDeleteKeys(DatabaseSaveOperation.java:179)
at com.pega.dsm.dnode.impl.dataset.database.DatabaseSaveOperation.access$100(DatabaseSaveOperation.java:66)
at com.pega.dsm.dnode.impl.dataset.database.DatabaseSaveOperation$1.executeExposedLogic(DatabaseSaveOperation.java:118)
at com.pega.dsm.dnode.impl.dataset.database.DatabaseOperationsUtil$2.emit(DatabaseOperationsUtil.java:139)
... 80 more


Steps to Reproduce



1) Execute a SOAP service, that calls pxRunSingleCaseDDF to execute a data flow.
2) Configure the Dataflow's target pointing to a database table dataset.


Root Cause



A defect in Pegasystems’ code or rules.

​The keys defined in the database table Dataset were not part of the column-properties mapping in the external mapping tab of the PRPC class under which the dataset is defined.

Resolution



Add the Column <-> Properties mapping entry in the external mapping tab of the PRPC class for all properties defined as keys in the dataset.
 

 

Published December 5, 2016 - Updated December 8, 2016

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.