I am trying to read current datetime in SOAPUI groovy script class. The code works in CST timezone.
On a different machine in India IST timezone (Java version is matched 1.8) it is giving error
ERROR [errorlog] groovy.lang.MissingPropertyException: No such property: executionTime for class: Script1
groovy.lang.MissingPropertyException: No such property: executionTime for class: Script1
Here are the code lines
def executionTime = new java.text.SimpleDateFormat("MM-dd-yyyy' 'hh:mm").format(new Date())
groovyUtils.setPropertyValue("Results", "executionTime", executionTime.toString())
I have NOT included
In another groovy script class this is working.
//Set current date and time in 24hr Date Format
def currentDateAndTime = new java.text.SimpleDateFormat("yyyy_MM_dd'_'HH_mm").format(new Date())
I am not getting much overlap time to debug, So it is tricky. Appreciate any hint or tips that would resolve the issue.
Kindly request for any more info.
People try to help in the forums.
But your request is weird, it is not that you don't know to resolve the problem, but you are not getting time to debug. It means expecting others time to invest for you.
I will setup a session with offshore and get the output and reply. Here I get the value as expected.
This thread can be closed. Problem is resolved by importing right dependent Java libraries locally in the geography.