Custom Java Class from jar count load in Graph Execution

Discussion on developing CloverETL engine, transformation components etc.

CloverDM
Posts: 12
Joined: Wed Jan 27, 2016 12:22 pm

Custom Java Class from jar count load in Graph Execution

Postby CloverDM » Thu Apr 21, 2016 10:55 am

Hello Support

We are experincing some wired behaviour when execute a graph
We do have a CustomJavaComponent , we place the .class file which was referenced by the CustomJavaComponent , everything was working as expected,
Today i just created a jar file out of those class files and placed it in tran directory and ran the same graph
Unfortunately , the graph failed with the following exception

Execution failed.
Component [VBatchDBOut:VBATCH_DBOUT_1] initialization failed.
Cannot find class: CustomHelixTransformer
Class with the specified name cannot be found: CustomHelixTransformer
--------------------------------------------------------------------------------------------------------
2016-04-21 09:38:02,775 INFO 3840 [JobFinalizer_3840] Finished Status: ERROR

in an another atemp i tried to place it in lib directory , but the outcome is same error message,

It would be great enough if someone guide us on this ,

Thanks
DM

Jiri
Posts: 4
Joined: Thu Apr 21, 2016 2:53 pm

Re: Custom Java Class from jar count load in Graph Execution

Postby Jiri » Thu Apr 21, 2016 3:05 pm

Hi DM,

Try to add the jar file on the classpath explicitly (in CloverETL Designer right click / Project / Java Build Path / Libraries) and see how that works.

CloverDM
Posts: 12
Joined: Wed Jan 27, 2016 12:22 pm

Re: Custom Java Class from jar count load in Graph Execution

Postby CloverDM » Fri Apr 22, 2016 11:05 am

Thanks Jiri,

It may work providing that you run it on Designer, I will confim it soon ,
But how the .class files will be in classPath when a graph is exected from shell script for example in Production environment ?

Thanks
DM

Jiri
Posts: 4
Joined: Thu Apr 21, 2016 2:53 pm

Re: Custom Java Class from jar count load in Graph Execution

Postby Jiri » Fri Apr 22, 2016 3:09 pm

The class file info is added to .classpath file and it is used by the CloverETL Server then. But this is used only for CloverETL jobs (graphs).

If you are running a shell script as you say, there is no way how CloverETL can know what classpath you want to use (and that it contains some java execution at all) so it is up to you to provide the classpath properly in the script itself (ie -cp switch).

I hope it helps.