I have one client getting this error whilst the applet is working properly for a number of other users.
java.lang.ClassFormatError: Incompatible magic value 1010792557 in class file %className%
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.lang.SecurityException: class "%className%"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(Unknown Source)
at java.lang.ClassLoader.preDefineClass(Unknown Source)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I believe that the magic value represents the start of an xml tag (based on this Incompatible magic value 1010792557 when trying to run applet embedded in Facelets). The security error occurs after the magic value error and I suspect its a byproduct of the first problem.
What I can't fathom is why this is happening to one client only.
All clients are using JRE version 1.6.0_24-b07 and IE 8.0.6001.18702.
On the clients machine I have tried clearing the cache, deleting temporary internet files, and deleting temporary internet files via the java control panel. I have also tried deleting the certificate from the javacpl 'trusted certificates' list and even turning off verification from javacpl>Advanced>Security>Mixed Code.
I'm out of ideas and would love to hear any suggestions on what the problem/solution might be.
Oh, the applet is hosted in a java wicket project running on tomcat 7.0.19 via apache 2.2 (on windows server 2008).
Related
My previous question was deleted here because it was considered as duplicate. I say it's not because the answers were about java itself while mine is about charles proxy and those answers didn't resolve my problem.
I had installed jdk-17.0.1 and jre1.8.0_311 on my machine when I tried to open charles proxy 4.6.2 on double click but nothing happened, the application didn't start. I try to open via command prompt by typing Charles.exe and this error is shown
java.awt.AWTError: Assistive Technology not found: com.sun.java.accessibility.AccessBridge
at java.desktop/java.awt.Toolkit.newAWTError(Unknown Source)
at java.desktop/java.awt.Toolkit.fallbackToLoadClassForAT(Unknown Source)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.base/java.util.stream.ReferencePipeline.forEach(Unknown Source)
at java.desktop/java.awt.Toolkit.loadAssistiveTechnologies(Unknown Source)
at java.desktop/java.awt.Toolkit.getDefaultToolkit(Unknown Source)
at de.sciss.syntaxpane.DefaultSyntaxKit.<clinit>(DefaultSyntaxKit.java:105)
at com.xk72.charles.gui.lib.UIUtils.<clinit>(Unknown Source)
at com.xk72.charles.gui.s.h(Unknown Source)
at com.xk72.charles.gui.Main.c(Unknown Source)
at com.xk72.charles.Main.b(Unknown Source)
at com.xk72.charles.gui.Main.main(Unknown Source)
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.xk72.lib.a.a(Unknown Source)
at com.xk72.charles.gui.MainWithClassLoader.main(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.sun.java.accessibility.AccessBridge
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)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Unknown Source)
... 24 more
I'm using Windows 10 64bit. %JAVA_HOME% is also setup
For me going to C:\Users\my account\.accessibility.properties and commenting out every line by adding a # a front of it worked.(I at least don't need the accessibility)
Found this solution at: Exception in thread "main" java.awt.AWTError: Assistive Technology not found
When I'm trying to start my Derby Network Server, I'm getting this exception. This has never happened before and I don't now what's the cause of problem. Any ideas?
Exception in thread "main" java.lang.NoSuchFieldError: completionKey
at sun.nio.fs.WindowsNativeDispatcher.initIDs(Native Method)
at sun.nio.fs.WindowsNativeDispatcher.<clinit>(Unknown Source)
at sun.nio.fs.WindowsLinkSupport.getRealPath(Unknown Source)
at sun.nio.fs.WindowsPath.toRealPath(Unknown Source)
at sun.nio.fs.WindowsPath.toRealPath(Unknown Source)
at sun.util.calendar.ZoneInfoFile$1.run(Unknown Source)
at sun.util.calendar.ZoneInfoFile$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.util.calendar.ZoneInfoFile.<clinit>(Unknown Source)
at sun.util.calendar.ZoneInfo.getTimeZone(Unknown Source)
at java.util.TimeZone.getTimeZone(Unknown Source)
at java.util.TimeZone.setDefaultZone(Unknown Source)
at java.util.TimeZone.getDefaultRef(Unknown Source)
at java.util.TimeZone.getDefault(Unknown Source)
at java.text.SimpleDateFormat.initializeCalendar(Unknown Source)
at java.text.SimpleDateFormat.<init>(Unknown Source)
at java.text.DateFormat.get(Unknown Source)
at java.text.DateFormat.getDateInstance(Unknown Source)
at org.apache.derby.iapi.tools.i18n.LocalizedResource.init(Unknown Source)
at org.apache.derby.iapi.tools.i18n.LocalizedResource.<init>(Unknown Source)
at org.apache.derby.impl.drda.NetworkServerControlImpl.init(Unknown Source)
at org.apache.derby.impl.drda.NetworkServerControlImpl.<init>(Unknown Source)
at org.apache.derby.drda.NetworkServerControl.main(Unknown Source)
This is an Error (!) that is due to running code that was compiled against a class with a field and executing it with another (compiled) version without that field.
Go back and check installed versions, recompile everything, etc. etc-
We have a Java Apllet, running without problems since several years. It uses LWJGL, all jars are signed with a proper certificate (NOT self signed).
After the last Java Update to u45, the applet crashes.
What we have done so far:
Added Permissions: all-permissions to Manifest of all JARs
Added pplication-Library-Allowable-Codebase: * to Manifest of all JARs
Added Caller-Allowable-Codebase: * to Manifest of all JARs
Added Codebase: * to Manifest of all JARs
Different permutations of the above
I know there were some changes to the way the security warnings are configured, but (for now!) we don't care about the popups asking for permissions. first we want to make it work,
Here are all exeptions occuring inside the java console. the rest of the output seems ok:
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 org.lwjgl.util.applet.AppletLoader$4.getPermissions(AppletLoader.java:1206)
at java.security.SecureClassLoader.getProtectionDomain(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.lwjgl.util.applet.AppletLoader.switchApplet(AppletLoader.java:1319)
at org.lwjgl.util.applet.AppletLoader$2.run(AppletLoader.java:909)
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)
Caused by: java.lang.NullPointerException
at sun.plugin2.applet.Plugin2ClassLoader.loadAllowedCodebases(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.getPermissions(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.getPermissions(Unknown Source)
... 31 more
And:
java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(Unknown Source)
at java.awt.EventQueue.invokeAndWait(Unknown Source)
at org.lwjgl.util.applet.AppletLoader.run(AppletLoader.java:906)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ExceptionInInitializerError
at org.lwjgl.Sys.createImplementation(Sys.java:124)
at org.lwjgl.Sys.<clinit>(Sys.java:111)
at org.lwjgl.opengl.AWTGLCanvas.<clinit>(AWTGLCanvas.java:87)
at j2cad.d.c.k(Unknown Source)
at j2cad.applet.J2CadApplet.init(Unknown Source)
at org.lwjgl.util.applet.AppletLoader.switchApplet(AppletLoader.java:1330)
at org.lwjgl.util.applet.AppletLoader$2.run(AppletLoader.java:909)
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)
Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "org.lwjgl.util.Debug" "read")
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at sun.plugin2.applet.AWTAppletSecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at java.lang.Boolean.getBoolean(Unknown Source)
at org.lwjgl.LWJGLUtil$4.run(LWJGLUtil.java:454)
at org.lwjgl.LWJGLUtil$4.run(LWJGLUtil.java:452)
at java.security.AccessController.doPrivileged(Native Method)
at org.lwjgl.LWJGLUtil.getPrivilegedBoolean(LWJGLUtil.java:452)
at org.lwjgl.LWJGLUtil.<clinit>(LWJGLUtil.java:265)
... 21 more
The first one occurs several times, the second one only once in the end of the log.
All suggestions are appreciated, the website is down for everybody who did the update!
Thanks everybody!
I found a creepy workaround to avoid this problem due to the AppletLoader from lwjgl_util_applet.jar that override the security context by replacing the default classLoader. So we need to patch it :
1 - Download the class HERE
2 - Replace this:
classLoader = new URLClassLoader(urls) {
with this:
classLoader = new URLClassLoader(urls, Thread.currentThread().getContextClassLoader()) {
this:
Thread.currentThread().setContextClassLoader(classLoader);
Class appletClass = classLoader.loadClass(getParameter("al_main"));
with this:
Class appletClass = Thread.currentThread().getContextClassLoader().loadClass(getParameter("al_main"));
and this :
urlconnection.setDefaultUseCaches(false);
with this :
urlconnection.setDefaultUseCaches(true);
3 - Compile and override the .class of the lwjgl_util_applet.jar with the new one.
4 - Remove the signature of all your jars (if exist) and re-sign all with those atributes in the MANIFEST.MF
Manifest-Version: 1.0
Trusted-Library: true
Application-Library-Allowable-Codebase: *
Trusted-Only: false
Application-Name: My app
Permissions: all-permissions
Created-By: 1.6.0_16 (Sun Microsystems Inc.)
Caller-Allowable-Codebase: *
Codebase: *
5 - In the applet tag, put this :
<param name="permissions" value="all-permissions">
<param name="codebase_lookup" value="true">
<param name="classloader_cache" value="false">
<param name="al_version" value="0.1">"
6 - (The creepy part) Put all the jars in the param "al_jars" in the param "archive" (just put a white space in al_jars),
7 - Clean your cache (java & browser) and set your java cache active (like the future users of your app),
8 - Run your applet and keep you fingers crossed.
Our team has an applet that is working fine in Oracle JRE 7u5. Upon updating the JRE to 7u6 or 7u7, the applet fails to initialize. An exception is thrown by the class loader during its loading of the log4j classes:
Caused by: java.lang.IllegalStateException: zip file closed
at java.util.zip.ZipFile.ensureOpen(Unknown Source)
at java.util.zip.ZipFile.getEntry(Unknown Source)
at java.util.jar.JarFile.getEntry(Unknown Source)
at java.util.jar.JarFile.getJarEntry(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.getResource(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.apache.log4j.PropertyConfigurator.class$(PropertyConfigurator.java:572)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:752)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:615)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:502)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:547)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:483)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
Has anyone else observed this behavior?
This particular bug has been observed by others and has been filed in Oracle's bug database.
My applet that connects JS/Java with LiveConnect worked from localhost but when transferring to server I get this error in java applet console. Do I have to do something before I transfer these files?
java.lang.ClassFormatError: Incompatible magic value 1008821359 in class file PrintJob/Print_Runner at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(Unknown Source) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source) at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Exception: java.lang.ClassFormatError: Incompatible magic value 1008821359 in class file PrintJob/Print_Runner
That means the class files didn't transfer properly. If you're using an FTP server make sure you have the binary option enabled.