I am using the dom4j-1.6.1.jar library in a custom component, but my JBoss server has dom4j.jar in jboss\server\all\lib. My custom component is throwing the following error:
DefFoundError message:org/dom4j/xpath/DefaultXPath while invoking service XmlToCsvService and operation convert and no fault routes were found to be configured.
This makes me suspect that the version of Dom4J in the lib directory of the server is taking precedence over the one in my component. Any suggestions for how to deal with this? Thanks.
Jared Langdon
Solved! Go to Solution.
Views
Replies
Total Likes
Even Marcel's suggestion may not always work, but it certainly is worth a quick try. I seem to remember trying that and finding that one of the LiveCycle EAR files has a version of dom4j buried inside it (I don't remember which version of LC it was).
Of course altering an Adobe supplied EAR is not recommended and may violate your support ageement. There is an alternative, however; if changing the JBoss lib folder doesn't work. To avoid the conflict you can use JarJar to rename the packages within the DOM4J class and deploy the renamed jar with your component to avoid the conflict.
http://code.google.com/p/jarjar/
You would then use the renamed classes in your component:
import org.mypackage.dom4j.Document;
import org.mypackage.dom4j.DocumentException;
import org.mypackage.dom4j.DocumentHelper;
import org.mypackage.dom4j.Element;
import org.mypackage.dom4j.Node;
import org.mypackage.dom4j.io.DOMReader;
import org.mypackage.dom4j.io.DOMWriter;
Views
Replies
Total Likes
Jared,
You can't have 2 versions of DOM4J versions.
The only way I know to make this work is to replace the dom4j.jar that is in the jboss/lib folder with the dom4j-full.jar you want to use.
Even Marcel's suggestion may not always work, but it certainly is worth a quick try. I seem to remember trying that and finding that one of the LiveCycle EAR files has a version of dom4j buried inside it (I don't remember which version of LC it was).
Of course altering an Adobe supplied EAR is not recommended and may violate your support ageement. There is an alternative, however; if changing the JBoss lib folder doesn't work. To avoid the conflict you can use JarJar to rename the packages within the DOM4J class and deploy the renamed jar with your component to avoid the conflict.
http://code.google.com/p/jarjar/
You would then use the renamed classes in your component:
import org.mypackage.dom4j.Document;
import org.mypackage.dom4j.DocumentException;
import org.mypackage.dom4j.DocumentHelper;
import org.mypackage.dom4j.Element;
import org.mypackage.dom4j.Node;
import org.mypackage.dom4j.io.DOMReader;
import org.mypackage.dom4j.io.DOMWriter;
Views
Replies
Total Likes
Many thanks to both of you for your quick replies.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies