New Script can't be created

2 vues (au cours des 30 derniers jours)
Priespean Tjeng
Priespean Tjeng le 16 Mar 2020
Exception in thread "AWT-EventQueue-0": com.mathworks.util.event.EventListenerInvocationException: Error firing event:
caused by:
java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/mathworks/toolbox/coder/nide/editor/StateflowStorageLocation
at com.mathworks.mde.editor.EditorUtils.invokeAndWait(EditorUtils.java:548)
at com.mathworks.mde.editor.MatlabEditorApplication.newEditor(MatlabEditorApplication.java:114)
at com.mathworks.mde.desk.MLDesktop$NewMFileAction.actionPerformed(MLDesktop.java:2783)
at com.mathworks.mwswing.ChildAction.actionPerformed(ChildAction.java:214)
at com.mathworks.toolstrip.factory.TSFactory$ListListenerBridge.listItemSelected(TSFactory.java:1555)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.mathworks.util.event.EventListenerList$1.invoke(EventListenerList.java:72)
at com.sun.proxy.$Proxy21.listItemSelected(Unknown Source)
at com.mathworks.toolstrip.plaf.TSListCellRenderer.mouseReleased(TSListCellRenderer.java:521)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
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:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
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)
Caused by: java.lang.NoClassDefFoundError: com/mathworks/toolbox/coder/nide/editor/StateflowStorageLocation
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.mathworks.toolbox.eml.breakpoints.EmlMarginProvider.isApplicable(EmlMarginProvider.java:21)
at com.mathworks.mde.editor.EditorView.getApplicableMarginProviders(EditorView.java:252)
at com.mathworks.mde.editor.EditorView.initSyntaxTextPane(EditorView.java:885)
at com.mathworks.mde.editor.EditorView.<init>(EditorView.java:222)
at com.mathworks.mde.editor.EditorView.<init>(EditorView.java:153)
at com.mathworks.mde.editor.EditorViewClient.init(EditorViewClient.java:232)
at com.mathworks.mde.editor.EditorViewClient.<init>(EditorViewClient.java:181)
at com.mathworks.mde.editor.MatlabEditorApplication.createEditorViewClient(MatlabEditorApplication.java:700)
at com.mathworks.mde.editor.MatlabEditorApplication.createEditorViewClient(MatlabEditorApplication.java:685)
at com.mathworks.mde.editor.MatlabEditorApplication.createBufferEditorViewClient(MatlabEditorApplication.java:607)
at com.mathworks.mde.editor.MatlabEditorApplication.doNewEditor(MatlabEditorApplication.java:377)
at com.mathworks.mde.editor.MatlabEditorApplication.access$000(MatlabEditorApplication.java:73)
at com.mathworks.mde.editor.MatlabEditorApplication$1.runWithOutput(MatlabEditorApplication.java:118)
at com.mathworks.jmi.AWTUtilities$Invoker$2.watchedRun(AWTUtilities.java:475)
at com.mathworks.jmi.AWTUtilities$WatchedRunnable.run(AWTUtilities.java:436)
at com.mathworks.jmi.AWTUtilities$Invoker.invoke(AWTUtilities.java:490)
at com.mathworks.jmi.AWTUtilities.invokeAndWait(AWTUtilities.java:351)
at com.mathworks.mde.editor.EditorUtils.invokeAndWait(EditorUtils.java:544)
... 43 more
Caused by: java.lang.ClassNotFoundException: com.mathworks.toolbox.coder.nide.editor.StateflowStorageLocation
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 73 more
at com.mathworks.util.event.EventListenerList$1.invoke(EventListenerList.java:85)
at com.sun.proxy.$Proxy21.listItemSelected(Unknown Source)
at com.mathworks.toolstrip.plaf.TSListCellRenderer.mouseReleased(TSListCellRenderer.java:521)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
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:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
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)
Class ProjectMATLABPrefsPanel is not accessible.
Exception in thread "AWT-EventQueue-0": java.lang.IllegalArgumentException: com.mathworks.toolbox.simulink.desktopintegration.PreferencesPanel no class matches the supplied argument
at com.mathworks.mlwidgets.prefs.PrefsDialog.getPrefsEditorPanelFactory(PrefsDialog.java:398)
at com.mathworks.mlwidgets.prefs.PrefsDialog.registerPanel(PrefsDialog.java:359)
at com.mathworks.mlwidgets.prefs.PrefsDialogRegistrar.preRegisterPanels(PrefsDialogRegistrar.java:210)
at com.mathworks.mlwidgets.prefs.PrefsDialog.initialize(PrefsDialog.java:102)
at com.mathworks.mlwidgets.prefs.PrefsDialog.access$500(PrefsDialog.java:32)
at com.mathworks.mlwidgets.prefs.PrefsDialog$4.run(PrefsDialog.java:278)
at com.mathworks.mlwidgets.prefs.PrefsDialog.showPrefsDialog(PrefsDialog.java:292)
at com.mathworks.mlwidgets.prefs.PrefsDialog.doShowPrefsDialog(PrefsDialog.java:252)
at com.mathworks.mlwidgets.prefs.PrefsDialog.showPrefsDialog(PrefsDialog.java:128)
at com.mathworks.mlwidgets.prefs.PrefsDialog.showLastPrefsDialog(PrefsDialog.java:165)
at com.mathworks.mlservices.MLPrefsDialogServices.showLastPrefsDialog(MLPrefsDialogServices.java:44)
at com.mathworks.mde.desk.MLDesktop$PreferencesAction.actionPerformed(MLDesktop.java:3043)
at com.mathworks.mwswing.ChildAction.actionPerformed(ChildAction.java:214)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at com.mathworks.toolstrip.plaf.RegularButtonUI$RegularToolstripButtonListener.mouseReleasedImpl(RegularButtonUI.java:364)
at com.mathworks.toolstrip.plaf.RegularButtonUI$RegularToolstripButtonListener.mouseReleased(RegularButtonUI.java:354)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at com.mathworks.mwswing.MJButton.processMouseEvent(MJButton.java:350)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
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:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
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)

Réponses (1)

Prabhanjan Mentla
Prabhanjan Mentla le 20 Mar 2020
The "NoClassDefFoundError" error is thrown because MATLAB was not able to locate Java Runtime libraries that are used by the MATLAB IDE.
There are several possible causes to this issue:
  1. One or several internal MATLAB functions are shadowed by custom functions
  2. The installation is corrupted and there are .jar files missing from the MATLAB installation folder.
  3. The classpath.txt file is missing references to Java Runtime libraries.
Are there M-files on the MATLAB search path with the same name as internal MATLAB functions?
The search path defines the location where MATLAB looks for an M-file. For example, if I type "plot(1:10)" at the command line, MATLAB looks in all the folders on the search path for an M-file with the name "plot.m". If several files named "plot.m" exist, MATLAB uses the one at the top of the search path (the first one it encounters). If I create my own "plot.m" function and save it in the start-up folder, this file will be at the top of the search path and MATLAB will call it every time "plot" is used in MATLAB. This is called as "shadowing."
To take a look at the MATLAB search path, execute "pathtool" in the Command Window. This will open up the Set Path window with the list of folders that MATLAB parses. The start-up folder should be at the top.
You can try to restore the search path to the installation default by executing the following commands:
>> restoredefaultpath
>> rehash toolboxcache
>> savepath
However, this will not remove the start-up directory from the MATLAB search path. If the start-up folder contains M-files, try to remove them or move them to another folder which is not on the search path.
 If the issue still persists, the installation might be corrupted. Remove MATLAB completely and install it again to resolve the issue.
Refer to the links below for any clarifications.

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by