本帖最后由 JackTang1994 于 2021-12-7 10:30 编辑
#申请原创#
问题描述:在使用MPLAB X IDE开发dsPIC33CK128MP505时,使用了MCC配置工具。由于我本机电脑中没有安装好pic33的库(注:不是pack包,这个需要从Microchip官网下载安装)。下载好pic33的库后,我使用手动安装方式:
点击Tools >> Options
点击Install Libaray
本以为安装好pic33库后,可以高高兴兴的使用了。但是万万没想到,在建立好pic33的工程后,点击MCC图标准备使用MCC配置工程时,出现MCC闪退现象。并且在提示窗口中输出Eroor:java.lang.NoClassDefFoundError
详细错误如下:
java.lang.ClassNotFoundException: com.microchip.mcc.protocolServices.modules.IDiscoverableModule
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.microchip.mcc.core.library.LibraryLoader.loadClassFromParent(LibraryLoader.java:64)
at com.microchip.mcc.core.library.LibraryLoader.loadClass(LibraryLoader.java:45)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
Caused: java.lang.NoClassDefFoundError: com/microchip/mcc/protocolServices/modules/IDiscoverableModule
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 com.microchip.mcc.core.library.LibraryLoader.findClassFromChild(LibraryLoader.java:57)
at com.microchip.mcc.core.library.LibraryLoader.loadClass(LibraryLoader.java:41)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:370)
at java.util.ServiceLoader$LazyIterator.access$700(ServiceLoader.java:323)
at java.util.ServiceLoader$LazyIterator$2.run(ServiceLoader.java:407)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:409)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at com.microchip.mcc.core.library.PeripheralLibrary.loadPeripheralModules(PeripheralLibrary.java:113)
at com.microchip.mcc.core.library.PeripheralLibrary.getModules(PeripheralLibrary.java:83)
at com.microchip.mcc.mcu16.Mcu16PeripheralLibrary.getModules(Mcu16PeripheralLibrary.java:43)
at com.microchip.mcc.core.service.BaseLibraryService.getModules(BaseLibraryService.java:181)
at com.microchip.mcc.core.service.AModuleService.populateModules(AModuleService.java:392)
at com.microchip.mcc.core.service.AModuleService.initialize(AModuleService.java:67)
at com.microchip.mcc.core.project.Project.doInitializeProject(Project.java:427)
at com.microchip.mcc.core.project.Project.initializeProject(Project.java:413)
at com.microchip.mcc.core.project.Project.initializeProject(Project.java:354)
at com.microchip.mcc.core.service.BaseProjectService.initializeProject(BaseProjectService.java:44)
at com.microchip.mcc.runner.primary.Controller.lambda$openProjectEmpty$0(Controller.java:410)
at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602)
Caused: java.util.concurrent.CompletionException
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:604)
[catch] at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962)
at com.microchip.mcc.contentmanager.ContentManager.setAvailableVersions(ContentManager.java:86)
at com.microchip.mcc.contentmanager.CMTRouter.lambda$setAvailableContent$1(CMTRouter.java:94)
at java.util.Optional.ifPresent(Optional.java:159)
at com.microchip.mcc.contentmanager.CMTRouter.setAvailableContent(CMTRouter.java:93)
at com.microchip.mcc.contentmanager.Router$Route.visit(Router.java:117)
at com.microchip.mcc.contentmanager.Router$Route.access$300(Router.java:82)
at com.microchip.mcc.contentmanager.Router.route(Router.java:135)
at com.microchip.mcc.contentmanager.CMTServer.lambda$handleRequest$5(CMTServer.java:210)
at java.util.Optional.ifPresent(Optional.java:159)
at com.microchip.mcc.contentmanager.CMTServer.handleRequest(CMTServer.java:208)
at com.microchip.mcc.host.view.windowService.AHTMLWindowComponent.messageHandler(AHTMLWindowComponent.java:181)
at com.microchip.mcc.host.services.AHostWindowService.messageReceived(AHostWindowService.java:154)
at com.microchip.mcc.host.services.server.HostEndpointService.viewMessageReceived(HostEndpointService.java:103)
at com.microchip.mcc.host.services.server.HostEndpointService.messageReceived(HostEndpointService.java:68)
at com.microchip.mcc.host.services.server.AWebService.messageReceived(AWebService.java:72)
at com.microchip.mcc.plugin.services.server.Endpoint.lambda$onMessage$0(Endpoint.java:46)
at com.sun.javafx.application.PlatformImpl.lambda$null$5(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$6(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$3(WinApplication.java:177)
at java.lang.Thread.run(Thread.java:748)
解决:
Tools >> Options >> Plugins >> MCC点击Remove Libaray
然后再使用Tools >> Options >> Plugins >> MCC点击Install Libaray,选择下载的pic33库
|