KNIME not finding nested jar


I was using a third party jar file, jmatio.jar in some node extensions. As the classes and functions in this jar were always used in the same way, I decided to make my life easier by writing a wrapper class.

I did. I created a new class that included jmatio.jar in its libs directory, added it to the classpath, etc. I thus created myjmatio.jar jar file including my wrapper class and jmatio.jar.

But when I integrated myjmatio.jar into my nodes, it happened that the inner jar could not be accessed. In fact, I got:

2009-09-09 20:47:40,813 DEBUG KNIME-Worker-0 Data Dynamic Filtering : Execute failed: com/jmatio/types/MLArray
java.lang.NoClassDefFoundError: com/jmatio/types/MLArray
at com.everis.ug13.matlabtoolfilter.MatlabToolFilterNodeModel.execute(
at org.knime.core.node.NodeModel.executeModel(
at org.knime.core.node.Node.execute(
at org.knime.core.node.workflow.SingleNodeContainer.executeNode(
at org.knime.core.node.workflow.SingleNodeContainer.access$1(
at org.knime.core.node.workflow.SingleNodeContainer$
at java.util.concurrent.Executors$ Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at Source)
at org.knime.core.util.ThreadPool$
at org.knime.core.util.ThreadPool$

This is, a class within the inner jar file could no longer be accessed.

Am I doing something wrong? Do I have to add the inner jar into the build path, etc.? Any advice?

Thank you very much for your help,

Carlos J. Gil Bellosta

Hi Carlos,

Could you explain what does etc means here: added it to the classpath, etc?
It would be helpful if you would copy the relevant parts from the, .classpath, MANIFEST.MF file.
(It is not clear for me whether this problem occurs when you run it from eclipse, or when using the exported plugin.)
Thanks, gabor

If I understood correctly, you have a Jar file inside another Jar file? That cannot work.

Thanks, Thor. I learned about the impossibility of packaging jars within jars the hard way…