on 07-18-2014 12:45 PM
This is about an issue faced in SAP CPS.
After upgradation to CPS version M33.104-74500 from M33.74-62951 it has been noticed that the automated report that were configured in CPS to be sent as HTML attachment through an SMTP email is failing. In the job chain the report generation step is getting cpmpleted succesfully but the mail sent step is failing.
Following CPS programs and parameters are used:
System_ReportRun
Report/Expression: GLOBAL.Weekly_Backup_Job_POK_Status (name of CPS report/filter)
Report format /Expression: HTMLText
System_Mail_Send
To/Expression: xxxxxx@xxxxxx.com
Subject/Expression: Weekly POK Backup Status
Text/Expression: Weekly POK Backup Status
Relative Job/Expression: Generate Report, Job 1
Job file/Expression: report.html
The error log is as below:
-- JOB RUN STACK TRACE --
JCS-103005: Job not found. Relative job is "Generate Report, Job 1", current job is Job 108976008 (submitted from System_Mail_Send copy from 2010/04/01 15:00:19,276 America/New_York). Cannot find job 1
at com.redwood.scheduler.apiint.model.helpers.RelativeJobFinder.a(RelativeJobFinder.java:74)
at com.redwood.scheduler.apiint.model.helpers.RelativeJobFinder.locate(RelativeJobFinder.java:104)
at com.redwood.scheduler.apiint.model.jobfile.JobFileExpression.locateRelativeJob(JobFileExpression.java:4)
at com.redwood.scheduler.system.jobs.SendMail.sendMessage(SendMail.java:170)
at com.redwood.scheduler.system.jobs.SendMail.execute(SendMail.java:151)
at com.redwood.scheduler.systemjobservice.impl.JobWorker.doWork(JobWorker.java:253)
at com.redwood.scheduler.infrastructure.workqueue.Worker.run(Worker.java:76)
at java.lang.Thread.run(Thread.java:761)
It was working fine prior to upgradation. Please suggest a solution. Thanks.
The issue is that system_mail_Send is not able to identify the relative job.
Are you sure of the step name and job name mentioned? no typo?
Is Generate Report, the previous step name? the format should be <step name>, job 1
Thanks
Nanda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nanda Kumar,
I am Anirban's team member. Let me add to what Anirban has described.
Our issue is the syntax in the new version.
The documentation says the syntax for sending automated report is as below.
Older Version Syntax:
Step 1 - Genrate Report - Expressions - Report Name and Report Format
Step 2 - Send Email - Job File expression, Report.html
New Version Syntax:
Step 1 - Genrate Report - Expressions - Report Name and Report Format
Step 2 - Send Email - Job File expression, Job ID
(JID for the report ran job)
For the new version syntax, how do we fetch the JID (Job ID) dynamically?
Best Regards,
Kedar Pujari
Hi Nanda Kumar,
It still does not work. CPS can not find Job 1.
In fact, it will never be Job 1 as per my understanding. The syntax says ...Generate Report, JID
The issue here is how do we determine the JID dynamically?
See the error below.
-- JOB RUN STACK TRACE --
JCS-103005: Job not found. Relative job is "Generate report, job 1", current job is Job 110767228 (submitted from System_Mail_Send copy from 2010/04/01 15:00:19,276 America/New_York). Cannot find job 1
at com.redwood.scheduler.apiint.model.helpers.RelativeJobFinder.a(RelativeJobFinder.java:74)
at com.redwood.scheduler.apiint.model.helpers.RelativeJobFinder.locate(RelativeJobFinder.java:104)
at com.redwood.scheduler.apiint.model.jobfile.JobFileExpression.locateRelativeJob(JobFileExpression.java:4)
at com.redwood.scheduler.system.jobs.SendMail.sendMessage(SendMail.java:170)
at com.redwood.scheduler.system.jobs.SendMail.execute(SendMail.java:151)
at com.redwood.scheduler.systemjobservice.impl.JobWorker.doWork(JobWorker.java:253)
at com.redwood.scheduler.infrastructure.workqueue.Worker.run(Worker.java:76)
at java.lang.Thread.run(Thread.java:761)
Hi Nanda Kumar,
I tried correcting the spelling and capitalization error as per the syntax below
Generate Report, Job 1
However, the job still failed. Error is the same and it says "Can not find job 1"
I believe dynamic JID should be determined as per the documentation from CPS.
Raising this now to SAP CPS...
Hi Nanda,
What is weird here, is that it worked before the upgrade.
I found an error: A job file never has the job or step name in it, so, Job File MUST be "report.html" not "Step 1 ,report.html" (without ")
To summarize:
Make 100% sure that
Relative Job: Generate Report, Job 1
Job File: report.html
If this does not work, try to recreate a new job chain.
Regards,
HP
Hello all,
This has to do with an internal change in version M33.97 that changes the way jobs are looked up. There will be a fix for this in an upcoming patch.
To make your job chain work for the moment you can choose one of these two options:
1) make the reference to the job number mentioned in the job chain dialog, in your case 'job 3'
2) change the job number (sequence number on the job chain call) in the xml tab of the job chain and reset it to 1
Regards Gerben
Hi Anirban,
Can you please check the report is completed and generated which you are sending as your expected format. The error you are getting is releated to data is invalid.
Also if it's don't help, can you get the support file or trace file.
Regards,
Abhishek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.