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

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.

Related

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

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.

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

RuntimeException thrown by an install4j installer on windows XP

I have an install4j installer that works fine on windows 7 (x64), but when I try to launch the 32 bit version of the installer on a (virtual) windows xp machine, the installer crashes at startup with the following message:
The error.log contains the following:
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.install4j.runtime.installer.Installer.getScreenExecutor(Unknown Source)
at com.install4j.runtime.installer.Installer.runInProcess(Unknown Source)
at com.install4j.runtime.installer.Installer.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)
Caused by: java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(Unknown Source)
at java.awt.EventQueue.invokeAndWait(Unknown Source)
at javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
... 10 more
Caused by: java.lang.UnsatisfiedLinkError: could not load i4jinst from C:\Documents and Settings\malt\Local Settings\Temp\e4j7C.tmp_dir1409498652\i4jinst.dll, true, C:\DOCUME~1\malt\LOCALS~1\Temp\e4j7C.tmp_dir1409498652\platform.zip, true, C:\DOCUME~1\malt\LOCALS~1\Temp\e4j7C.tmp_dir1409498652\i4jinst.dll
at com.install4j.runtime.installer.platform.win32.Common.init(Unknown Source)
at com.install4j.runtime.installer.platform.win32.Registry.<clinit>(Unknown Source)
at com.install4j.api.windows.WinRegistry.getValue(Unknown Source)
at com.install4j.api.windows.WinRegistry.getValue(Unknown Source)
at com.install4j.runtime.installer.helper.registry.Win32Registry.getValue(Unknown Source)
at com.install4j.runtime.installer.helper.registry.InstallRegistry.getValue(Unknown Source)
at com.install4j.runtime.installer.helper.registry.InstallRegistry.getAllInstallationDirs(Unknown Source)
at com.install4j.runtime.installer.helper.registry.InstallRegistry.getInstallationDir(Unknown Source)
at com.install4j.runtime.installer.config.InstallerConfig.getInitialInstallationDirectory(Unknown Source)
at com.install4j.runtime.installer.config.InstallerConfig.getInstallationDirectory(Unknown Source)
at com.install4j.runtime.installer.ContextImpl.getInstallationDirectory(Unknown Source)
at com.install4j.runtime.installer.InstallerContextImpl.initUpdateInstallation(Unknown Source)
at com.install4j.runtime.installer.InstallerContextImpl.<init>(Unknown Source)
at com.install4j.runtime.installer.frontend.InstallerWizardScreenExecutor.<init>(Unknown Source)
at com.install4j.runtime.installer.Installer$1.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Can anyone suggest a solution?
Edit: for reference, I'm using Install4j 5.1.13
This is a regression in 5.1.13 and is fixed in 5.1.14.

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.

I am using ibmwebsphere community edition 3.0v in ECLIPSE. windows 7 ultimate 64bit system. I am getting this error when ever I run an web application

Unable to create configuration for deployment: dependencies: null
org.apache.geronimo.common.DeploymentException: Unable to create configuration for deployment: dependencies: null
at org.apache.geronimo.deployment.DeploymentContext.createTempConfiguration(DeploymentContext.java:211)
at org.apache.geronimo.deployment.DeploymentContext.initializeConfiguration(DeploymentContext.java:193)
at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:661)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:255)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:140)
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 org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:883)
at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:344)
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 org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:883)
at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
at org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl.access$200(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source)
at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.geronimo.kernel.config.LifecycleException: load of default/M-Banking/1.0/car failed
at org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.java:346)
at org.apache.geronimo.deployment.DeploymentConfigurationManager.loadConfiguration(DeploymentConfigurationManager.java:148)
at org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.java:331)
at org.apache.geronimo.deployment.DeploymentConfigurationManager.loadConfiguration(DeploymentConfigurationManager.java:144)
at org.apache.geronimo.deployment.DeploymentContext.createTempConfiguration(DeploymentContext.java:208)
... 43 more
Caused by: org.apache.geronimo.kernel.repository.MissingDependencyException: Missing dependency: org.apache.geronimo.configs/sharedlib//car
at org.apache.geronimo.kernel.repository.DefaultArtifactResolver.resolveInClassLoader(DefaultArtifactResolver.java:130)
at org.apache.geronimo.kernel.repository.DefaultArtifactResolver.resolveInClassLoader(DefaultArtifactResolver.java:123)
at org.apache.geronimo.kernel.config.SimpleConfigurationManager.resolveParentIds(SimpleConfigurationManager.java:640)
at org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.java:342)
... 47 more