2
votes

We are using Install4J version for creating an installer. During install, install4j throws the below exception during unpacking. Because of this the jar files bundled is getting extracted partially (size and cheksum both doesn't match) and the application is not working.

How to debug this issue ?

I started install with the flag

-Dinstall4j.debug=true -Dinstall4j.logToStderr=true

but it's not giving much information and we use Java 8 and Ubuntu

java.io.IOException: null ref
    at com.sun.java.util.jar.pack.NativeUnpack.getNextFile(Native Method)
    at com.sun.java.util.jar.pack.NativeUnpack.run(NativeUnpack.java:215)
    at com.sun.java.util.jar.pack.NativeUnpack.run(NativeUnpack.java:247)
    at com.sun.java.util.jar.pack.UnpackerImpl.unpack(UnpackerImpl.java:138)
    at com.sun.java.util.jar.pack.UnpackerImpl.unpack(UnpackerImpl.java:174)
    at com.install4j.runtime.installer.helper.Unpacker.unpack(Unpacker.java:55)
    at com.install4j.runtime.installer.InstallerContextImpl.unpackAdditionalUserFiles(InstallerContextImpl.java:265)
    at com.install4j.runtime.installer.InstallerContextImpl.checkStart(InstallerContextImpl.java:230)
    at com.install4j.runtime.installer.controller.Controller.start(Controller.java:59)
    at com.install4j.runtime.installer.Installer.runInProcess(Installer.java:41)
    at com.install4j.runtime.installer.Installer.main(Installer.java:28)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:62)
    at com.install4j.runtime.launcher.UnixLauncher.main(UnixLauncher.java:57)

[INFO] com.install4j.runtime.beans.actions.misc.RequestPrivilegesAction [ID 13]: Execute action

1

1 Answers

0
votes

The Pack200 decompression fails for one of the JAR files in the "Installer->Custom Code & Resources" list.

You may need to unjar it and jar it again.

Contact [email protected] for a build that prints the name of the file where the unpacking fails.