Rollup java transofrmation + madapi.jar

Hello, long time no see.
Some of you may remember me from Initiate Systems where I worked to integrate CloverETL into the product.
I am currently facing a class-path related issues (I think). I have a custom Rollup transformation class, which requires the use of madapi.jar. This jar is already in the Clover’s path, since the Initiate MEMGET flow depends on this jar being accessible. But when I execute the graph via command line I get the following error:
Reason: Cannot compile the transformation code!
at org.jetel.graph.Phase.init(Phase.java:160)
. . . . . .
Caused by:
java.lang.RuntimeException: org.codehaus.janino.CompileException: Line 264, Column 73: Imported class “madison.mpi.MemAttrRow” could not be loaded

madison.mpi.MemAttrRow is in the madapi.jar.

I tried passing a custom classpath entry to the graph, but it doe snot seem to work either:
DEBUG [main] - Graph properties: {port=16000, fail=false, user=system, mad.etl.graph.file=C:\dev\Deloitte\workspace10\Deloitte.v10\graphs\memPut.grf, basedir=C:\dev\Deloitte\workspace10\Deloitte.v10\graphs, classUrl=C:/dev/Deloitte/workspace10/Deloitte.v10/src/com/ibm/initiate/clover/IBMRollup.java, mad.etl.config.file=C:\dev\Deloitte\workspace10\Deloitte.v10\graphs\recordfile.properties, mad.etl.graph.addlargs=executor.classpath C:/dev/soft/Engine10.0.0.73/cloveretl/plugins/com.initiatesystems.etl/lib/madapi.jar, mad.etl.heap.megabytes=256, pass=system, host=localhost}

I thank you for any assistance you can offer.

Hello Vadim,

nice to hear you again :slight_smile: Regarding your issue, I see you are still using archaic Clover version, hard to guess exact version. At least few years we don’t use janino library for runtime compilation. Would it be possible to compile your custom code for Rollup component manually and use the resulted class file instead of java file? Just ensure the transformation is part of classpath of whole clover. This seems to be easiest way how to solve the issue for now. Let me know whether this solution is acceptable for you.

Martin Zatopek

Hello Vadim,

nice to hear you again :slight_smile: Regarding your issue, I see you are still using archaic Clover version, hard to guess exact version. At least few years we don’t use janino library for runtime compilation. Would it be possible to compile your custom code for Rollup component manually and use the resulted class file instead of java file? Just ensure the transformation is part of classpath of whole clover. This seems to be easiest way how to solve the issue for now. Let me know whether this solution is acceptable for you.

Martin Zatopek

“mzatopek”

Hello hello, familiar faces :slight_smile: Yes this is a rather old version: 2.9.7.
Thank you for a quick response, but I am still facing an issue. Here is what I have done:

Changed the Rollup class to have no package designation.
Changed the Rollup component to use class instead of a path to java file.
Added the madapi.jar and the path to the folder containing the IBMRollup.class to the system’s CLASSPATH variable.
Added the executor.classpath to point to the location of the IBMRollup.class
Verified that the IBMRollup.class is reachable (home grown JWhich program, which looks for classes in the classpath and tells me where (including jar names) from where a particular class is loaded).

Here is the debug with parameters:
INFO [main] - [IBMInitiateConnection0] … OK
DEBUG [main] - Graph properties: {port=16000, fail=false, user=system, mad.etl.graph.file=C:\dev\Deloitte\workspace10\Deloitte.v10\graphs\memPut.grf, basedir=C:\dev\Deloitte\workspace10\Deloitte.v10\graphs, classUrl=C:/dev/Deloitte/workspace10/Deloitte.v10/src/com/ibm/initiate/clover/IBMRollup.java, mad.etl.config.file=C:/dev/Deloitte/workspace10/Deloitte.v10/graphs/recordfile.properties, mad.etl.graph.addlargs=executor.classpath C:/dev/Deloitte/workspace10/Deloitte.v10/bin, mad.etl.heap.megabytes=256, pass=system, host=localhost}

And I still get:
ERROR [WatchDog] - Phase initialization failed with reason: AttrCompMemPut …FAILED !
Reason: Cannot find the transformation class!
AttrCompMemPut …FAILED !
Reason: Cannot find the transformation class!
at org.jetel.graph.Phase.init(Phase.java:160)
at org.jetel.graph.runtime.WatchDog.executePhase(WatchDog.java:449)
at org.jetel.graph.runtime.WatchDog.call(WatchDog.java:184)
at org.jetel.graph.runtime.WatchDog.call(WatchDog.java:62)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314)
at java.util.concurrent.FutureTask.run(FutureTask.java:149)
at java.lang.Thread.run(Thread.java:736)
Caused by:
Cannot find the transformation class!
at org.jetel.component.Rollup.createTransformFromClassName(Rollup.java:536)
at org.jetel.component.Rollup.init(Rollup.java:472)
at org.jetel.graph.Phase.init(Phase.java:155)
… 6 more
Caused by:
java.lang.ClassNotFoundException: IBMRollup
at java.lang.Class.forName(Class.java:139)
at org.jetel.component.Rollup.createTransformFromClassName(Rollup.java:532)
… 8 more

Verification of the CLASSPATH and location of the IBMRollup.class

C:\dev\soft\Engine10.0.0.73\scripts>dir C:\dev\Deloitte\workspace10\Deloitte.v10\bin
Directory of C:\dev\Deloitte\workspace10\Deloitte.v10\bin

10/16/2012 07:28 AM .
10/16/2012 07:28 AM …
10/15/2012 11:22 AM com
10/15/2012 11:22 AM 1,772 GetHostName.class
10/16/2012 07:28 AM 9,985 IBMRollup.class
2 File(s) 11,757 bytes
3 Dir(s) 69,011,943,424 bytes free

C:\dev\soft\Engine10.0.0.73\scripts>set CLASSPATH
CLASSPATH=C:\dev\myBin\classes;C:\dev\Deloitte\workspace10\Deloitte.v10\bin;C:/dev/soft/Engine10.0.0.73/cloveretl/plugins/com.initiatesystems.etl/lib/madapi.jar

C:\dev\soft\Engine10.0.0.73\scripts>JWhich IBMRollup
Class ‘/IBMRollup.class’ found in
‘/C:/dev/Deloitte/workspace10/Deloitte.v10/bin/IBMRollup.class’

I am happy to report: a solution has been found. The problem was specific to the IBM Initiate integration of Clover and the classloaders used.

Thank you for your help. Thank you very much.