gpt4 book ai didi

java - Netbeans IDE 错误 : A java. lang.NoClassDefFoundError 异常发生

转载 作者:行者123 更新时间:2023-11-29 05:41:09 26 4
gpt4 key购买 nike

使用netbeans打开java项目时出现异常:发生了 java.lang.NoClassDefFoundError 异常。但是,系统应该可以继续工作而不会出现其他问题。单击堆栈跟踪的显示详细信息。

显示细节:


java.lang.NoClassDefFoundError: Could not initialize class org.netbeans.modules.glassfish.javaee.Hk2LibraryProvider
at org.netbeans.modules.glassfish.javaee.Hk2JavaEEPlatformImpl.(Hk2JavaEEPlatformImpl.java:114)
at org.netbeans.modules.glassfish.javaee.Hk2JavaEEPlatformFactory.getJ2eePlatformImpl(Hk2JavaEEPlatformFactory.java:125)
at org.netbeans.modules.j2ee.deployment.impl.ServerInstance.getJ2eePlatformImpl(ServerInstance.java:347)
at org.netbeans.modules.j2ee.deployment.impl.query.J2eePlatformSourceForBinaryQuery.findSourceRoots2(J2eePlatformSourceForBinaryQuery.java:103)
at org.netbeans.api.java.queries.SourceForBinaryQuery.findSourceRoots2(SourceForBinaryQuery.java:126)
at org.netbeans.modules.parsing.impl.indexing.PathRegistry.sourceForBinaryQuery(PathRegistry.java:195)
at org.netbeans.api.java.source.ClassIndex.createQueriesForRoots(ClassIndex.java:658)
at org.netbeans.api.java.source.ClassIndex.access$700(ClassIndex.java:100)
at org.netbeans.api.java.source.ClassIndex$6.run(ClassIndex.java:620)
at org.openide.util.Mutex.readAccess(Mutex.java:367)
at org.netbeans.api.java.source.ClassIndex.reset(ClassIndex.java:600)
at org.netbeans.api.java.source.ClassIndex.(ClassIndex.java:299)
at org.netbeans.api.java.source.ClassIndex.(ClassIndex.java:275)
at org.netbeans.api.java.source.ClasspathInfo.getClassIndex(ClasspathInfo.java:380)
at org.netbeans.modules.j2ee.metadata.model.api.support.annotation.AnnotationModelHelper.registerPersistentObjectManager(AnnotationModelHelper.java:129)
at org.netbeans.modules.j2ee.metadata.model.api.support.annotation.AnnotationModelHelper.createPersistentObjectManager(AnnotationModelHelper.java:121)
at org.netbeans.modules.j2ee.dd.impl.ejb.annotation.EnterpriseBeansImpl.initialize(EnterpriseBeansImpl.java:93)
at org.netbeans.modules.j2ee.dd.impl.ejb.annotation.EnterpriseBeansImpl.create(EnterpriseBeansImpl.java:84)
at org.netbeans.modules.j2ee.dd.impl.ejb.annotation.EjbJarImpl.(EjbJarImpl.java:77)
at org.netbeans.modules.j2ee.dd.impl.ejb.annotation.EjbJarMetadataModelImpl.(EjbJarMetadataModelImpl.java:88)
at org.netbeans.modules.j2ee.dd.spi.ejb.EjbJarMetadataModelFactory.createMetadataModel(EjbJarMetadataModelFactory.java:57)
at org.netbeans.modules.web.project.EjbJarProvider.getMetadataModel(EjbJarProvider.java:110)
at org.netbeans.modules.j2ee.api.ejbjar.EjbJar.getMetadataModel(EjbJar.java:186)
at org.netbeans.modules.web.project.WebProject$ProjectOpenedHookImpl.projectOpened(WebProject.java:1021)
at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened(ProjectOpenedHook.java:85)
at org.netbeans.spi.project.ui.support.UILookupMergerSupport$OpenHookImpl.projectOpened(UILookupMergerSupport.java:244)
at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened(ProjectOpenedHook.java:85)
[catch] at org.netbeans.modules.project.ui.OpenProjectList.notifyOpened(OpenProjectList.java:1218)
at org.netbeans.modules.project.ui.OpenProjectList.doOpenProject(OpenProjectList.java:1299)
at org.netbeans.modules.project.ui.OpenProjectList.open(OpenProjectList.java:791)
at org.netbeans.modules.project.ui.OpenProjectList$5.run(OpenProjectList.java:659)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2044)

Netbeans 有什么问题,我该如何解决?

resolved: need to update IDE

最佳答案

在我的例子中,这种情况是由于 NetBeans IDE 的可用更新引起的。尝试更新 IDE,重新启动 NetBeans,看看会发生什么。

关于java - Netbeans IDE 错误 : A java. lang.NoClassDefFoundError 异常发生,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17523006/

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