Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 扫描后点击Clear Markers icon后,报internal error #43

Closed
wangmin-xidian opened this issue Oct 16, 2017 · 11 comments
Closed

Comments

@wangmin-xidian
Copy link

Eclipse 4.4, JDK 1.7
扫描后,接受某些规则之外的结果,比如说在行尾使用注释,消除marker时报错。

20171016113144

@SeanCai
Copy link
Contributor

SeanCai commented Oct 16, 2017

@reJaHiGr 请帖一下 workspace/.metadata/.log 里面相关的异常日志哈

@mfkvfn
Copy link

mfkvfn commented Oct 16, 2017

我也遇到类似的问题。错误日志为
!ENTRY org.eclipse.core.jobs 4 2 2017-10-16 17:48:29.901
!MESSAGE An internal error occurred during: "Clear Markers".
!STACK 0
java.lang.NoClassDefFoundError: com/alibaba/smartfox/eclipse/ui/InspectionResults$clear$1
at com.alibaba.smartfox.eclipse.ui.InspectionResults.clear(InspectionResults.kt:44)
at com.alibaba.smartfox.eclipse.ui.InspectionResultView.clear(InspectionResultView.kt:85)
at com.alibaba.smartfox.eclipse.ui.InspectionResultView$initToolBar$clearAction$1$run$job$1.run(InspectionResultView.kt:132)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

@SeanCai
Copy link
Contributor

SeanCai commented Oct 16, 2017

将Eclipse运行使用的jdk升级到1.8试试

@SeanCai
Copy link
Contributor

SeanCai commented Oct 16, 2017

有个地方不小心用到了java8的函数,感谢反馈

@wangmin-xidian
Copy link
Author

@SeanCai 不支持JDK 1.7 吗?

补充一下log,我这边看了一些workspace中的log,报错信息还挺多,还有些是没有显示到eclipse中,在internal error during "Clear Markers"之前还有其他的log,具体如下:

!ENTRY org.eclipse.jdt.core 4 2 2017-10-16 11:23:49.780
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jdt.core".
!STACK 0
java.lang.NullPointerException
at org.eclipse.jpt.jpa.core.internal.AbstractJpaProject.compilationUnitResourceExists(AbstractJpaProject.java:1436)
at org.eclipse.jpt.jpa.core.internal.AbstractJpaProject.javaCompilationUnitDeltaIsRelevant(AbstractJpaProject.java:1425)
at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager.javaCompilationUnitDeltaIsRelevant(InternalJpaProjectManager.java:1006)
at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager.handleJavaCompilationUnitDelta(InternalJpaProjectManager.java:998)
at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager.handleJavaDelta(InternalJpaProjectManager.java:933)
at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager.handleJavaElementChangedEvent(InternalJpaProjectManager.java:916)
at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager.javaElementChanged(InternalJpaProjectManager.java:859)
at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager$JavaElementChangeListener.elementChanged(InternalJpaProjectManager.java:1389)
at org.eclipse.jdt.internal.core.DeltaProcessor$4.run(DeltaProcessor.java:1695)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.jdt.internal.core.DeltaProcessor.notifyListeners(DeltaProcessor.java:1685)
at org.eclipse.jdt.internal.core.DeltaProcessor.fireReconcileDelta(DeltaProcessor.java:1537)
at org.eclipse.jdt.internal.core.DeltaProcessor.fire(DeltaProcessor.java:1496)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:770)
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:789)
at org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java:1247)
at com.alibaba.smartfox.eclipse.pmd.rule.AbstractEclipseRule.visit(AbstractEclipseRule.kt:65)
at net.sourceforge.pmd.lang.java.rule.AbstractJavaRule.visitAll(AbstractJavaRule.java:31)
at net.sourceforge.pmd.lang.java.rule.AbstractJavaRule.apply(AbstractJavaRule.java:25)
at net.sourceforge.pmd.lang.rule.AbstractDelegateRule.apply(AbstractDelegateRule.java:215)
at net.sourceforge.pmd.RuleSet.apply(RuleSet.java:306)
at net.sourceforge.pmd.RuleSets.apply(RuleSets.java:125)
at net.sourceforge.pmd.SourceCodeProcessor.processSource(SourceCodeProcessor.java:149)
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:80)
at com.alibaba.smartfox.eclipse.job.CodeAnalysis.processFile(CodeAnalysis.kt:115)
at com.alibaba.smartfox.eclipse.job.CodeAnalysis.processFileToMakers(CodeAnalysis.kt:92)
at com.alibaba.smartfox.eclipse.job.CodeAnalysis$processResources$job$1.run(CodeAnalysis.kt:79)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

