Project Copy Paste Does Not Display After Job Completes When the Copied Project ID Contains Either '-#.##', '-#.L##', or '-#.#L#' At the End Connecting to a SQL Server Database (Doc ID 2262409.1)

Last updated on AUGUST 17, 2017

Applies to:

Primavera P6 Enterprise Project Portfolio Management - Version 16.2.5.0 and later
Information in this document applies to any platform.

Symptoms

After attempting to run a copy/paste job within P6 Professional using a project which contains either -#.##, -#.L##, or -#.#L#, at the end of the Project ID name, a "Copy Projects" service job creates and completes successfully but the new project does not display within the UI.

The following errors are logged in the P6WebAccess.html log file for the process running "Copy Projects" service jobs:

ERROR

PreparedStatementCallback; SQL [insert into PROJECT(proj_id,fy_start_month_num,chng_eff_cmp_pct_flag,rsrc_self_add_flag,allow_complete_flag,rsrc_multi_assign_flag,checkout_flag,project_flag,step_complete_flag,cost_qty_recalc_flag,sum_only_flag,batch_sum_flag,name_sep_char,def_complete_pct_type,proj_short_name,acct_id,orig_proj_id,source_proj_id,base_type_id,clndr_id,sum_base_proj_id,task_code_base,task_code_step,priority_num,wbs_max_sum_level,risk_level,strgy_priority_num,last_checksum,critical_drtn_hr_cnt,def_cost_per_qty,last_recalc_date,plan_start_date,plan_end_date,scd_end_date,add_date,sum_data_date,last_tasksum_date,fcst_start_date,def_duration_type,task_code_prefix,guid,def_qty_type,add_by_name,web_local_root_path,proj_url,def_rate_type,act_this_per_link_flag,def_task_type,act_pct_link_flag,add_act_remain_flag,critical_path_type,task_code_prefix_flag,def_rollup_dates_flag,rem_target_link_flag,reset_planned_flag,allow_neg_act_flag,rsrc_id,msp_managed_flag,msp_update_actuals_flag,checkout_date,checkout_user_id,sum_assign_level,use_project_baseline_flag,last_baseline_update_date,ts_rsrc_vw_compl_asgn_flag,ts_rsrc_mark_act_finish_flag,ts_rsrc_vw_inact_actv_flag,cr_external_key,apply_actuals_date,description,matrix_id,location_id,px_last_update_date,px_priority,px_next_date,px_enable_publication_flag,last_level_date,last_schedule_date,px_safety_date,control_updates_flag,hist_interval,hist_level,update_date,update_user,create_date,create_user,delete_session_id,delete_date,proj_update_date,publish_spread_assign_level,etl_interval,etl_hour) select xref1.new_id,fy_start_month_num,chng_eff_cmp_pct_flag,rsrc_self_add_flag,allow_complete_flag,rsrc_multi_assign_flag,'Y',project_flag,step_complete_flag,cost_qty_recalc_flag,sum_only_flag,batch_sum_flag,name_sep_char,def_complete_pct_type,XREF1.NEW_VALUE,acct_id,orig_proj_id,source_proj_id,base_type_id,ISNULL(xref2.new_id,CLNDR_ID),sum_base_proj_id,task_code_base,task_code_step,priority_num,wbs_max_sum_level,risk_level,strgy_priority_num,last_checksum,critical_drtn_hr_cnt,def_cost_per_qty,last_recalc_date,plan_start_date,plan_end_date,scd_end_date,getdate(),sum_data_date,last_tasksum_date,fcst_start_date,def_duration_type,task_code_prefix,guid,def_qty_type,'admin',web_local_root_path,proj_url,def_rate_type,act_this_per_link_flag,def_task_type,act_pct_link_flag,add_act_remain_flag,critical_path_type,task_code_prefix_flag,def_rollup_dates_flag,rem_target_link_flag,reset_planned_flag,allow_neg_act_flag,rsrc_id,msp_managed_flag,msp_update_actuals_flag,checkout_date,checkout_user_id,sum_assign_level,use_project_baseline_flag,last_baseline_update_date,ts_rsrc_vw_compl_asgn_flag,ts_rsrc_mark_act_finish_flag,ts_rsrc_vw_inact_actv_flag,cr_external_key,apply_actuals_date,description,matrix_id,location_id,NULL,px_priority,px_next_date,'N',last_level_date,last_schedule_date,px_safety_date,control_updates_flag,hist_interval,hist_level,update_date,update_user,create_date,create_user,delete_session_id,delete_date,proj_update_date,publish_spread_assign_level,etl_interval,etl_hour from PROJECT JOIN PC_KEY_XREF xref1 ON PROJ_ID=xref1.source_id and xref1.ref_table='PROJECT' and xref1.execution_id=? LEFT OUTER JOIN PC_KEY_XREF xref2 ON CLNDR_ID=xref2.source_id and xref2.ref_table='CALENDAR' and xref2.execution_id=? JOIN PC_KEY_XREF xref3 ON PROJ_ID=xref3.source_id and xref3.ref_table='PROJECT' and xref3.execution_id=? where PROJ_ID in (select source_id from PC_KEY_XREF where REF_TABLE ='PROJECT' and execution_id=?)]; Cannot insert the value NULL into column 'proj_short_name', table '$database.dbo.PROJECT'; column does not allow nulls. INSERT fails.; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert the value NULL into column 'proj_short_name', table 'pmdbtocbui.dbo.PROJECT'; column does not allow nulls. INSERT fails.

