Forum Discussion

Sugumar22's avatar
Sugumar22
Occasional Contributor
4 years ago
Solved

Updated the Ready API from 3.2.5 to 3.3.1, Facing org.codehaus.groovy.control.MultipleCompilationErr

Hi,

 

Recently I've updated the ReadyAPI from 3.2.5 to 3.3.1 and when we are executing our groovy scripts, we are facing the below error:

 

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script2.groovy: 357: unable to resolve class log.info @ line 357, column 11. log.info Pass=(context.expand('${RNL_MTA_ALL#ID}') + "|" + context.expand( '${RNL_MTA_ALL#Renewal Offer}' ) + "|" + payment + "|" + product_type + "|" + context.expand( '${RNL_MTA_ALL#ExCover_type}' ) + "|" + name + "|" + element + "| " + RadarValue ) ^ org.codehaus.groovy.syntax.SyntaxException: unable to resolve class log.info @ line 357, column 11. at org.codehaus.groovy.ast.ClassCodeVisitorSupport.addError(ClassCodeVisitorSupport.java:262) at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:349) at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:456) at org.codehaus.groovy.control.ResolveVisitor.transformVariableExpression(ResolveVisitor.java:1143) at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:888) at org.codehaus.groovy.control.ResolveVisitor.transformDeclarationExpression(ResolveVisitor.java:1292) at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:892) at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitExpressionStatement(ClassCodeExpressionTransformer.java:108) at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40) at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:86) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:164) at org.codehaus.groovy.control.ResolveVisitor.visitBlockStatement(ResolveVisitor.java:1564) at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:138) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:111) at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitConstructorOrMethod(ClassCodeExpressionTransformer.java:66) at org.codehaus.groovy.control.ResolveVisitor.visitConstructorOrMethod(ResolveVisitor.java:293) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:106) at org.codehaus.groovy.ast.ClassNode.visitMethods(ClassNode.java:1108) at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1101) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:52) at org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:1473) at org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:261) at

 

But the script was working perfectly before the update.

I've verified the \ReadyAPI-3.3.1\bin\ext folder and i could see the below jar files. please let me if anything needs to add.

 

Thanks in Advance 

 

 

 

 

 

  • Hi Sugumar22 , I found your support ticket regarding this issue, and I see that it was resolved after installing the new version of ReadyAPI (3.3.2). Glad to hear this!

5 Replies

  • richie's avatar
    richie
    Community Hero
    Hey Sugumar22,

    Other forum members have posted issues relating to date functions no longer working in their groovy scripts in the latest ReadyAPI! and it appears this is cos the java version has been updated and it appears some libraries may have been deprecated, so i suspect this could be the cause of your issue also.

    If you can supply one of the groovyscripts that is generating the compile time errors youre seeing, then one of the good groovy coders on here (e.g. nmrao, HimanshuTayal, groovyguy, etc.) should be able to help nail down a fix for this. I'd suggest no one will be able to help without seeing your groovy however.

    Nice one,

    Rich