我正在用Java开发astah插件。我正在使用astah UML(具有学生许可证)。
我已将以下依赖项添加到pom.xml:
${astahPath}/astah-api.jar
${astahPath}/astah-uml.jar
$ {astahPath} /lib/slf4j-api-1.6.6.jar
$ {astahPath} /lib/logback-loader-1.0.9b.jar
在eclipse的所有工作中,我都能成功构建项目(astah-build)。当我启动astah(astah-launch)时,它将加载我创建的扩展视图,但是当代码到达时:
IPresentation cp = conn.getPresentations()[0]; // conn is a IConnector
cp.setProperty(PresentationPropertyConstants.Key.LINE_COLOR, "#FF0000"); '
控制台打印:
java.lang.NoClassDefFoundError:com / change_vision / jude / api / inf / presentation / IPresentation
具有以下跟踪信息:
java.lang.NoClassDefFoundError: com/change_vision/jude/api/inf/presentation/IPresentation
at parser.Principal.valida(Principal.java:601) ~[classes/:na]
at ui.ValidaDialog$1.actionPerformed(ValidaDialog.java:58) ~[classes/:na]
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) [na:1.8.0_191]
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) [na:1.8.0_191]
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) [na:1.8.0_191]
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) [na:1.8.0_191]
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) ~[na:1.8.0_191]
at java.awt.Component.processMouseEvent(Component.java:6539) [na:1.8.0_191]
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) [na:1.8.0_191]
at java.awt.Component.processEvent(Component.java:6304) [na:1.8.0_191]
at java.awt.Container.processEvent(Container.java:2239) [na:1.8.0_191]
at java.awt.Component.dispatchEventImpl(Component.java:4889) [na:1.8.0_191]
at java.awt.Container.dispatchEventImpl(Container.java:2297) [na:1.8.0_191]
at java.awt.Component.dispatchEvent(Component.java:4711) [na:1.8.0_191]
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904) [na:1.8.0_191]
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535) [na:1.8.0_191]
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476) [na:1.8.0_191]
at java.awt.Container.dispatchEventImpl(Container.java:2283) [na:1.8.0_191]
at java.awt.Window.dispatchEventImpl(Window.java:2746) [na:1.8.0_191]
at java.awt.Component.dispatchEvent(Component.java:4711) [na:1.8.0_191]
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760) [na:1.8.0_191]
at java.awt.EventQueue.access$500(EventQueue.java:97) [na:1.8.0_191]
at java.awt.EventQueue$3.run(EventQueue.java:709) [na:1.8.0_191]
at java.awt.EventQueue$3.run(EventQueue.java:703) [na:1.8.0_191]
at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_191]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) [na:1.8.0_191]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84) [na:1.8.0_191]
at java.awt.EventQueue$4.run(EventQueue.java:733) [na:1.8.0_191]
at java.awt.EventQueue$4.run(EventQueue.java:731) [na:1.8.0_191]
at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_191]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) [na:1.8.0_191]
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730) [na:1.8.0_191]
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) [na:1.8.0_191]
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) [na:1.8.0_191]
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109) [na:1.8.0_191]
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190) [na:1.8.0_191]
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235) [na:1.8.0_191]
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233) [na:1.8.0_191]
at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_191]
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233) [na:1.8.0_191]
at java.awt.Dialog.show(Dialog.java:1084) [na:1.8.0_191]
at java.awt.Component.show(Component.java:1671) [na:1.8.0_191]
at java.awt.Component.setVisible(Component.java:1623) [na:1.8.0_191]
at java.awt.Window.setVisible(Window.java:1014) [na:1.8.0_191]
at java.awt.Dialog.setVisible(Dialog.java:1005) [na:1.8.0_191]
at ui.ValidaDialog.<init>(ValidaDialog.java:41) [classes/:na]
at projeto.ValidaAction.run(ValidaAction.java:20) [classes/:na]
at com.change_vision.astah.extension.plugin.ui.PluginAction.actionPerformed(X:95) [astah-uml.jar:na]
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) [na:1.8.0_191]
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) [na:1.8.0_191]
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) [na:1.8.0_191]
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) [na:1.8.0_191]
at javax.swing.AbstractButton.doClick(AbstractButton.java:376) [na:1.8.0_191]
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:842) [na:1.8.0_191]
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:886) [na:1.8.0_191]
at java.awt.Component.processMouseEvent(Component.java:6539) [na:1.8.0_191]
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) [na:1.8.0_191]
at java.awt.Component.processEvent(Component.java:6304) [na:1.8.0_191]
at java.awt.Container.processEvent(Container.java:2239) [na:1.8.0_191]
at java.awt.Component.dispatchEventImpl(Component.java:4889) [na:1.8.0_191]
at java.awt.Container.dispatchEventImpl(Container.java:2297) [na:1.8.0_191]
at java.awt.Component.dispatchEvent(Component.java:4711) [na:1.8.0_191]
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904) [na:1.8.0_191]
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535) [na:1.8.0_191]
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476) [na:1.8.0_191]
at java.awt.Container.dispatchEventImpl(Container.java:2283) [na:1.8.0_191]
at java.awt.Window.dispatchEventImpl(Window.java:2746) [na:1.8.0_191]
at java.awt.Component.dispatchEvent(Component.java:4711) [na:1.8.0_191]
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760) [na:1.8.0_191]
at java.awt.EventQueue.access$500(EventQueue.java:97) [na:1.8.0_191]
at java.awt.EventQueue$3.run(EventQueue.java:709) [na:1.8.0_191]
at java.awt.EventQueue$3.run(EventQueue.java:703) [na:1.8.0_191]
at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_191]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) [na:1.8.0_191]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84) [na:1.8.0_191]
at java.awt.EventQueue$4.run(EventQueue.java:733) [na:1.8.0_191]
at java.awt.EventQueue$4.run(EventQueue.java:731) [na:1.8.0_191]
at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_191]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) [na:1.8.0_191]
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730) [na:1.8.0_191]
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) [na:1.8.0_191]
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) [na:1.8.0_191]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) [na:1.8.0_191]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [na:1.8.0_191]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) [na:1.8.0_191]
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) [na:1.8.0_191]
Caused by: java.lang.ClassNotFoundException: com.change_vision.jude.api.inf.presentation.IPresentation not found by projeto01.projeto [2]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1460) ~[org.apache.felix.framework.jar:na]
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72) ~[org.apache.felix.framework.jar:na]
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843) ~[org.apache.felix.framework.jar:na]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_191]
... 86 common frames omitted
我使用ASTAH API中的其他类没有问题。 您能帮我指出这里可能出什么问题吗?
谢谢。
Flávia