PreparedStatementCallback; SQL [insert into PROJWBS(wbs_id,proj_id,obs_id,seq_num,est_wt,proj_node_flag,sum_data_flag,status_code,wbs_short_name,wbs_name,phase_id,parent_wbs_id,ev_user_pct,ev_etc_user_value,orig_cost,indep_remain_total_cost,ann_dscnt_rate_pct,dscnt_period_type,indep_remain_work_qty,anticip_start_date,anticip_end_date,ev_compute_type,ev_etc_compute_type,resp_team_id,iteration_id,guid,tmpl_guid,original_qty,rqmt_rem_qty,intg_type,status_reviewer,intg_wbs,update_date,update_user,create_date,create_user,delete_session_id,delete_date) select xref1.new_id,xref2.new_id,obs_id,seq_num,est_wt,proj_node_flag,sum_data_flag,status_code,case when proj_node_flag='Y' then XREF2.NEW_VALUE else wbs_short_name end,XREF1.NEW_VALUE,phase_id,ISNULL(xref3.new_id,ISNULL(153398,PARENT_WBS_ID)),ev_user_pct,ev_etc_user_value,orig_cost,indep_remain_total_cost,ann_dscnt_rate_pct,dscnt_period_type,indep_remain_work_qty,anticip_start_date,anticip_end_date,ev_compute_type,ev_etc_compute_type,resp_team_id,iteration_id,guid,tmpl_guid,original_qty,rqmt_rem_qty,intg_type,status_reviewer,intg_wbs,update_date,update_user,create_date,create_user,delete_session_id,delete_date from PROJWBS JOIN PC_KEY_XREF xref1 ON WBS_ID=xref1.source_id and xref1.ref_table='PROJWBS' and xref1.execution_id=? LEFT OUTER JOIN PC_KEY_XREF xref2 ON PROJ_ID=xref2.source_id and xref2.ref_table='PROJECT' and xref2.execution_id=? LEFT OUTER JOIN PC_KEY_XREF xref3 ON PARENT_WBS_ID=xref3.source_id and xref3.ref_table='PROJWBS' and xref3.execution_id=? where WBS_ID in (select source_id from PC_KEY_XREF where REF_TABLE ='PROJWBS' and execution_id=?)]; Cannot insert the value NULL into column 'wbs_short_name', table 'pmdbtocbui.dbo.PROJWBS'; column does not allow nulls. INSERT fails.; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert the value NULL into column 'wbs_short_name', table '$database.dbo.PROJWBS'; column does not allow nulls. INSERT fails.

