I am getting following exception
java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:330)
at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:263)
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:318)
at java.util.jar.JarVerifier.update(JarVerifier.java:230)
at java.util.jar.JarFile.initializeVerifier(JarFile.java:383)
at java.util.jar.JarFile.getInputStream(JarFile.java:450)
at sun.misc.URLClassPath$JarLoader$2.getInputStream(URLClassPath.java:977)
at sun.misc.Resource.cachedInputStream(Resource.java:77)
at sun.misc.Resource.getByteBuffer(Resource.java:160)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:454)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)
Error: A JNI error has occurred, please check your installation and try again
Exception in thread “main”
when trying to Convert Word file to PDF in my Signed Jar.
Thanks for your inquiry. Please ZIP and upload your input Word document you are getting this problem with here for testing. We will investigate the issue on our end and provide you more information.
When i am Debugging the App it Works fine without any issues with all different files, but when i am exporting my java app as executable jar then i am not able to convert and getting this Exception i mentioned.
Also please note that i am using the Trial library.
This does not seem to be an issue with Aspose.Words. Can you please remove Aspose.Words JAR reference from your project and related code? After that export Java app as executable JAR and see how it goes?
I am afraid, the root cause of this problem is unclear to us. Aspose.Words’ JAR contains META-INF\Manifest.mf file. The file contains signatures of all files included in the JAR. The error may be emitted if you changed/modified some of the files (original signature became invalid).
Please remove old JAR of Aspose.Words for Java from your application and then do a fresh installation of latest version of Aspose.Words for Java via Maven. This should resolve this issue on your end.
We are using jdk version jdk1.8.0_151, code we are writing using intelij to create our jar.
As per instruction, we have removed old jar files and downloaded new files from provide link Installation|Aspose.Words for Java. but giving security exception…
Could you please send us demo project using your lib and working that libs after generating jar?