[Ikvm-developers] problems finding files when calling assembly is not the entry assembly
Brought to you by:
jfrijters
|
From: Wallace T. <wal...@gm...> - 2015-06-17 23:31:19
|
I'm using docx4j.net however after speaking to the maintaine he suggested posting here. What I have found is it appears the classloader is having problems finding something(xalan) if you use docx4j.net from a library* that is not the executing assembly*: [WARN] org.docx4j.utils.ResourceUtils - Couldn't get resource: org/docx4j/convert/out/html/docx2xhtml.xslt [ERROR] org.docx4j.convert.out.common.AbstractExporter - Exception exporting package org.docx4j.openpackaging.exceptions.Docx4JException: Exception loading template"org/docx4j/convert/out/html/docx2xhtml.xslt", org/docx4j/convert/out/html/docx2xhtml.xslt not found via classloader. If you move the class with the code in it back into the entry assembly everything works fine. Here is a screenshot that I hope demonstrates the problem: It shows the Class1.cs living in a separate assembly and the error output. http://imgur.com/hJtvwUQ you look at the source for the top level call (ResourceUtils) you will see a call to java <http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b27/java/net/URL.java#URL> .net <http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b27/java/net/URL.java#URL> .URL <http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b27/java/net/URL.java#URL> url = loader.getResource <http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b27/java/lang/ClassLoader.java#ClassLoader.getResource%28java.lang.String%29> (filename); The thread in post instances is the same. Could you please shed some insight? Regards Wal |