i can startup tomcat in explorer but can't in eclipse - 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.

Related

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.

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.

Installer hangs with JRE 8

We've recently moved our install4j project to use JRE 8. However the installer hangs at a specific dialog and we see the following in error.log. Would you know what could be causing this?
Exception in thread "AWT-EventQueue-0" java.lang.InternalError: java.io.IOException: Stream closed
at java.text.BreakIterator.createBreakInstance(Unknown Source)
at java.text.BreakIterator.getBreakInstance(Unknown Source)
at java.text.BreakIterator.getLineInstance(Unknown Source)
at javax.swing.text.GlyphView.getBreakSpotUseBreakIterator(Unknown Source)
at javax.swing.text.GlyphView.getBreakSpot(Unknown Source)
at javax.swing.text.GlyphView.getBreakWeight(Unknown Source)
at javax.swing.text.FlowView$LogicalView.getPreferredSpan(Unknown Source)
at javax.swing.text.FlowView.calculateMinorAxisRequirements(Unknown Source)
at javax.swing.text.BoxView.checkRequests(Unknown Source)
at javax.swing.text.BoxView.getMinimumSpan(Unknown Source)
at javax.swing.text.BoxView.calculateMinorAxisRequirements(Unknown Source)
at javax.swing.text.BoxView.checkRequests(Unknown Source)
at javax.swing.text.BoxView.setSpanOnAxis(Unknown Source)
at javax.swing.text.BoxView.layout(Unknown Source)
at javax.swing.text.BoxView.setSize(Unknown Source)
at javax.swing.plaf.basic.BasicTextUI$RootView.setSize(Unknown Source)
at javax.swing.plaf.basic.BasicTextUI.getPreferredSize(Unknown Source)
at javax.swing.JComponent.getPreferredSize(Unknown Source)
at javax.swing.JEditorPane.getPreferredSize(Unknown Source)
at javax.swing.ScrollPaneLayout.layoutContainer(Unknown Source)
at java.awt.Container.layout(Unknown Source)
at java.awt.Container.doLayout(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validate(Unknown Source)
at javax.swing.JViewport.validateView(Unknown Source)
at javax.swing.JViewport.scrollRectToVisible(Unknown Source)
at javax.swing.JComponent.scrollRectToVisible(Unknown Source)
at com.install4j.runtime.beans.screens.InfoScreen.updateText(Unknown Source)
at com.install4j.runtime.beans.screens.InfoScreen.willActivate(Unknown Source)
at com.install4j.runtime.installer.frontend.ScreenEnvelope.activate(Unknown Source)
at com.install4j.runtime.wizard.WizardBase.setScreen(Unknown Source)
at com.install4j.runtime.installer.frontend.WizardScreenExecutor.execute(Unknown Source)
at com.install4j.runtime.installer.controller.Controller$1.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(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)
thanks
This is a bug in the hot spot compiler in Java 8, see
http://kingsfleet.blogspot.co.il/2014/11/but-thats-impossible-or-finding-out.html
According to the above blog post, a workaround is to add the following VM parameter
-XX:CompileCommand=exclude,javax/swing/text/GlyphView,getBreakSpot

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

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.