KNIME not finding nested jar

Hello,

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(MatlabToolFilterNodeModel.java:173)
at org.knime.core.node.NodeModel.executeModel(NodeModel.java:410)
at org.knime.core.node.Node.execute(Node.java:653)
at org.knime.core.node.workflow.SingleNodeContainer.executeNode(SingleNodeContainer.java:587)
at org.knime.core.node.workflow.SingleNodeContainer.access$1(SingleNodeContainer.java:561)
at org.knime.core.node.workflow.SingleNodeContainer$1.run(SingleNodeContainer.java:446)
at org.knime.core.node.workflow.JobRunnable.run(JobRunnable.java:43)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:98)
at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:166)

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 build.properties, .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…