cancel
Showing results for 
Search instead for 
Did you mean: 

Java datetime groovy.lang.MissingPropertyException: No such property: executionTime for class: Scrip

Occasional Contributor

Java datetime groovy.lang.MissingPropertyException: No such property: executionTime for class: Scrip

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

import java.util.*;
import java.util.Date;

 

Interestingly 

In another groovy script class this is working.

import java.util.*;
import java.util.Date;

//Set current date and time in 24hr Date Format
def currentDateAndTime = new java.text.SimpleDateFormat("yyyy_MM_dd'_'HH_mm").format(new Date())
testRunner.testCase.setPropertyValue("currDateTime", currentDateAndTime)

 

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.

 

5 REPLIES 5
Community Hero

Re: Java datetime groovy.lang.MissingPropertyException: No such property: executionTime for class: S

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.



Regards,
Rao.
Occasional Contributor

Re: Java datetime groovy.lang.MissingPropertyException: No such property: executionTime for class: S

Please do not misunderstand.
I don't know the answer.
To try each solution I have to work remote on India PC ...
So, if I get a workable solution...cuts down cycle time
Community Hero

Re: Java datetime groovy.lang.MissingPropertyException: No such property: executionTime for class: S

What does it show?

def executionTime = new java.text.SimpleDateFormat('MM-dd-yyyy hh:mm').format(new Date())
log.info executionTime


Regards,
Rao.
Occasional Contributor

Re: Java datetime groovy.lang.MissingPropertyException: No such property: executionTime for class: S

Thanks Rao.

I will setup a session with offshore and get the output and reply. Here I get the value as expected.

Occasional Contributor

Re: Java datetime groovy.lang.MissingPropertyException: No such property: executionTime for class: S

This thread can be closed. Problem is resolved by importing right dependent Java libraries locally in the geography.

New Here?
Join us and watch the welcome video:
Watch the new Interview
Top Kudoed Authors