Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Error : javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: messag

HCI Usuari
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 3, 2018

Hello

I have a simple scipt, But I can't execute, because I have obtained the error:

javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: message for class: new__Script, cause: groovy.lang.MissingPropertyException: No such property: message for class: new__Script

 

The script is :

import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;
def map = message.getHeaders();
String getCertExpirydate = map.get("CertExpiryDate");
Date CertExpirydate = new Date().parse('YYYY/MM/DD', getCertExpirydate);
Date dateNow = new Date(System.currentTimeMillis());
long dateDiff = CertExpirydate.getTime() - dateNow.getTime();
def daysToExpire = TimeUnit.DAYS.convert(dateDiff, TimeUnit.MILLISECONDS);
message.setHeader("daysToExpire", daysToExpire);

 

Thanks

 

1 answer

0 votes
Vasiliy Zverev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 3, 2018

Dear Usuari, hi!

Variable message is not defined and this is a trouble.

Best regards, Vasiliy

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events