Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

ExecuteGroovyScript gives InstantiationException

avatar

Hello

 

I am trying to add an ExecuteGroovyScript processor. A simple example test works fine, but when I try to add my script it does not initiate. Exception (on hoover over) is really brief: InstantiationException thrown by groovy invokehelper. 

Script uses some external jars. As far as I can see I added those to the classpath. 

 

I am probably doing something stupid but I was wondering how to debug this issue? The log files do not seem to contain anything wrt this error which makes troubleshooting very difficult

 

All tips warmly welcomed!

 

Tx

 

Peter

1 ACCEPTED SOLUTION

avatar

This is quite a broad question and hard to troubleshoot all at once.

 

A general approach: 

 

1. Analyze your custom code and identify all bits of complexity/all dependencies

2. Run the standard example

3. Introduce in a very minimal fashion one complexity/dependency from your custom code into the standard

4. If it works, repeat step 3

 

This should allow you to narrow down exactly what is causing the problem (and hopefully guide the resolution).


- Dennis Jaheruddin

If this answer helped, please mark it as 'solved' and/or if it is valuable for future readers please apply 'kudos'.

View solution in original post

2 REPLIES 2

avatar

This is quite a broad question and hard to troubleshoot all at once.

 

A general approach: 

 

1. Analyze your custom code and identify all bits of complexity/all dependencies

2. Run the standard example

3. Introduce in a very minimal fashion one complexity/dependency from your custom code into the standard

4. If it works, repeat step 3

 

This should allow you to narrow down exactly what is causing the problem (and hopefully guide the resolution).


- Dennis Jaheruddin

If this answer helped, please mark it as 'solved' and/or if it is valuable for future readers please apply 'kudos'.

avatar

Hello,

Tx for your reaction Dennis. I was able to continue. 

The reason I was having issues seemed to be related to the fact that the Groovy script was a standard class with a static main method. It makes sense that Nifi does not accept that I guess, but the process of diagnosing such issue might be made easier imo. It was a trial and error task, and as you suggested, by starting from an example.

Anyway, I am good now 🙂

Regards

Peter