!ENTRY org.eclipse.jdt.core 4 4 2017-10-16 11:23:49.787
!MESSAGE Exception occurred in listener of Java element change notification
!STACK 0
java.lang.NullPointerException
at org.eclipse.jpt.jpa.core.internal.AbstractJpaProject.compilationUnitResourceExists(AbstractJpaProject.java:1436)
at org.eclipse.jpt.jpa.core.internal.AbstractJpaProject.javaCompilationUnitDeltaIsRelevant(AbstractJpaProject.java:1425)
at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager.javaCompilationUnitDeltaIsRelevant(InternalJpaProjectManager.java:1006)
at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager.handleJavaCompilationUnitDelta(InternalJpaProjectManager.java:998)
at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager.handleJavaDelta(InternalJpaProjectManager.java:933)
at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager.handleJavaElementChangedEvent(InternalJpaProjectManager.java:916)
at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager.javaElementChanged(InternalJpaProjectManager.java:859)
at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager$JavaElementChangeListener.elementChanged(InternalJpaProjectManager.java:1389)
at org.eclipse.jdt.internal.core.DeltaProcessor$4.run(DeltaProcessor.java:1695)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.jdt.internal.core.DeltaProcessor.notifyListeners(DeltaProcessor.java:1685)
at org.eclipse.jdt.internal.core.DeltaProcessor.fireReconcileDelta(DeltaProcessor.java:1537)
at org.eclipse.jdt.internal.core.DeltaProcessor.fire(DeltaProcessor.java:1496)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:770)
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:789)
at org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java:1247)
at com.alibaba.smartfox.eclipse.pmd.rule.AbstractEclipseRule.visit(AbstractEclipseRule.kt:65)
at net.sourceforge.pmd.lang.java.rule.AbstractJavaRule.visitAll(AbstractJavaRule.java:31)
at net.sourceforge.pmd.lang.java.rule.AbstractJavaRule.apply(AbstractJavaRule.java:25)
at net.sourceforge.pmd.lang.rule.AbstractDelegateRule.apply(AbstractDelegateRule.java:215)
at net.sourceforge.pmd.RuleSet.apply(RuleSet.java:306)
at net.sourceforge.pmd.RuleSets.apply(RuleSets.java:125)
at net.sourceforge.pmd.SourceCodeProcessor.processSource(SourceCodeProcessor.java:149)
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:80)
at com.alibaba.smartfox.eclipse.job.CodeAnalysis.processFile(CodeAnalysis.kt:115)
at com.alibaba.smartfox.eclipse.job.CodeAnalysis.processFileToMakers(CodeAnalysis.kt:92)
at com.alibaba.smartfox.eclipse.job.CodeAnalysis$processResources$job$1.run(CodeAnalysis.kt:79)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

!ENTRY org.eclipse.core.jobs 4 2 2017-10-16 11:24:59.261
!MESSAGE An internal error occurred during: "Clear Markers".
!STACK 0
java.lang.NoClassDefFoundError: java/util/function/BiConsumer
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:272)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:632)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:588)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:540)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:527)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:324)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:320)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:395)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:345)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:337)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at com.alibaba.smartfox.eclipse.ui.InspectionResults.clear(InspectionResults.kt:44)
at com.alibaba.smartfox.eclipse.ui.InspectionResultView.clear(InspectionResultView.kt:85)
at com.alibaba.smartfox.eclipse.ui.InspectionResultView$initToolBar$clearAction$1$run$job$1.run(InspectionResultView.kt:132)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.ClassNotFoundException: java.util.function.BiConsumer
at java.lang.ClassLoader.findClass(ClassLoader.java:531)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:337)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 18 more

!ENTRY org.eclipse.core.jobs 4 2 2017-10-16 11:25:14.589
!MESSAGE An internal error occurred during: "Clear Markers".
!STACK 0
java.lang.NoClassDefFoundError: com/alibaba/smartfox/eclipse/ui/InspectionResults$clear$1
at com.alibaba.smartfox.eclipse.ui.InspectionResults.clear(InspectionResults.kt:44)
at com.alibaba.smartfox.eclipse.ui.InspectionResultView.clear(InspectionResultView.kt:85)
at com.alibaba.smartfox.eclipse.ui.InspectionResultView$initToolBar$clearAction$1$run$job$1.run(InspectionResultView.kt:132)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

@Tarryhao
Copy link

同样遇到这个问题
image

@bowen0801
Copy link

@SeanCai 能否考虑支持1.7,现在用jdk1.7的还是蛮多的

@Ryoui
Copy link

Ryoui commented Oct 18, 2017

idea支持1.7+,eclipse 1.8...

@SeanCai
Copy link
Contributor

SeanCai commented Oct 18, 2017

@bowen0801 Eclipse启动时用的JDK 1.8,项目还是可以用1.7的

@SeanCai
Copy link
Contributor

SeanCai commented Oct 18, 2017

有段代码不小心使用到了jdk1.8的LinkedHashMap.forEach,有问题的同学请先升级Eclipse启动时使用的JDK到1.8,下一版会修复这个问题

@mfkvfn
Copy link

mfkvfn commented Oct 24, 2017

应该就是jdk版本原因导致的。暂时不想升级到jdk8。坐等下一版本发布。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants