How do I get Apache POI and JAXB to work together?

后端 未结 1 1842
死守一世寂寞
死守一世寂寞 2021-01-23 21:36
java.lang.ClassNotFoundException: org.apache.xmlbeans.XmlObject

I get that error when I run my code. Ok, that\'s fine - I just forgot to get XMLBeans..

相关标签:
1条回答
  • 2021-01-23 21:59

    XMLBeans is a dependency of Apache POI and POI won't use a different library in it's place. XMLBeans comes packaged in the Apache POI downloads which I have checked, so you should have it available to you. You just need to ensure the xmlbeans jar file is in the java classpath when running your application.

    I have checked the latest POI binary tar.gz file 'poi-bin-3.14.tar.gz' available from http://poi.apache.org/download.html#POI-3.14, extracting the compressed tar archive (I use 7-Zip), you will find xmlbeans-2.6.0.jar in the poi-3.14/ooxml-lib directory.

    0 讨论(0)
提交回复
热议问题