Forum Discussion
15 years ago
Hi,
I'm facing similar problem.
My project needs to execute a groovy script which performs actions on a browser and I have used selenium's 'selenium-java-client-driver.jar' in my soapUI project to achieve this (by placing the jar in C:\Program Files\eviware\soapUI-4.0.0\bin\ext). But when I execute the script it throws the following error -
Thu Jul 28 11:13:21 IST 2011:ERROR:groovy.lang.GroovyRuntimeException: Failed to create Script instance for class: class com.example.tests.Untitled. Reason: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'org.apache.log4j.Logger@6864d6' with class 'org.apache.log4j.Logger' to class 'java.util.logging.Logger'
groovy.lang.GroovyRuntimeException: Failed to create Script instance for class: class com.example.tests.Untitled. Reason: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'org.apache.log4j.Logger@6864d6' with class 'org.apache.log4j.Logger' to class 'java.util.logging.Logger'
at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:430)
at groovy.lang.GroovyShell.parse(GroovyShell.java:743)
at groovy.lang.GroovyShell.parse(GroovyShell.java:770)
at groovy.lang.GroovyShell.parse(GroovyShell.java:761)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.compile(SoapUIGroovyScriptEngine.java:148)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:93)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:148)
at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:274)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'org.apache.log4j.Logger@6864d6' with class 'org.apache.log4j.Logger' to class 'java.util.logging.Logger'
at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType(DefaultTypeTransformation.java:331)
at org.codehaus.groovy.reflection.CachedField.setProperty(CachedField.java:65)
at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:2356)
at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:3312)
at org.codehaus.groovy.runtime.InvokerHelper.setProperties(InvokerHelper.java:450)
at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:427)
... 10 more
Thu Jul 28 11:48:41 IST 2011:ERROR:groovy.lang.GroovyRuntimeException: Failed to create Script instance for class: class com.example.tests.Untitled. Reason: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'org.apache.log4j.Logger@6864d6' with class 'org.apache.log4j.Logger' to class 'java.util.logging.Logger'
groovy.lang.GroovyRuntimeException: Failed to create Script instance for class: class com.example.tests.Untitled. Reason: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'org.apache.log4j.Logger@6864d6' with class 'org.apache.log4j.Logger' to class 'java.util.logging.Logger'
at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:430)
at groovy.lang.GroovyShell.parse(GroovyShell.java:743)
at groovy.lang.GroovyShell.parse(GroovyShell.java:770)
at groovy.lang.GroovyShell.parse(GroovyShell.java:761)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.compile(SoapUIGroovyScriptEngine.java:148)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:93)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:148)
at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:274)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'org.apache.log4j.Logger@6864d6' with class 'org.apache.log4j.Logger' to class 'java.util.logging.Logger'
at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType(DefaultTypeTransformation.java:331)
at org.codehaus.groovy.reflection.CachedField.setProperty(CachedField.java:65)
at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:2356)
at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:3312)
at org.codehaus.groovy.runtime.InvokerHelper.setProperties(InvokerHelper.java:450)
at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:427)
... 10 more
Can somebody please help me in resoling this problem?
I have attached the project file and the jar file I have used to execute the Groovy script.
Thanks,
Shashi
I'm facing similar problem.
My project needs to execute a groovy script which performs actions on a browser and I have used selenium's 'selenium-java-client-driver.jar' in my soapUI project to achieve this (by placing the jar in C:\Program Files\eviware\soapUI-4.0.0\bin\ext). But when I execute the script it throws the following error -
Thu Jul 28 11:13:21 IST 2011:ERROR:groovy.lang.GroovyRuntimeException: Failed to create Script instance for class: class com.example.tests.Untitled. Reason: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'org.apache.log4j.Logger@6864d6' with class 'org.apache.log4j.Logger' to class 'java.util.logging.Logger'
groovy.lang.GroovyRuntimeException: Failed to create Script instance for class: class com.example.tests.Untitled. Reason: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'org.apache.log4j.Logger@6864d6' with class 'org.apache.log4j.Logger' to class 'java.util.logging.Logger'
at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:430)
at groovy.lang.GroovyShell.parse(GroovyShell.java:743)
at groovy.lang.GroovyShell.parse(GroovyShell.java:770)
at groovy.lang.GroovyShell.parse(GroovyShell.java:761)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.compile(SoapUIGroovyScriptEngine.java:148)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:93)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:148)
at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:274)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'org.apache.log4j.Logger@6864d6' with class 'org.apache.log4j.Logger' to class 'java.util.logging.Logger'
at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType(DefaultTypeTransformation.java:331)
at org.codehaus.groovy.reflection.CachedField.setProperty(CachedField.java:65)
at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:2356)
at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:3312)
at org.codehaus.groovy.runtime.InvokerHelper.setProperties(InvokerHelper.java:450)
at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:427)
... 10 more
Thu Jul 28 11:48:41 IST 2011:ERROR:groovy.lang.GroovyRuntimeException: Failed to create Script instance for class: class com.example.tests.Untitled. Reason: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'org.apache.log4j.Logger@6864d6' with class 'org.apache.log4j.Logger' to class 'java.util.logging.Logger'
groovy.lang.GroovyRuntimeException: Failed to create Script instance for class: class com.example.tests.Untitled. Reason: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'org.apache.log4j.Logger@6864d6' with class 'org.apache.log4j.Logger' to class 'java.util.logging.Logger'
at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:430)
at groovy.lang.GroovyShell.parse(GroovyShell.java:743)
at groovy.lang.GroovyShell.parse(GroovyShell.java:770)
at groovy.lang.GroovyShell.parse(GroovyShell.java:761)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.compile(SoapUIGroovyScriptEngine.java:148)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:93)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:148)
at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:274)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'org.apache.log4j.Logger@6864d6' with class 'org.apache.log4j.Logger' to class 'java.util.logging.Logger'
at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType(DefaultTypeTransformation.java:331)
at org.codehaus.groovy.reflection.CachedField.setProperty(CachedField.java:65)
at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:2356)
at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:3312)
at org.codehaus.groovy.runtime.InvokerHelper.setProperties(InvokerHelper.java:450)
at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:427)
... 10 more
Can somebody please help me in resoling this problem?
I have attached the project file and the jar file I have used to execute the Groovy script.
Thanks,
Shashi