我不确定是什么引发了这个问题。我把它作为一个bug提交给Eclipse,但他们关闭了它,说明这是一个JBoss扩展问题。但是,这个问题并没有发生在我的其他工作区(都使用JBoss工具)。
每次按 Ctrl + Shift + T 打开新类型时都会出现。它只报告"缓存刷新"错误。然后,当我输入一个搜索字符串并点击OK时,它会弹出" Cache Refresh"错误和"项目过滤"错误。这两个都报告了NPE。
我检查了日志,但没有在堆栈中看到任何特定于jboss的内容。
缓存刷新:
!ENTRY org.eclipse.core.jobs 4 2 2011-04-19 11:55:05.983
!MESSAGE An internal error occurred during: "Cache refresh".
!STACK 0
java.lang.NullPointerException
at org.jboss.ide.eclipse.as.classpath.core.ejb3.EJB3ClasspathContainer.getClasspathEntries(EJB3ClasspathContainer.java:106)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2656)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2788)
at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:1920)
at org.eclipse.jdt.internal.core.search.JavaWorkspaceScope.enclosingProjectsAndJars(JavaWorkspaceScope.java:84)
at org.eclipse.jdt.internal.core.search.IndexSelector.initializeIndexLocations(IndexSelector.java:181)
at org.eclipse.jdt.internal.core.search.IndexSelector.getIndexLocations(IndexSelector.java:276)
at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.selectIndexes(JavaSearchParticipant.java:107)
at org.eclipse.jdt.internal.core.search.PatternSearchJob.getIndexes(PatternSearchJob.java:79)
at org.eclipse.jdt.internal.core.search.PatternSearchJob.ensureReadyToRun(PatternSearchJob.java:50)
at org.eclipse.jdt.internal.core.search.processing.JobManager.performConcurrentJob(JobManager.java:174)
at org.eclipse.jdt.internal.core.search.BasicSearchEngine.searchAllTypeNames(BasicSearchEngine.java:1135)
at org.eclipse.jdt.core.search.SearchEngine.searchAllTypeNames(SearchEngine.java:744)
at org.eclipse.jdt.internal.ui.dialogs.FilteredTypesSelectionDialog$ConsistencyRunnable.refreshSearchIndices(FilteredTypesSelectionDialog.java:654)
at org.eclipse.jdt.internal.ui.dialogs.FilteredTypesSelectionDialog$ConsistencyRunnable.run(FilteredTypesSelectionDialog.java:637)
at org.eclipse.jdt.internal.ui.dialogs.FilteredTypesSelectionDialog.reloadCache(FilteredTypesSelectionDialog.java:680)
at org.eclipse.ui.dialogs.FilteredItemsSelectionDialog$RefreshCacheJob.run(FilteredItemsSelectionDialog.java:1508)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
项目过滤:
java.lang.NullPointerException
at org.jboss.ide.eclipse.as.classpath.core.ejb3.EJB3ClasspathContainer.getClasspathEntries(EJB3ClasspathContainer.java:106)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2656)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2788)
at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:1920)
at org.eclipse.jdt.internal.core.search.JavaWorkspaceScope.enclosingProjectsAndJars(JavaWorkspaceScope.java:84)
at org.eclipse.jdt.internal.core.search.IndexSelector.initializeIndexLocations(IndexSelector.java:181)
at org.eclipse.jdt.internal.core.search.IndexSelector.getIndexLocations(IndexSelector.java:276)
at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.selectIndexes(JavaSearchParticipant.java:107)
at org.eclipse.jdt.internal.core.search.PatternSearchJob.getIndexes(PatternSearchJob.java:79)
at org.eclipse.jdt.internal.core.search.PatternSearchJob.ensureReadyToRun(PatternSearchJob.java:50)
at org.eclipse.jdt.internal.core.search.processing.JobManager.performConcurrentJob(JobManager.java:174)
at org.eclipse.jdt.internal.core.search.BasicSearchEngine.searchAllTypeNames(BasicSearchEngine.java:1135)
at org.eclipse.jdt.core.search.SearchEngine.searchAllTypeNames(SearchEngine.java:846)
at org.eclipse.jdt.internal.ui.dialogs.FilteredTypesSelectionDialog.fillContentProvider(FilteredTypesSelectionDialog.java:557)
at org.eclipse.ui.dialogs.FilteredItemsSelectionDialog$FilterJob.filterContent(FilteredItemsSelectionDialog.java:2188)
at org.eclipse.ui.dialogs.FilteredItemsSelectionDialog$FilterJob.internalRun(FilteredItemsSelectionDialog.java:2130)
at org.eclipse.ui.dialogs.FilteredItemsSelectionDialog$FilterJob.doRun(FilteredItemsSelectionDialog.java:2102)
at org.eclipse.ui.dialogs.FilteredItemsSelectionDialog$FilterJob.run(FilteredItemsSelectionDialog.java:2089)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
答案 0 :(得分:0)
我不得不重新安装Helios(SR2)以免这些错误消失。
答案 1 :(得分:0)
我遇到了同样的问题并做了同样的事情。为了避免eclipse存在一些内存问题,可以增加安装文件夹中eclipse.ini文件的内存使用量,但不要过度使用,这取决于你的机器ram。