PreparedStatementCallback; SQL [insert into TASK(task_id,proj_id,wbs_id,clndr_id,est_wt,phys_complete_pct,rev_fdbk_flag,lock_plan_flag,auto_compute_act_flag,complete_pct_type,task_type,duration_type,review_type,status_code,task_code,task_name,rsrc_id,total_float_hr_cnt,free_float_hr_cnt,remain_drtn_hr_cnt,act_work_qty,remain_work_qty,target_work_qty,target_drtn_hr_cnt,target_equip_qty,act_equip_qty,remain_equip_qty,cstr_date,act_start_date,act_end_date,late_start_date,late_end_date,expect_end_date,early_start_date,early_end_date,restart_date,reend_date,target_start_date,target_end_date,review_end_date,rem_late_start_date,rem_late_end_date,cstr_type,priority_type,guid,tmpl_guid,cstr_date2,cstr_type2,float_path,float_path_order,act_this_per_work_qty,act_this_per_equip_qty,driving_path_flag,suspend_date,resume_date,external_early_start_date,external_late_end_date,location_id,control_updates_flag,starred_flag,act_min_drtn,act_prob_drtn,act_max_drtn,update_date,update_user,create_date,create_user,delete_session_id,delete_date) select xref1.new_id,xref2.new_id,xref3.new_id,ISNULL(xref4.new_id,CLNDR_ID),est_wt,phys_complete_pct,rev_fdbk_flag,lock_plan_flag,auto_compute_act_flag,complete_pct_type,task_type,duration_type,review_type,status_code,task_code,task_name,rsrc_id,total_float_hr_cnt,free_float_hr_cnt,remain_drtn_hr_cnt,act_work_qty,remain_work_qty,target_work_qty,target_drtn_hr_cnt,target_equip_qty,act_equip_qty,remain_equip_qty,cstr_date,act_start_date,act_end_date,late_start_date,late_end_date,expect_end_date,early_start_date,early_end_date,restart_date,reend_date,target_start_date,target_end_date,review_end_date,rem_late_start_date,rem_late_end_date,cstr_type,priority_type,guid,tmpl_guid,cstr_date2,cstr_type2,float_path,float_path_order,act_this_per_work_qty,act_this_per_equip_qty,driving_path_flag,suspend_date,resume_date,external_early_start_date,external_late_end_date,location_id,control_updates_flag,starred_flag,act_min_drtn,act_prob_drtn,act_max_drtn,update_date,update_user,create_date,create_user,delete_session_id,delete_date from TASK JOIN PC_KEY_XREF xref1 ON TASK_ID=xref1.source_id and xref1.ref_table='TASK' and xref1.execution_id=? LEFT OUTER JOIN PC_KEY_XREF xref2 ON PROJ_ID=xref2.source_id and xref2.ref_table='PROJECT' and xref2.execution_id=? LEFT OUTER JOIN PC_KEY_XREF xref3 ON WBS_ID=xref3.source_id and xref3.ref_table='PROJWBS' and xref3.execution_id=? LEFT OUTER JOIN PC_KEY_XREF xref4 ON CLNDR_ID=xref4.source_id and xref4.ref_table='CALENDAR' and xref4.execution_id=? where TASK_ID in (select source_id from PC_KEY_XREF where REF_TABLE ='TASK' and execution_id=?)]; The INSERT statement conflicted with the FOREIGN KEY constraint "fk_task_project". The conflict occurred in database "pmdbtocbui", table "dbo.PROJECT", column 'proj_id'.; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: The INSERT statement conflicted with the FOREIGN KEY constraint "fk_task_project". The conflict occurred in database "$database", table "dbo.PROJECT", column 'proj_id'.

