加载组件属性时出错(Swing GUI 表单)

发布于 2024-08-27 08:39:50 字数 4701 浏览 9 评论 0原文

没有明显的原因,我所有使用链接到 org.jdesktop.beansbinding.Converter 的组件的 Swing GUI 表单在尝试打开设计视图时开始生成错误:

错误 加载组件属性时出错:[JPanel]->filterTextField->converter。 无法加载属性类型类 org.jdesktop.beansbinding.Converter。 无法加载该属性。

加载时发生错误...


我当前使用的是 Netbeans 6.8。我在 Netbeans 6.7.1 中打开我的项目,一切都很好,但过了一会儿又发生了同样的事情。查看 .form 和 .java 文件并将其与以前的备份进行比较,一切看起来都很好。甚至我的 Netbeans 教程项目也不再有效。

什么可能会导致这种情况。任何建议将不胜感激。

经过进一步调查,这是从我的 IDE 日志中获取的:

INFO: msg org.openide.ErrorManager$AnnException:消息 在 org.openide.ErrorManager$AnnException.findOrCreate(ErrorManager.java:867) 在 org.openide.ErrorManager$DelegatingErrorManager.annotate(ErrorManager.java:650) 在 org.netbeans.modules.form.GandalfPersistenceManager.annotateException(GandalfPersistenceManager.java:230) 在 org.netbeans.modules.form.GandalfPersistenceManager.annotateException(GandalfPersistenceManager.java:240) 在 org.netbeans.modules.form.GandalfPersistenceManager.getPropertyType(GandalfPersistenceManager.java:2362) 在 org.netbeans.modules.form.GandalfPersistenceManager.loadProperty(GandalfPersistenceManager.java:2041) 在org.netbeans.modules.form.GandalfPersistenceManager.loadBindingProperties(GandalfPersistenceManager.java:2627) 在 org.netbeans.modules.form.GandalfPersistenceManager.loadComponent(GandalfPersistenceManager.java:900) 在 org.netbeans.modules.form.GandalfPersistenceManager.restoreComponent(GandalfPersistenceManager.java:845) 在 org.netbeans.modules.form.GandalfPersistenceManager.loadComponent(GandalfPersistenceManager.java:979) 在 org.netbeans.modules.form.GandalfPersistenceManager.restoreComponent(GandalfPersistenceManager.java:845) 在 org.netbeans.modules.form.GandalfPersistenceManager.loadNonVisuals(GandalfPersistenceManager.java:695) 在 org.netbeans.modules.form.GandalfPersistenceManager.loadForm(GandalfPersistenceManager.java:529) 在 org.netbeans.modules.form.GandalfPersistenceManager.loadForm(GandalfPersistenceManager.java:290) 在 org.netbeans.modules.form.FormEditor$3.run(FormEditor.java:339) 在 org.netbeans.modules.form.FormLAF$2.run(FormLAF.java:287) 在 org.openide.util.Mutex.doEventAccess(Mutex.java:1355) 在 org.openide.util.Mutex.readAccess(Mutex.java:317) 在 org.netbeans.modules.form.FormLAF.executeWithLookAndFeel(FormLAF.java:272) 在 org.netbeans.modules.form.FormEditor.loadFormData(FormEditor.java:337) 在 org.netbeans.modules.form.FormEditor.loadForm(FormEditor.java:266) 在 org.netbeans.modules.form.FormEditorSupport.loadForm(FormEditorSupport.java:306) 在 org.netbeans.modules.form.FormEditorSupport$3.run(FormEditorSupport.java:457) 在 java.awt.event.InitationEvent.dispatch(InitationEvent.java:209) 在 java.awt.EventQueue.dispatchEvent(EventQueue.java:597) 在 org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:125) 在java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) 在 java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) 在java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) 在java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) 在java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) 在 java.awt.EventDispatchThread.run(EventDispatchThread.java:122) 原因:java.lang.ClassNotFoundException:不会从 SystemClassLoader[556 开始]从 ModuleCL@738d08[org.jdesktop.beansbinding] 和 ModuleCL@167e3a5[javax.beans.binding] 之一任意加载类 org.jdesktop.beansbinding.Converter模块];请参阅http://wiki.netbeans.org/DevFaqModuleCCE 在 org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:241) 在 java.lang.ClassLoader.loadClass(ClassLoader.java:252) 在 org.netbeans.modules.form.project.FormClassLoader.findClass(FormClassLoader.java:83) 在 java.lang.ClassLoader.loadClass(ClassLoader.java:307) 在 java.lang.ClassLoader.loadClass(ClassLoader.java:252) 在 java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) 在 java.lang.Class.forName0(本机方法) 在 java.lang.Class.forName(Class.java:247) 在 org.netbeans.modules.form.project.ClassPathUtils.loadClass(ClassPathUtils.java:95) 在 org.netbeans.modules.form.FormUtils.loadClass(FormUtils.java:1445) 在 org.netbeans.modules.form.PersistenceObjectRegistry.loadClass(PersistenceObjectRegistry.java:95) 在 org.netbeans.modules.form.GandalfPersistenceManager.getClassFromString(GandalfPersistenceManager.java:5516) 在 org.netbeans.modules.form.GandalfPersistenceManager.getPropertyType(GandalfPersistenceManager.java:2348) ... 27 更多 味精 加载组件属性时出错:其他组件->mainPanel->jTextField1->converter 无法加载属性类型类 org.jdesktop.beansbinding.Converter。 无法加载该属性。


