Forum Discussion

nhassan1's avatar
nhassan1
Occasional Visitor
10 years ago

java.lang.NoClassDefFoundError: org/apache/tools/ant/BuildException error

I am getting the above error when running this script in SOAPUI-5.2.0

 

 

--------

def ant = new AntBuilder()

 

mp=\'http://mp.com/api/schemas\'; //mp:JobDiagnosticBundleResponse[1]/mp:Filename[1]}' )
def SourceFileName = context.expand( '${JobDiagnosticBundle180#Response#declare namespace mp=\'http://mp.com/api/schemas\'; //mp:JobDiagnosticBundleResponse[1]/mp:Filename[1]}' )


log.info SourceFileName.toString()

 

def DestinationFileName = SourceFileName.toString()[0..-5]
ant.unzip(src:SourceFileName,
                dest:DestinationFileName,
                overwrite:"false")

 

------

 

I have copied the following two files in the bin/ext and bin/lib folders

ant-launcher-1.9.6.jar

apache-ant-1.8.2.jar

 

Further, I guess the CLASSPATH is also correctly configured. See below

 

nadeemhassan:/ nadeemh$ pwd

/

nadeemhassan:/ nadeemh$ echo $ANT_HOME

/Users/nadeemh/Applications/apache-ant-1.9.6

nadeemhassan:/ nadeemh$

nadeemhassan:/ nadeemh$ echo $JAVA_HOME

/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home

 

 

Please advise....

Thanks in advance.

 

No RepliesBe the first to reply