Reputation: 125
I need to use the @Grab in a Groovy script in SAP Cloud Platform Integration and it gives an error
ClassNotFoundException: org.apache.ivy.core.report.ResolveReport .
Is there a way I can add this kind of dependency or can I load a jar on CPI in another way?
Upvotes: 1
Views: 1496
Reputation: 26
old thread, but basically you download the .jar (just google it) and upload it in the SAP CPI process. Just add it under Resources for the flow as an archive.
Then you just import it like all other libaries. For example you can download Apache Commons Text 1.9 here: https://commons.apache.org/proper/commons-text/download_text.cgi (get the zip, extract the .jar, upload it in SAP CPI resource).
Then in your groovy script, just leave out the @grab and only do the import - for example: import org.apache.commons.text.StringEscapeUtils;
Upvotes: 1
Reputation: 28634
That means you don't have ivy-XXX.jar
in the classpath.
This library included into full groovy package, but it's not in the groovy-all-XXX.jar
that is mainly used for groovy-enabled applications.
Just take ivy-XXX.jar
from groovy package or download from maven central and put into classpath of your application/server.
hopefully, it will work
Upvotes: 0