I tried to parse an excel file in Java. I used the OSGI framework and I used a karaf container to deploy my application. I found out later that I can parse the file using Apache POI. I tried to use an Osgi wrapper and I put the dependency in the pom file:
<dependency>
<groupId>org.apache.servicemix.bundles</groupId>
<artifactId>org.apache.servicemix.bundles.junit</artifactId>
<version>4.12_1</version>
</dependency>
Using this when I tried parsing the excel file I received the following runtime exception:
Cannot load org.apache.xmlbeans.impl.SchemaTypeSystemImpl: make sure xbean.jar is on the classpath.
After that I added another dependency for xbean, like this:
<dependency>
<groupId>org.apache.servicemix.bundles</groupId>
<artifactId>org.apache.servicemix.bundles.xmlbeans</artifactId>
<version>2.6.0_2</version>
</dependency>
After I added the xbean dependency my bundle has the Installed status because it is missing a dependency from "com.sun.javadoc" and I can't resolve this missing dependency.
How can I add Apache POI in my project? Or how can I parse an excel file more easily?
Thanks.