JHoreczky
13 years agoContributor
class cast exception mystery in SoapUI Pro 4.5.0
Hello SmartBear support team,
I am trying to cast an object in a Groovy script when the following exception occurs:
Tue Jul 10 23:44:44 MDT 2012:ERROR:org.codehaus.groovy.runtime.typehandling.GroovyCastException
The object to be cast and the from Class type and to Class type are all identical. Why does the exception happen then?
Thanks,
Joseph H.
Below is the full stack trace:
Cannot cast object 'com.aaa.togw.services.loopqual.clientsharedobjects.TogwLoopQualTierRespDto@15651e7'
with class 'com.aaa.togw.services.loopqual.clientsharedobjects.TogwLoopQualTierRespDto'
to class 'com.aaa.togw.services.loopqual.clientsharedobjects.TogwLoopQualTierRespDto'
at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType(DefaultTypeTransformation.java:331)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.castToType(ScriptBytecodeAdapter.java:599)
at Script31.run(Script31.groovy:17)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:96)
at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SourceFile:89)
at com.eviware.soapui.eventhandlers.support.DefaultSoapUIScript.invoke(SourceFile:47)
at com.eviware.soapui.eventhandlers.support.DefaultSoapUIEventHandler.invoke(SourceFile:29)
at com.eviware.soapui.eventhandlers.support.AbstractEventHandlerMetaData.invokeHandlers(SourceFile:73)
at com.eviware.soapui.eventhandlers.support.AbstractEventHandlerMetaData.invokeHandlers(SourceFile:49)
at com.eviware.soapui.eventhandlers.impl.EventHandlersRequestFilter.afterRequest(SourceFile:28)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:307)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:123)
I am trying to cast an object in a Groovy script when the following exception occurs:
Tue Jul 10 23:44:44 MDT 2012:ERROR:org.codehaus.groovy.runtime.typehandling.GroovyCastException
The object to be cast and the from Class type and to Class type are all identical. Why does the exception happen then?
Thanks,
Joseph H.
Below is the full stack trace:
Cannot cast object 'com.aaa.togw.services.loopqual.clientsharedobjects.TogwLoopQualTierRespDto@15651e7'
with class 'com.aaa.togw.services.loopqual.clientsharedobjects.TogwLoopQualTierRespDto'
to class 'com.aaa.togw.services.loopqual.clientsharedobjects.TogwLoopQualTierRespDto'
at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType(DefaultTypeTransformation.java:331)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.castToType(ScriptBytecodeAdapter.java:599)
at Script31.run(Script31.groovy:17)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:96)
at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SourceFile:89)
at com.eviware.soapui.eventhandlers.support.DefaultSoapUIScript.invoke(SourceFile:47)
at com.eviware.soapui.eventhandlers.support.DefaultSoapUIEventHandler.invoke(SourceFile:29)
at com.eviware.soapui.eventhandlers.support.AbstractEventHandlerMetaData.invokeHandlers(SourceFile:73)
at com.eviware.soapui.eventhandlers.support.AbstractEventHandlerMetaData.invokeHandlers(SourceFile:49)
at com.eviware.soapui.eventhandlers.impl.EventHandlersRequestFilter.afterRequest(SourceFile:28)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:307)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:123)