Forum Discussion

Raju_Vusirikala's avatar
Raju_Vusirikala
Contributor
18 years ago

GroovyCastException

Hi,

I have around 28 groovy scripts and all the scripts are working fine, but facing issue with one script "CCGetCustomerDAO"

My SoapUI Grooy Script is as follows
//Begin of Code Snippet
import com.intuit.customercentral.soapui.dao.CCGetCustomerDAO;
import com.intuit.customercentral.soapui.dao.CCGetCustomerResponseDO;

CCGetCustomerDAO ccGetCustomerDAO = new CCGetCustomerDAO();
long tpCustomerId = 999615;
CCGetCustomerResponseDO ccGetCustomerResponseDO = ccGetCustomerDAO.getResponseDO(tpCustomerId);
println "ccGetCustomerResponseDO : "+ccGetCustomerResponseDO;
//End of Code Snippet

Exectuion 1:
1) Initially (while starting SoapUIWorkspace) I verified the console it is says 28 scripts loaded.

2) Executed above script  and it throws following exception
Tue Dec 02 21:37:31 PST 2008:ERROR:org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'com.intuit.customercentral.soapui.dao.CCGetCustomerResponseDO@6e4e82' with class 'com.intuit.customercentral.soapui.dao.CCGetCustomerResponseDO' to class 'com.intuit.customercentral.soapui.dao.CCGetCustomerResponseDO'


Execution 2:
1) Kept SoapUI Workspace As running

2) touched/modified the CCGetCustomerDAO

3) Verified the Console  again all the 28 scripts are loaded.

4) Executed above code - every thing working fine.


Execution #3
1) Executed from  TestRunner  it says same GroovyCaseException as in Execution #1, here i could not have workaround to reload the CCGetCustomerDAO


Could you please let me know what could be the problem with my script.

Thanks
Raju.

2 Replies

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Raju,

    I have no idea what could be causing this. Can you zip up your entire script-library and mail it to me? (ole@eviware.com)

    regards!

    /Ole
    eviware.com