Custom processor generating custom events getting java.lang.NoClassDefFoundError

asked 2020-07-22 15:24:07 -0500

ajviradia gravatar image

I am working on custom processor (FileReaderProcessor) which generates events at start and end of the processing. I am using IntelliJ IDE for development. During unit testing of this processor it is successfully able to generate the events.

I'm running SDC 3.15.0 in a Docker container (the streamsets/datacollector:3.15.0 image from Docker Hub) However when I installed this custom processor in the Streamsets and when used it in pipeline, it throws runtime error :

java.lang.NoClassDefFoundError: Could not initialize class
at com.streamsets.pipeline.api.base.SingleLaneRecordProcessor.process(
at com.streamsets.pipeline.api.base.SingleLaneProcessor.process(
at com.streamsets.datacollector.runner.StageRuntime.lambda$execute$2(
at com.streamsets.datacollector.runner.StageRuntime.execute(
at com.streamsets.datacollector.runner.StageRuntime.execute(
at com.streamsets.datacollector.runner.StagePipe.process(
at java.util.concurrent.Executors$ ....

It seems that the GenEvent class which holds the custom event is not found. I confirmed that it is in the packaged jar which is installed.

Any help or pointers are appreciated. Thanks.

edit retag flag offensive close merge delete


Can you grant or have you already granted to the directory where the custom stage is located?

iamontheinet gravatar imageiamontheinet ( 2020-07-24 00:50:50 -0500 )edit

Yes. Since there is no error in reference to access permission reading/loading the jar, the issue doesn't seem to be it. Since the class for the processor FileReaderProcessor.class and the GenEvent.class in the same folder within the jar, my expectation is that Streamsets would be able load both.

ajviradia gravatar imageajviradia ( 2020-07-24 13:20:58 -0500 )edit