1

My problem is that for the program i currently write (ExcelProcessor) i use a library (Apache-POI) that needs the library XML-Beans that contains the class XMLOptions. The problem is that there is another library (XBean) that is outdated and is in the extension directory (JRE/ext) which provides the same class with the difference that there a needed method was named differently... (a corrected typo -.-).(Problem reference:Runtime error in java with apache POI) So since i musn't change the content of the extension directory what is the way to go in order to make the application to run again?

Dependencies:

  • MyApp needs Apache POI
  • Apache POI needs XMLBeans
  • XMLBeans and XBean contain a different version of the org.apache.xmlbeans.XmlOptions
  • XBean is part of the java extension directory

Further information:

  • the resulting application shall be a runnable jar -> no commandline available (for the common user)
  • also the resulting application shall be an osgi(equinox) bundle that means it provides a service that makes the excelprocessor available to a gui. (how to implement that is not content of my question)

So are there any solutions regarding class loading that work from a normal runnable jar as well from being loaded by the osgi framework?

appreciating every answer... preferably nothing like "this is impossible" (if it is, are there workarounds?)

rapus95

Community
  • 1
  • 1
rapus95
  • 31
  • 4
  • Newer versions of XMLBeans should be backwards compatible with classes generated in old ones, so upgrading the version in JRE/ext ought to fix it. Can you try that / clarify why it won't work? – Gagravarr Aug 14 '14 at 19:18
  • the problem is, that i don't have the permission (topic: IT-Service) to change the "setup" of the java vm/extensions since it's a business computer :/ Nevertheless i gonna check/ask whether someone could do that... ty – rapus95 Aug 14 '14 at 20:55

0 Answers0