KNIME crashes due to the second execution of my node

Hello everyone,

I'm developing an integration project of some KEEL algorithms ( in KNIME and I have a strange situation to fix.
I created a classification node that implements the C4.5-C algorithm provided by KEEL software. The C4.5-C algorithm is implemented by the C45.jar files provided by KEEL. The node requires in input 2 datasets (train dataset and test dataset) and gives in output these datasets with the predictions generated by the algorithm. The node works correctly at first start, but at the second start, or when launching another equal node, KNIME crashes (and the SDK gives me a red "null" value on the console).
Debugging I detect that the reason is the Main method of the imported C4.5.jar, but i couldn't fix this problem (I think that is a JVM problem or something like that).
Does anyone know how to fix it? I attach the node at issue.


It would be better if you provided the code rather than a compiled jar without a workflow or documentation with an example input. 

Here you go. I also attach the dataset used in File Reader node.

I wasn't familiar with Keel and it looks interesting to I've had a look at your node and Keel. 

Some comments:

Your workflow is empty but I've just connected the output of the file reader into your node and it seems to reproduce the error you give. 

A few issues:

1) You shuld probably be using temporary folders not creating then removing your own in the eclipse directory. 

2) Each node should have it's own temp file folder so there's not a risk of interfering on multiple nodes running at the same time

3) You are getting a java.lang.NegativeArraySizeException on the second execution and the C45 class then calls System.exit(-1) which terminates the JVM. You can't be letting a jar close the JVM so you will have to either edit the code a recompile the jar or add the source directly into your node. 

I've attached some changes to your plugin. There is now a try catch around the C45.main() and this error is reported to the node error message. 

I've taken the latest keel.Dataset and keel.*.C45 source from the github repo and commented out references to System.exit(-1) that were fired in the C45 class and the reading of datasets.  You should now find it esier to debug. 






Ok, thanks for your help!