Showing results for 
Search instead for 
Did you mean: 

how to user my .jar file in soapui opensource

Occasional Visitor

how to user my .jar file in soapui opensource

I am not able to use the jar i have written Compilation Error is thrown when trying to import my package. please help on this.


I have written a java class as below:


package com.sriram;

public class ExperimentalClass{

public static String getAuthorName(){

String name = "Sriram";
return name;




and created executable JAR file using eclipse for the above code.


And I have imported the executable JAR to the bin/ext folder and lib folder and restarted soapUI.


But when trying to use the my java class using the below script, The following exception is thrown.

import com.sriram.ExperimentalClass;

String val = ExperimentalClass.getAuthorName(); (val)

Exception thrown is 

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script10.groovy: 1: unable to resolve class com.sriram.ExperimentalClass @ line 1, column 1. import com.sriram.ExperimentalClass; ^ org.codehaus.groovy.syntax.SyntaxException: unable to resolve class com.sriram.ExperimentalClass @ line 1, column 1. at org.codehaus.groovy.ast.ClassCodeVisitorSupport.addError( at org.codehaus.groovy.control.ResolveVisitor.visitClass( at org.codehaus.groovy.control.ResolveVisitor.startResolving( at org.codehaus.groovy.control.CompilationUnit$ at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits( at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation( at org.codehaus.groovy.control.CompilationUnit.compile( at groovy.lang.GroovyClassLoader.doParseClass( at groovy.lang.GroovyClassLoader.parseClass( at groovy.lang.GroovyShell.parseClass( at groovy.lang.GroovyShell.parse( at groovy.lang.GroovyShell.parse( at groovy.lang.GroovyShell.parse( at at at at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$ at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$ Source) at Source) 1 error

Please help on this to correctly import the java class to use it in my code.


Community Leader

Re: how to user my .jar file in soapui opensource

Hi @sriramdvhere,


Hope below link will help you in slving your problem

Creating Script Library In Soapui



Click "Accept as Solution" if my answer has helped, and remember to give "kudos" Smiley Happy

Thanks and Regards,
Himanshu Tayal