Getting java.lang.UnsatisfiedLinkError with install4j 6.1.4 and JRE 1.8.0_121 - install4j

We upgraded to latest JRE/install4j for our minor upgrade installer, and we started getting the following error when we try to use install4j API:
2017-02-17 19:29:42 SEVERE: #{14} [StandardContext.loadOnStartup] Servlet [ConfigServlet] in web application [] threw load() exception
java.lang.UnsatisfiedLinkError: com.install4j.runtime.installer.platform.win32.Common.setWindows95(Z)V
at com.install4j.runtime.installer.platform.win32.Common.setWindows95(Native Method)
at com.install4j.runtime.installer.platform.win32.Common.init(Unknown Source)
at com.install4j.runtime.installer.platform.win32.Misc.<clinit>(Unknown Source)
at com.install4j.api.windows.WinEnvVars.getenv(Unknown Source)
at com.install4j.runtime.installer.helper.InstallerUtil.is64BitWindows(Unknown Source)
at com.install4j.api.Util.is64BitWindows(Unknown Source)
...
We get the same error when we try to launch the uninstaller:
Exception:
java.lang.UnsatisfiedLinkError: com.install4j.runtime.installer.platform.win32.Common.setWindows95(Z)V
at com.install4j.runtime.installer.platform.win32.Common.setWindows95(Native Method)
at com.install4j.runtime.installer.platform.win32.Common.init(Unknown Source)
at com.install4j.runtime.installer.platform.win32.Win32UserInfo.<clinit>(Unknown Source)
at com.install4j.runtime.installer.platform.UserInfo.isAdminGroup(Unknown Source)
at com.install4j.api.Util.isAdminGroup(Unknown Source)
at com.install4j.runtime.installer.InstallerVariables.initAdminRights(Unknown Source)
at com.install4j.runtime.installer.InstallerVariables.initCommandLine(Unknown Source)
at com.install4j.runtime.installer.Uninstaller.getScreenExecutor(Unknown Source)
at com.install4j.runtime.installer.Uninstaller.runInProcess(Unknown Source)
at com.install4j.runtime.installer.Uninstaller.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.exe4j.runtime.WinLauncher.main(Unknown Source)
at com.install4j.runtime.launcher.WinLauncher.main(Unknown Source)
What is causing this?

There is a mismatch between the API JAR file (i4jruntime.jar) and the native library (i4jinst.dll). It seems that you have an old version of i4jruntime.jar in your classpath.

Related

"java.lang.InternalError: Unexpected CryptoAPI failure generating seed" during silent installation

We are installing our product via script for automated UI tests.
Sometimes the installation failes with the following error.
java.lang.InternalError: Unexpected CryptoAPI failure generating seed
at java.base/sun.security.provider.NativeSeedGenerator.getSeedBytes(Unknown Source)
at java.base/sun.security.provider.SeedGenerator.generateSeed(Unknown Source)
at java.base/sun.security.provider.AbstractDrbg.lambda$static$0(Unknown Source)
at java.base/sun.security.provider.AbstractDrbg.getEntropyInput(Unknown Source)
at java.base/sun.security.provider.AbstractDrbg.getEntropyInput(Unknown Source)
at java.base/sun.security.provider.AbstractDrbg.instantiateIfNecessary(Unknown Source)
at java.base/sun.security.provider.AbstractDrbg.engineNextBytes(Unknown Source)
at java.base/sun.security.provider.AbstractDrbg.engineNextBytes(Unknown Source)
at java.base/sun.security.provider.AbstractDrbg$SeederHolder.lambda$static$0(Unknown Source)
at java.base/sun.security.provider.AbstractDrbg.getEntropyInput(Unknown Source)
at java.base/sun.security.provider.AbstractDrbg.getEntropyInput(Unknown Source)
at java.base/sun.security.provider.AbstractDrbg.instantiateIfNecessary(Unknown Source)
at java.base/sun.security.provider.AbstractDrbg.engineNextBytes(Unknown Source)
at java.base/sun.security.provider.AbstractDrbg.engineNextBytes(Unknown Source)
at java.base/sun.security.provider.DRBG.engineNextBytes(Unknown Source)
at java.base/java.security.SecureRandom.nextBytes(Unknown Source)
at java.base/java.security.SecureRandom.next(Unknown Source)
at java.base/java.util.Random.nextLong(Unknown Source)
at java.base/java.io.File$TempDirectory.generateFile(Unknown Source)
at java.base/java.io.File.createTempFile(Unknown Source)
at java.base/java.io.File.createTempFile(Unknown Source)
at com.exe4j.runtime.util.WinDel.scheduleDeletion(WinDel.java:85)
at com.exe4j.runtime.WinLauncher$3.run(WinLauncher.java:118)
Is there any known bug or fix for this?
I had this problem in Oracle Weblogic. Adding the following to the java options helped me
-Djava.security.egd=file:/dev/./urandom