有人可以帮我解决这个问题吗?这个问题仍然没有解决,并且每次我需要编辑表单时都无法编辑我的表单或丢失绑定属性,这真是一件痛苦且耗时的事情!任何帮助将不胜感激。谢谢。

For no apparent reason all my Swing GUI forms using components linked to org.jdesktop.beansbinding.Converter started generating errors when trying to open the Design View:

Error
Error in loading component property: [JPanel]->filterTextField->converter.
Cannot load property type class org.jdesktop.beansbinding.Converter.
The property cannot be loaded.

Errors occurred in loading...


I'm currently using Netbeans 6.8. I opened my project in Netbeans 6.7.1 and all was fine but after a while the same thing happened. Looking at the .form and .java files and comparing it to previous backups, everything looks fine. Even my Netbeans tutorial project no longer works.

What can cause this. Any suggestions would greatly be appreciated.

After further investigation this is taken from my IDE's log :

INFO: msg
org.openide.ErrorManager$AnnException: msg
at org.openide.ErrorManager$AnnException.findOrCreate(ErrorManager.java:867)
at org.openide.ErrorManager$DelegatingErrorManager.annotate(ErrorManager.java:650)
at org.netbeans.modules.form.GandalfPersistenceManager.annotateException(GandalfPersistenceManager.java:230)
at org.netbeans.modules.form.GandalfPersistenceManager.annotateException(GandalfPersistenceManager.java:240)
at org.netbeans.modules.form.GandalfPersistenceManager.getPropertyType(GandalfPersistenceManager.java:2362)
at org.netbeans.modules.form.GandalfPersistenceManager.loadProperty(GandalfPersistenceManager.java:2041)
at org.netbeans.modules.form.GandalfPersistenceManager.loadBindingProperties(GandalfPersistenceManager.java:2627)
at org.netbeans.modules.form.GandalfPersistenceManager.loadComponent(GandalfPersistenceManager.java:900)
at org.netbeans.modules.form.GandalfPersistenceManager.restoreComponent(GandalfPersistenceManager.java:845)
at org.netbeans.modules.form.GandalfPersistenceManager.loadComponent(GandalfPersistenceManager.java:979)
at org.netbeans.modules.form.GandalfPersistenceManager.restoreComponent(GandalfPersistenceManager.java:845)
at org.netbeans.modules.form.GandalfPersistenceManager.loadNonVisuals(GandalfPersistenceManager.java:695)
at org.netbeans.modules.form.GandalfPersistenceManager.loadForm(GandalfPersistenceManager.java:529)
at org.netbeans.modules.form.GandalfPersistenceManager.loadForm(GandalfPersistenceManager.java:290)
at org.netbeans.modules.form.FormEditor$3.run(FormEditor.java:339)
at org.netbeans.modules.form.FormLAF$2.run(FormLAF.java:287)
at org.openide.util.Mutex.doEventAccess(Mutex.java:1355)
at org.openide.util.Mutex.readAccess(Mutex.java:317)
at org.netbeans.modules.form.FormLAF.executeWithLookAndFeel(FormLAF.java:272)
at org.netbeans.modules.form.FormEditor.loadFormData(FormEditor.java:337)
at org.netbeans.modules.form.FormEditor.loadForm(FormEditor.java:266)
at org.netbeans.modules.form.FormEditorSupport.loadForm(FormEditorSupport.java:306)
at org.netbeans.modules.form.FormEditorSupport$3.run(FormEditorSupport.java:457)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:125)
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)
Caused by: java.lang.ClassNotFoundException: Will not load class org.jdesktop.beansbinding.Converter arbitrarily from one of ModuleCL@738d08[org.jdesktop.beansbinding] and ModuleCL@167e3a5[javax.beans.binding] starting from SystemClassLoader[556 modules]; see http://wiki.netbeans.org/DevFaqModuleCCE
at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:241)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at org.netbeans.modules.form.project.FormClassLoader.findClass(FormClassLoader.java:83)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.netbeans.modules.form.project.ClassPathUtils.loadClass(ClassPathUtils.java:95)
at org.netbeans.modules.form.FormUtils.loadClass(FormUtils.java:1445)
at org.netbeans.modules.form.PersistenceObjectRegistry.loadClass(PersistenceObjectRegistry.java:95)
at org.netbeans.modules.form.GandalfPersistenceManager.getClassFromString(GandalfPersistenceManager.java:5516)
at org.netbeans.modules.form.GandalfPersistenceManager.getPropertyType(GandalfPersistenceManager.java:2348)
... 27 more
msg
Error in loading component property: Other Components->mainPanel->jTextField1->converter
Cannot load property type class org.jdesktop.beansbinding.Converter.
The property cannot be loaded.


