Unable to load Aspose Words 19.3 as OSGI bundle

Hello,

I’m trying to use Aspose Words 19.3 as OSGI module in Liferay 7.0.6 GA7 but module can’t be loaded. Getting this error:

2019-04-04 04:59:30.221 ERROR [fileinstall-/liferay/liferay-7.0.6-ga7/osgi/modules][org_apache_felix_fileinstall:97] Failed to install artifact: \liferay\liferay-7.0.6-ga7\osgi\modules\aspose-words-19.3-jdk17.jar 
java.io.IOException: Resetting to invalid mark
	at java.io.BufferedInputStream.reset(BufferedInputStream.java:448)
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.installOrUpdateBundle(DirectoryWatcher.java:1033)
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:952)
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:871)
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:485)
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361)
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312)

Can you explain me how can I do load it correctly, or what i’m doing wrong (may be). Thanks a lot!

@Tzukos

To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word document.
  • Please share the IDE you are using e.g. IntelliJ or Eclipse.
  • Please create a simple OSGI application ( source code without compilation errors ) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

Hello,

Investigation steps:

  1. Download Liferay CE 7.0.6 GA7 (https://sourceforge.net/projects/lportal/files/Liferay%20Portal/7.0.6%20GA7/) tomcat bundle.
  2. Download Aspose Words jar (19.3-jdk7) from your repo.
  3. Try to deploy Aspose Words as bundle.

Expected: Bundle deployed and started succesfully.

What we get: Bundle not deployed, this error in log:

2019-04-04 04:59:30.221 ERROR [fileinstall-/liferay/liferay-7.0.6-ga7/osgi/modules][org_apache_felix_fileinstall:97] Failed to install artifact: \liferay\liferay-7.0.6-ga7\osgi\modules\aspose-words-19.3-jdk17.jar
java.io.IOException: Resetting to invalid mark
at java.io.BufferedInputStream.reset(BufferedInputStream.java:448)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.installOrUpdateBundle(DirectoryWatcher.java:1033)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:952)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:871)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:485)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312)

Thank you!

@Tzukos

We are setting up Liferay Portal at our end and will test this scenario. We will get back to you soon.

@Tzukos

Thanks for your patience. We need following detail for further testing. Please share it.

  • Please share the IDE you are using e.g. IntelliJ or Eclipse.
  • Please shape the sample OSGI application that you are using at your end.
  • Please share the Tomcat version.

Thanks for your cooperation.

Hello,

  1. My IDE is Eclipse Photon Release (4.8.0)
  2. There is no sample osgi application, I tried to deploy jar (aspose-words-19.3-jdk17.jar) as osgi bundle in Liferay 7.0.6 GA7 (just start Liferay and copy jar file in deploy directory)
  3. Tomcat version is 8.0.32.

@Tzukos

Thanks for sharing the detail. We started the Liferay and put the Aspose.Words’ Jar file in depoly directory and faced the same issue. However, we do not think, it is a bug in Aspose.Words because the JAR file is not OSGI bundle. Please create sample application as OSGI bundle, write some code of Aspose.Words and then deploy application in Liferay.

Hello,

I solved issue. Thank you!

@Tzukos

Thanks for your feedback. It is nice to hear from you that your problem has been solved. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.