Why does macOS installer built with Install4j 6 throw run-time exception with JRE 10?

I get the following run-time exception running a macOS installer built with Install4j 6.1.6, running with JRE 10.0.2+13:
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.install4j.runtime.installer.Installer.getScreenExecutor(Installer.java:105)
at com.install4j.runtime.installer.Installer.runInProcess(Installer.java:58)
at com.install4j.runtime.installer.Installer.main(Installer.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:65)
at com.install4j.runtime.launcher.MacLauncher.main(MacLauncher.java:67)
Caused by: java.lang.reflect.InvocationTargetException
at java.desktop/java.awt.EventQueue.invokeAndWait(Unknown Source)
at java.desktop/java.awt.EventQueue.invokeAndWait(Unknown Source)
at java.desktop/javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
at com.install4j.runtime.installer.Installer.getScreenExecutor(Installer.java:96)
... 8 more
Caused by: java.lang.NoClassDefFoundError: com/apple/eawt/ApplicationListener
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Unknown Source)
at com.install4j.runtime.installer.frontend.WizardScreenExecutor.<init>(WizardScreenExecutor.java:49)
at com.install4j.runtime.installer.frontend.InstallerWizardScreenExecutor.<init>(InstallerWizardScreenExecutor.java:18)
at com.install4j.runtime.installer.Installer$2.run(Installer.java:99)
at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.EventQueue.access$600(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.apple.eawt.ApplicationListener
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 19 more
The same installer works fine with only JRE 8u161 installed. Is there a way to get around this exception?
install4j 6 does not work with Java 9+, you have to use at least install4j 7.

JavaFX Eclipse Exception

I'm trying to figure out this error that starts after I refactor name of the project.(I tried reinstall Eclipse, create new workspace etc.)
My code was working well before that. If code is needed I can edit it later. Thanks for all advices.
Exception in Application start method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(Unknown Source)
at com.sun.javafx.application.LauncherImpl.launchApplication(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: Invalid URL: Invalid URL or resource not found
at javafx.scene.image.Image.validateUrl(Unknown Source)
at javafx.scene.image.Image.<init>(Unknown Source)
at time.Run.start(Run.java:34)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(Unknown Source)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(Unknown Source)
... 1 more
Caused by: java.lang.IllegalArgumentException: Invalid URL or resource not found
... 12 more
Exception running application time.Run

GWT compile error: Rebind result cannot be abstract

When i try to compile GWT i receive an error that com.allen_sauer.gwt.log.client.util.impl.DOMUtilImpl cannot be abstract. How to solve this error?
I am using GWT 2.6.
Nov 24, 2014 3:29:42 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Compiling module nl.slimbetalen.slimbetalen
Validating units:
Ignored 5 units with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
[ERROR] Errors in 'com/allen_sauer/gwt/log/client/util/DOMUtil.java'
[ERROR] Line 33: Rebind result 'com.allen_sauer.gwt.log.client.util.impl.DOMUtilImpl' cannot be abstract
Exception in thread "pool-1-thread-1" java.lang.NullPointerException
at com.google.gwt.dev.util.DiskCache.transferToStream(DiskCache.java:186)
at com.google.gwt.dev.util.DiskCacheToken.writeObject(DiskCacheToken.java:73)
at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at java.util.ArrayList.writeObject(Unknown Source)
at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at com.google.gwt.dev.javac.CachedCompilationUnit.writeObject(CachedCompilationUnit.java:223)
at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at com.google.gwt.dev.javac.PersistentUnitCache$6.run(PersistentUnitCache.java:492)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "pool-1-thread-3" java.lang.NullPointerException
at com.google.gwt.dev.util.DiskCache.transferToStream(DiskCache.java:185)
at com.google.gwt.dev.util.DiskCacheToken.writeObject(DiskCacheToken.java:73)
at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source)
at com.google.gwt.dev.javac.CachedCompilationUnit.writeObject(CachedCompilationUnit.java:222)
at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at com.google.gwt.dev.javac.PersistentUnitCache$6.run(PersistentUnitCache.java:492)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
It seem the problem is an combination of com.allen_sauer.gwt.log and gwt 2.6.
When i switch to gwt 2.5.1 the problem disapear.
I have faced the same error with IE10 on window 7. I was using GWT 2.7.0. I was able to resolve the error by adding gwt-log dependency in my maven file.
http://mvnrepository.com/artifact/com.allen-sauer.gwt.log/gwt-log/3.3.0
So I would suggest using and adding the latest GWT logs in your classpath.
Are you using GWT-log? In this case you need an update, because GWT 2.6.0 does not have an ie6 permutation by default. (with GWT 2.7.0 the support will be removed)
You can try to add:
<extend-property name="user.agent" values="ie6" />
Maybe that will solve the problem.
Otherwise use the GWT logger API:
http://translate.google.de/translate?hl=de&sl=en&u=http://www.gwtproject.org/doc/latest/DevGuideLogging.html&prev=search

i can startup tomcat in explorer but can't in eclipse

os: win7 64bit ; Eclipse Java EE 4.2 ; Tomcat 7.0.39
The exception stack:
SEVERE: Error reading request, ignored
java.lang.ClassFormatError: Unknown constant tag 0 in class file sun/nio/cs/IBM775
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at sun.nio.cs.FastCharsetProvider.lookup(Unknown Source)
at sun.nio.cs.FastCharsetProvider.access$100(Unknown Source)
at sun.nio.cs.FastCharsetProvider$1.next(Unknown Source)
at sun.nio.cs.FastCharsetProvider$1.next(Unknown Source)
at java.nio.charset.Charset.put(Unknown Source)
at java.nio.charset.Charset.access$300(Unknown Source)
at java.nio.charset.Charset$4.run(Unknown Source)
at java.nio.charset.Charset$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.nio.charset.Charset.availableCharsets(Unknown Source)
at org.apache.tomcat.util.buf.B2CConverter.<clinit>(B2CConverter.java:51)
at org.apache.tomcat.util.buf.ByteChunk.<clinit>(ByteChunk.java:102)
at org.apache.tomcat.util.buf.MessageBytes.<init>(MessageBytes.java:58)
at org.apache.tomcat.util.buf.MessageBytes.<init>(MessageBytes.java:36)
at org.apache.tomcat.util.buf.MessageBytes$MessageBytesFactory.newInstance(MessageBytes.java:685)
at org.apache.tomcat.util.buf.MessageBytes.newInstance(MessageBytes.java:78)
at org.apache.coyote.Request.<init>(Request.java:83)
at org.apache.coyote.AbstractProcessor.<init>(AbstractProcessor.java:53)
at org.apache.coyote.http11.AbstractHttp11Processor.<init>(AbstractHttp11Processor.java:265)
at org.apache.coyote.http11.Http11Processor.<init>(Http11Processor.java:55)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.createProcessor(Http11Protocol.java:165)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.createProcessor(Http11Protocol.java:103)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:569)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "http-bio-8080-exec-1" java.lang.NullPointerException
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.release(Http11Protocol.java:140)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:654)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Try starting up Tomcat manually then run your program in eclipse. This worked for me.