Can someone please help me with this issue. This is still not resolved and not being able to edit my Forms or loosing binding properties every time I need to edit a Form is a real pain and time consuming! Any help would greatly be appreciated. Thanx.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

一城柳絮吹成雪 2024-09-03 08:39:50

我从这条消息中得出结论:

java.lang.ClassNotFoundException:不会从 ModuleCL@738d08[org.jdesktop.beansbinding] 和 ModuleCL@167e3a5[javax.beans.binding] 之一任意加载类 org.jdesktop.beansbinding.Converter

系统正在查找 2 个包含 org.jdesktop.beansbinding.Converter 的类文件。它不是只选择一个(而且 50% 的情况下是错误的),而是拒绝加载任何一个。

检查您的库,确保您没有加载两个功能重叠的库。

I would conclude from this message:

java.lang.ClassNotFoundException: Will not load class org.jdesktop.beansbinding.Converter arbitrarily from one of ModuleCL@738d08[org.jdesktop.beansbinding] and ModuleCL@167e3a5[javax.beans.binding]

that the system is finding 2 class files that contain org.jdesktop.beansbinding.Converter. Rather than just picking one (and being wrong 50% of the time) it refuses to load either one.

Check your libraries to make sure you're not loading 2 libraries with overlapping functionality.

何必那么矫情 2024-09-03 08:39:50

我注意到有时 NetBeans 会丢失与您可能用于 Swing 控件的 JAR 的绑定。例如,有时我将 SwingX 的 JAR 包含在其组件中,而 JAR 包含会与 NetBeans 混淆。

确保以下位置没有任何损坏的库引用:

Project Properties ->图书馆 ->编译

它将指示哪个库可能丢失或损坏。希望这有帮助。

I've noticed that sometimes NetBeans will lose a binding to a JAR you might be using for Swing controls. For instance, sometimes I include SwingX's JAR for their components and the JAR inclusion gets messed up with NetBeans.

Make sure you don't have any broken library references in:

Project Properties -> Libraries -> Compile

It will indicate which library might be missing, or broken. Hope this helps.

兔姬 2024-09-03 08:39:50

检查您的 org.jdesktop.beansbinding.Converter 是否正确地位于类路径和/或 Netbeans 调色板中。

当我打开包含自定义 bean 的面板而调色板中没有这些组件时(例如,在重新安装 Netbeans 后),我通常会收到此错误。

Check that your org.jdesktop.beansbinding.Converter is correctly in the classpath, and/or in the palette of Netbeans.

I usually get this error when I open a panel containing custom beans without these components in my palette (after reinstalling Netbeans, for example).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文