gpt4 book ai didi

netbeans-7 - 在 Netbeans 7.2 中启动项目时出现 "Absent Code attribute in method that is not native or abstract in class"异常

转载 作者:行者123 更新时间:2023-12-04 18:15:38 30 4
gpt4 key购买 nike

我刚刚安装了最新版本的 Netbeans ( 7.2 ) 并尝试在其中运行现有的 Swing 项目。我得到以下异常:

堆栈跟踪:

java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file com/eositservices/eldorado/dialogs/zahlungverrechnung/model/InitDataList
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getDeclaredMethod(Class.java:1935)
at java.awt.Component.isCoalesceEventsOverriden(Component.java:5975)
at java.awt.Component.access$500(Component.java:169)
at java.awt.Component$3.run(Component.java:5929)
at java.awt.Component$3.run(Component.java:5927)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Component.checkCoalescing(Component.java:5926)
at java.awt.Component.<init>(Component.java:5895)
at java.awt.Container.<init>(Container.java:249)
at javax.swing.JComponent.<init>(JComponent.java:570)
at javax.swing.JPanel.<init>(JPanel.java:65)
at javax.swing.JPanel.<init>(JPanel.java:92)
at javax.swing.JPanel.<init>(JPanel.java:100)
at com.eositservices.eldorado.masken.FormForderung.<init>(FormForderung.java:72)
at com.eositservices.eldorado.tabsheets.zahlung.TSZahlung.<init>(TSZahlung.java:183)
at com.eositservices.eldorado.masken.TFormForderung.addTabs(TFormForderung.java:366)
at com.eositservices.eldorado.masken.TFormForderung.initializeComponents(TFormForderung.java:275)
at com.eositservices.eldorado.masken.TFormForderung.configureComponents(TFormForderung.java:148)
at com.eositservices.bones.view.components.EOSInternalFrame.setUp(EOSInternalFrame.java:81)
at com.eositservices.eldorado.masken.TFormForderung.<init>(TFormForderung.java:113)
at com.eositservices.eldorado.main.MainFrame.oeffneForderung(MainFrame.java:577)
at com.eositservices.eldorado.main.MainFrame.showForderung(MainFrame.java:488)
at com.eositservices.eldorado.dev.QuickLogin.openForderung(QuickLogin.java:109)
at com.eositservices.eldorado.dev.QuickLogin.openInitialViews(QuickLogin.java:143)
at com.eositservices.eldorado.main.MainFrame$2.run(MainFrame.java:433)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:646)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:607)
at java.awt.EventQueue$1.run(EventQueue.java:605)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:616)
at com.eositservices.bones.view.GlobalHotkeyManager.dispatchEvent(GlobalHotkeyManager.java:163)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

有问题的方法如下所示:
@Override
public boolean add( InitData e ) {
boolean returnValue = super.add( e );
Collections.sort( this, c );
return returnValue;
}

奇怪的是,只有当我将项目属性设置为“保存时编译”时才会出现异常。当该选项未选中时,它运行良好。在以前的 NetBeans 版本中我们没有遇到这样的问题。这只是一个巧合,我应该在其他地方寻找这个错误的来源还是有人遇到过类似的问题?在此先感谢您的帮助。

最佳答案

这似乎是 中的一个错误NetBeans .

当这个异常发生时,让我们在代码中出错(例如

@Override
**efefefefef**
public boolean add( InitData e ) {
boolean returnValue = super.add( e );
Collections.sort( this, c );
return returnValue;
}

)

保存它,当 Netbeans 显示错误时,将其更正回来。我试图清除项目,从缓存中删除所有内容,但什么也没发生。但这种方式对我有帮助。

关于netbeans-7 - 在 Netbeans 7.2 中启动项目时出现 "Absent Code attribute in method that is not native or abstract in class"异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11776413/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com