My Oracle Support Banner

P6 Web Services ReadActivities Request Fails With Error "DBEngine.executeSelect" When Adding an OrderBy to the Request (Doc ID 2687342.1)

Last updated on JULY 06, 2020

Applies to:

Primavera Web Services - Version 15.2.18.4 and later
Primavera P6 Enterprise Project Portfolio Management Cloud Service - Version 15.2.18.4 and later
Information in this document applies to any platform.

Symptoms

When attempting to call ReadActivities after upgrading to 15.2.18.4 or higher, the following error occurs.

ERROR
-----------------------
DBEngine.executeSelect: {SELECT projwbs.proj_id ProjectId,projwbs.wbs_id WbsId FROM projwbs WHERE projwbs.proj_id IN (select task.proj_id from task where task_id in (SELECT * FROM (SELECT task.task_id FROM task WHERE (task.proj_id = 12345 AND task.restart_date <= TO_DATE('2019-07-19 06:00:00', 'yyyy-mm-dd hh24:mi:ss') AND NOT (task.status_code = 'TK_Complete') AND task.task_name NOT LIKE '--%') order by projwbs.wbs_short_name asc, task.task_code asc, task.task_id asc) WHERE rownum <=10000001)) AND projwbs.proj_node_flag='Y'} null
com.primavera.bo.base.DBEngineException: DBEngine.executeSelect: {SELECT projwbs.proj_id ProjectId,projwbs.wbs_id WbsId FROM projwbs WHERE projwbs.proj_id IN (select task.proj_id from task where task_id in (SELECT * FROM (SELECT task.task_id FROM task WHERE (task.proj_id = 12345 AND task.restart_date <= TO_DATE('2019-07-19 06:00:00', 'yyyy-mm-dd hh24:mi:ss') AND NOT (task.status_code = 'TK_Complete') AND task.task_name NOT LIKE '--%') order by projwbs.wbs_short_name asc, task.task_code asc, task.task_id asc) WHERE rownum <=10000001)) AND projwbs.proj_node_flag='Y'}
  null
  at com.primavera.bo.base.DBEngineImpl.executeSelect(DBEngineImpl.java:1071)
  at com.primavera.bo.base.DBEngineImpl.executeSelect(DBEngineImpl.java:907)
  at com.primavera.bo.base.LDBEngineImpl.selectObjects(LDBEngineImpl.java:135)
  at com.primavera.bo.base.CalculateEngineImpl.getObjects(CalculateEngineImpl.java:4225)
  at com.primavera.bo.base.CalculateEngineImpl.getObjects(CalculateEngineImpl.java:4046)
  at com.primavera.bo.rules.calc.ActivityCE.calc_ProjectWbsId(ActivityCE.java:2114)
  at com.primavera.bo.schema.dispatch.ActivityCEDispatch.dispatch(ActivityCEDispatch.java:298)
  at com.primavera.bo.rules.calc.ActivityCE.dispatch(ActivityCE.java:119)
  at com.primavera.bo.base.CalculateEngineImpl.getObjects(CalculateEngineImpl.java:4314)
  at com.primavera.bo.base.CalculateEngineImpl.getObjects(CalculateEngineImpl.java:4040)
  at com.primavera.bo.base.CalculateEngineImpl.getObjects(CalculateEngineImpl.java:3997)
  at com.primavera.bo.base.server.ServerDAOImpl.loadPrmRowSet(ServerDAOImpl.java:152)
  at com.primavera.bo.base.server.ServerActivityDAO.loadPrmRowSet(ServerActivityDAO.java:178)
  at com.primavera.bo.remotable.ReqMgr.getObjects(ReqMgr.java:1273)
  at com.primavera.bo.remotable.qproxy.ReqMgr.getObjects(ReqMgr.java:802)
  at com.primavera.bo.DBReqMgr.getObjects(DBReqMgr.java:192)
  at com.primavera.integration.server.mediator.BusinessObjectMediator.load(BusinessObjectMediator.java:131)
  at com.primavera.integration.server.mediator.ActivityMediator.load(ActivityMediator.java:75)


STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Create a ReadActivities request like the following:
  
     <v1:ReadActivities>
        <!--1 or more repetitions:-->
        <v1:Field>ObjectId</v1:Field>
        <v1:Field>Id</v1:Field>
        <v1:Field>Name</v1:Field>
        <v1:Field>Status</v1:Field>
        <v1:Field>WBSCode</v1:Field>
        <v1:Field>RemainingEarlyStartDate</v1:Field>
        <v1:Field>RemainingEarlyFinishDate</v1:Field>
        <v1:Field>RemainingDuration</v1:Field>
        <v1:Field>WBSObjectId</v1:Field>
        <v1:Field>WBSPath</v1:Field>
        <v1:Field>ProjectObjectId</v1:Field>
        <v1:Filter>NOT (Status = 'Completed') and (Name not like '--%') and (ProjectObjectId=1234) and (RemainingEarlyStartDate  &lt; TO_DATE('2016-06-12 08:13:00', 'yyyy-mm-dd hh24:mi:ss'))</v1:Filter>
        <v1:OrderBy>Id asc </v1:OrderBy>
     </v1:ReadActivities>


Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.