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 com.abc.xyz.stage.processor.custom.GenEvent
at com.pwc.gms.stage.processor.custom.FileReaderProcessor.process(FileReaderProcessor.java:90)
at com.streamsets.pipeline.api.base.SingleLaneRecordProcessor.process(SingleLaneRecordProcessor.java:53)
at com.streamsets.pipeline.api.base.SingleLaneProcessor.process(SingleLaneProcessor.java:95)
at com.streamsets.datacollector.runner.StageRuntime.lambda$execute$2(StageRuntime.java:299)
at com.streamsets.datacollector.runner.StageRuntime.execute(StageRuntime.java:244)
at com.streamsets.datacollector.runner.StageRuntime.execute(StageRuntime.java:311)
at com.streamsets.datacollector.runner.StagePipe.process(StagePipe.java:220)
current.CompletableFuture$Completion.run(CompletableFuture.java:442)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ....

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

Comments

Can you grant or have you already granted java.security.AllPermission 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