Codename One: Bad type on operand stack javax/swing/JScrollBar.getAccessibleContext()

时间:2018-02-03 11:28:10

标签: java eclipse codenameone

Checking my Codename One App (which has been working flawlessly for over a year now) I recognized that it won't start anymore. As I tried to start it in Eclipse, I got the following stack trace:

Exception in thread "AWT-EventQueue-0" java.lang.VerifyError: Bad type on operand stack Exception Details: Location: javax/swing/JScrollBar.getAccessibleContext()Ljavax/accessibility/AccessibleContext; @16: putfield Reason: Type 'javax/swing/JScrollBar$AccessibleJScrollBar' (current frame, stack[1]) is not assignable to 'javax/accessibility/AccessibleContext' Current Frame: bci: @16 flags: { } locals: { 'javax/swing/JScrollBar' } stack: { 'javax/swing/JScrollBar', 'javax/swing/JScrollBar$AccessibleJScrollBar' } Bytecode: 0x0000000: 2ab4 001f c700 0f2a bb00 6259 2ab7 0063 0x0000010: b500 1f2a b400 1fb0
Stackmap Table: same_frame(@19) at com.codename1.impl.javase.JavaSEPort.(JavaSEPort.java:411) at com.codename1.impl.ImplementationFactory.createImplementation(ImplementationFactory.java:69) at com.codename1.ui.Display.init(Display.java:475) at com.codename1.impl.javase.Executor$1.run(Executor.java:112) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.awt.EventQueue.dispatchEvent(EventQueue.java:726) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Now for the Problem: I do not use the java.swing.JScrollBar anywhere in my code. I even searched through all of my classes. I really have no clue, how to fix this problem. The StackTrace doesn't even refer to a class written by me, just Java and CodenameOne Classes. Is this a bug in CO1 or is it my code?

I'am wondering why it came up after the app running for a good year without a fault and all of a sudden (without updating the app in any way) it doesn't work anymore.

1 个答案:

答案 0 :(得分:1)

这似乎与Eclipse有关issue。可能是某些类加载问题,其中混合了不同的JRE。

这个answer包含一个解决方法,这也在Eclipse问题中提到过。