PreparedStatementCallback; SQL [insert into TASKPRED(task_pred_id,task_id,pred_task_id,proj_id,pred_proj_id,pred_type,lag_hr_cnt,update_date,update_user,create_date,create_user,delete_session_id,delete_date) select xref1.new_id,ISNULL(xref2.new_id,TASK_ID),ISNULL(xref3.new_id,PRED_TASK_ID),ISNULL(xref4.new_id,PROJ_ID),ISNULL(xref5.new_id,PRED_PROJ_ID),pred_type,lag_hr_cnt,update_date,update_user,create_date,create_user,delete_session_id,delete_date from TASKPRED JOIN PC_KEY_XREF xref1 ON TASK_PRED_ID=xref1.source_id and xref1.ref_table='TASKPRED' and xref1.execution_id=? LEFT OUTER JOIN PC_KEY_XREF xref2 ON TASK_ID=xref2.source_id and xref2.ref_table='TASK' and xref2.execution_id=? LEFT OUTER JOIN PC_KEY_XREF xref3 ON PRED_TASK_ID=xref3.source_id and xref3.ref_table='TASK' and xref3.execution_id=? LEFT OUTER JOIN PC_KEY_XREF xref4 ON PROJ_ID=xref4.source_id and xref4.ref_table='PROJECT' and xref4.execution_id=? LEFT OUTER JOIN PC_KEY_XREF xref5 ON PRED_PROJ_ID=xref5.source_id and xref5.ref_table='PROJECT' and xref5.execution_id=? where TASK_PRED_ID in (select source_id from PC_KEY_XREF where REF_TABLE ='TASKPRED' and execution_id=?) AND PRED_PROJ_ID = PROJ_ID]; The INSERT statement conflicted with the FOREIGN KEY constraint "fk_taskpred_project". The conflict occurred in database "pmdbtocbui", table "dbo.PROJECT", column 'proj_id'.; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: The INSERT statement conflicted with the FOREIGN KEY constraint "fk_taskpred_project". The conflict occurred in database "$database", table "dbo.PROJECT", column 'proj_id'.

PreparedStatementCallback; SQL [insert /*+ index(TASKACTV,NDX_TASKACTV_PROJ_TASK_ACTV) */ into TASKACTV(task_id,actv_code_type_id,actv_code_id,proj_id,update_date,update_user,create_date,create_user,delete_session_id,delete_date) select /*+ index(TASKACTV,NDX_TASKACTV_PROJ_TASK_ACTV) */ xref1.new_id,ISNULL(xref2.new_id,ACTV_CODE_TYPE_ID),ISNULL(xref3.new_id,ACTV_CODE_ID),xref4.new_id,update_date,update_user,create_date,create_user,delete_session_id,delete_date from TASKACTV LEFT OUTER JOIN PC_KEY_XREF xref1 ON TASK_ID=xref1.source_id and xref1.ref_table='TASK' and xref1.execution_id=? LEFT OUTER JOIN PC_KEY_XREF xref2 ON ACTV_CODE_TYPE_ID=xref2.source_id and xref2.ref_table='ACTVTYPE' and xref2.execution_id=? LEFT OUTER JOIN PC_KEY_XREF xref3 ON ACTV_CODE_ID=xref3.source_id and xref3.ref_table='ACTVCODE' and xref3.execution_id=? JOIN PC_KEY_XREF xref4 ON PROJ_ID=xref4.source_id and xref4.ref_table='PROJECT' and xref4.execution_id=? where PROJ_ID in (select source_id from PC_KEY_XREF where REF_TABLE ='PROJECT' and execution_id=?)]; The INSERT statement conflicted with the FOREIGN KEY constraint "fk_taskactv_task". The conflict occurred in database "pmdbtocbui", table "dbo.TASK", column 'task_id'.; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: The INSERT statement conflicted with the FOREIGN KEY constraint "fk_taskactv_task". The conflict occurred in database "$database", table "dbo.TASK", column 'task_id'.

Error while updating the sequence number
java.lang.NullPointerException
  at com.primavera.dbcrudutil.CopyProjectJobService.runJob(Unknown Source)
  at com.primavera.jobsvc.common.JobServiceExecutable.c(Unknown Source)
  at com.primavera.jobsvc.common.JobServiceExecutable.a(Unknown Source)
  at com.primavera.jobsvc.common.JobServiceExecutable.execute(Unknown Source)
  at com.primavera.infr.threadpool.ThreadPoolImpl.run(Unknown Source)
  at java.lang.Thread.run(Thread.java:745)


STEPS

The issue can be reproduced at will with the following steps:
1. Login to P6 Professional.
2. Right-Click and copy/paste a Project.
3. Note that the job completes successfully (via notification or by viewing the Job Status window).
4. Select File, Refresh.
5. Note the new project which should have been created by the copy/paste does not display.

This issue is specific to usage of a SQL Server Database Only.

Changes

 

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms