Problems running graphs from Tomcat Servlet

The graph I am trying to run has several sub-graphs and command line execution steps.

If I run the graph from Eclipse or the command line it runs fine, but when I attempt to run it from tomcat I get various errors:

if I use “runGraph(graphFileName, pluginDirs, propertiesFileName);” I get an error on the first sub-graph step saying “java.lang.NoClassDefFoundError: org/jetel/main/runGraph”

I tried adding an alternate Java Command line that includes the classpath but for some reason the graph ignores that and still uses “java -cp C:\Tomcat 6.0\bin\bootstrap.jar;C:\Program Files\Java\jdk1.6.0_10\lib\tools.jar org.jetel.main.runGraph […]” which does not contain runGraph

Then, figuring that as it works fine form the command line, I should just do a Runtime.exec command to run the graph manually.

This gives the error: “java.lang.ClassNotFoundException: SYS_EXECUTE” for the first step that has a command line instruction.
I double-checked the system settings, there is no default classpath, and even though none of it was relevant to the class in question, I also added the entire Path to the classpath parameter, to no avail.

version/system information:
*** CloverETL framework/transformation graph, (c) 2002-2010 Javlin a.s, released under GNU Lesser General Public License ***
Running with CloverETL library version 2.9.1 compiled 19/02/2010 11:53:16
Running on 2 CPU(s), OS Windows XP, architecture x86, Java version 1.6.0_10-rc, max available memory for JVM 65088 KB

I’m using a custom component created by a third party (Initiate), so I do not know how feasible it would be to upgrade to a newer version.

Hello,
what do you mean by sub-graphs? If you run graphs from RunGraph component try to set attribute sameInstance=“true”.
Or you run the graph from the java code? From your web application? runGraph(graphFileName, pluginDirs, propertiesFileName) is method in some java object?

There is one ‘flow control graph’ that will direct data through several steps including 6 multi-threaded sub-graphs(up to 20 threads each). The process was broken up like this because of frequent out of memory errors while processing large files(dozens to hundreds of MB).

I am now attempting to integrate this mostly manual process by attaching the graph to a web front-end that is already being used to submit files for processing.

I’ll try running the sub-graphs as part of the same instance, but if that is the only way to fix this problem, the automation will probably only work for smaller files(better than nothing, but not the desired goal).

Thanks for the suggestion.

Hello,
the RunGraph component for running graphs in different jvm can be replaced with SystemExecute and clover(.bat) script.
Following is the linux version:

<Node id="SYS_EXECUTE0" interpreter="xargs sh ${}" type="SYS_EXECUTE">
<attr name="command"><![CDATA[cd <path_to_the_project_with_graph_to_run>
<path_to_the _CloverETL_Designer_directory>/lib/bin/clover $1]]></attr>
</Node>

You can also download xargs for Windows(http://gnuwin32.sourceforge.net/packages/findutils.htm) and then the node should look as follows:


<Node id="SYS_EXECUTE0" interpreter="C:/GnuWin32/bin/xargs ${}" type="SYS_EXECUTE">
<attr name="command"><![CDATA[cd <path_to_the_project_with_graph_to_run>
<path_to_the _CloverETL_Designer_directory>/lib/bin/clover.bat %1]]></attr>
</Node>

In both cases graph name flows through input port.

<path_to_the _CloverETL_Designer_directory> should be something like D:/eclipse/plugins/com.cloveretl.gui_X.X.X