Using Xpath in Dom4j

后端 未结 5 980
悲哀的现实
悲哀的现实 2021-02-12 12:22

I get the following exception when trying to access any nodes of a parsed xml document on dom4j:

Exception in thread \"main\" java.lang.NoClassDefFoundError: or         


        
5条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-12 13:01

    In the unlikely event that anyone else should encounter this issue in JBoss Fuse I'll add what solved my problem:

    You will need to wrap both the jaxen- and the dom4j jars as OSGi-bundles.

    osgi:install -s wrap:mvn:jaxen/jaxen/1.1-beta-6
    osgi:install -s wrap:mvn:dom4j/dom4j/1.6.1
    

    In that particular order, as I found out the hard way. I had already wrapped the dom4j jar and simply adding the jaxen jar after the fact was unsuccessful.

提交回复
热议问题