Community
Participate
Working Groups
No idea where this is coming from, I saw this once on startup and haven't seen this on a next restart, using same workspace / baseline / code state. eclipse.buildId=4.23.0.I20220110-1800 java.version=11.0.10 java.vendor=Red Hat, Inc. BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US Command-line arguments: -data /data/4x_platform_workspace -os linux -ws gtk -arch x86_64 org.eclipse.core.jobs Error Tue Jan 11 08:52:42 CET 2022 An internal error occurred during: "API Analysis Builder". java.lang.IllegalArgumentException: invalid version "JavaSE-14": non-numeric "JavaSE-14" at org.osgi.framework.Version.parseInt(Version.java:169) at org.osgi.framework.Version.<init>(Version.java:126) at org.eclipse.pde.api.tools.internal.model.ApiBaseline.lambda$0(ApiBaseline.java:400) at java.base/java.util.TreeMap.compare(TreeMap.java:1292) at java.base/java.util.TreeMap.put(TreeMap.java:536) at java.base/java.util.TreeSet.add(TreeSet.java:255) at org.eclipse.pde.api.tools.internal.model.ApiBaseline.addComponent(ApiBaseline.java:401) at org.eclipse.pde.api.tools.internal.model.ApiBaseline.initialize(ApiBaseline.java:357) at org.eclipse.pde.api.tools.internal.model.ApiBaseline.initialize(ApiBaseline.java:234) at org.eclipse.pde.api.tools.internal.model.ApiBaseline.resolveSystemLibrary(ApiBaseline.java:491) at org.eclipse.pde.api.tools.internal.model.ApiBaseline.addApiComponents(ApiBaseline.java:430) at org.eclipse.pde.api.tools.internal.ApiBaselineManager.restoreBaseline(ApiBaselineManager.java:475) at org.eclipse.pde.api.tools.internal.ApiBaselineManager.loadBaselineInfos(ApiBaselineManager.java:235) at org.eclipse.pde.api.tools.internal.model.ApiBaseline.loadBaselineInfos(ApiBaseline.java:739) at org.eclipse.pde.api.tools.internal.model.ApiBaseline.getApiComponent(ApiBaseline.java:706) at org.eclipse.pde.api.tools.internal.builder.BaseApiAnalyzer.checkBaselineMismatch(BaseApiAnalyzer.java:2646) at org.eclipse.pde.api.tools.internal.builder.ApiAnalysisBuilder.buildAll(ApiAnalysisBuilder.java:891) at org.eclipse.pde.api.tools.internal.builder.ApiAnalysisBuilder.work(ApiAnalysisBuilder.java:432) at org.eclipse.pde.api.tools.internal.builder.ApiAnalysisBuilder$ApiAnalysisJob.run(ApiAnalysisBuilder.java:578) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) Caused by: java.lang.NumberFormatException: For input string: "JavaSE-14" at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.base/java.lang.Integer.parseInt(Integer.java:652) at java.base/java.lang.Integer.parseInt(Integer.java:770) at org.osgi.framework.Version.parseInt(Version.java:167) ... 19 more
I am unable to put a breakpoint ( double click on editor ruler) at line number 400. Is this expected?
(In reply to Vikas Chandra from comment #1) > I am unable to put a breakpoint ( double click on editor ruler) at line > number 400. Is this expected? Yes. I think this is what is planned to be done by Sarika - breakpoints for single line lambdas.
I changed JRE ( trying to recreate this) and I got this below !STACK 1 org.eclipse.core.internal.resources.ResourceException(/org.eclipse.jdt.core/bin/org/eclipse/jdt/core/IMethod.class)[368]: java.lang.Exception: File not found: /home/vikas/git/eclipse.jdt.core_MASTER2021/org.eclipse.jdt.core/bin/org/eclipse/jdt/core/IMethod.class. at org.eclipse.core.internal.resources.ResourceException.provideStackTrace(ResourceException.java:42) at org.eclipse.core.internal.resources.ResourceException.<init>(ResourceException.java:38) at org.eclipse.core.internal.localstore.FileSystemResourceManager.read(FileSystemResourceManager.java:835) at org.eclipse.core.internal.resources.File.getContents(File.java:275) at org.eclipse.pde.api.tools.internal.model.ResourceApiTypeRoot.getContents(ResourceApiTypeRoot.java:62) at org.eclipse.pde.api.tools.internal.model.AbstractApiTypeRoot.getStructure(AbstractApiTypeRoot.java:62) at org.eclipse.pde.api.tools.internal.provisional.comparator.ApiComparator$2.visit(ApiComparator.java:747) at org.eclipse.pde.api.tools.internal.model.ArchiveApiTypeContainer.accept(ArchiveApiTypeContainer.java:198) at org.eclipse.pde.api.tools.internal.provisional.comparator.ApiComparator.internalCompare(ApiComparator.java:659)
New SDK build, same workspace, nothing changed in any settings. After 2 starts I've got this on startup (note the different name now): eclipse.buildId=4.23.0.I20220112-0210 java.version=11.0.10 java.vendor=Red Hat, Inc. BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US Command-line arguments: -data file:/data/4x_platform_workspace/ -os linux -ws gtk -arch x86_64 org.eclipse.core.jobs Error Wed Jan 12 10:11:06 CET 2022 An internal error occurred during: "API Analysis Builder". java.lang.IllegalArgumentException: invalid version "JavaSE-1.8": non-numeric "JavaSE-1" at org.osgi.framework.Version.parseInt(Version.java:169) at org.osgi.framework.Version.<init>(Version.java:126) at org.eclipse.pde.api.tools.internal.model.ApiBaseline.lambda$0(ApiBaseline.java:400) at java.base/java.util.TreeMap.compare(TreeMap.java:1292) at java.base/java.util.TreeMap.put(TreeMap.java:536) at java.base/java.util.TreeSet.add(TreeSet.java:255) at org.eclipse.pde.api.tools.internal.model.ApiBaseline.addComponent(ApiBaseline.java:401) at org.eclipse.pde.api.tools.internal.model.ApiBaseline.initialize(ApiBaseline.java:357) at org.eclipse.pde.api.tools.internal.model.ApiBaseline.initialize(ApiBaseline.java:234) at org.eclipse.pde.api.tools.internal.model.ApiBaseline.resolveSystemLibrary(ApiBaseline.java:491) at org.eclipse.pde.api.tools.internal.model.ApiBaseline.addApiComponents(ApiBaseline.java:430) at org.eclipse.pde.api.tools.internal.ApiBaselineManager.restoreBaseline(ApiBaselineManager.java:475) at org.eclipse.pde.api.tools.internal.ApiBaselineManager.loadBaselineInfos(ApiBaselineManager.java:235) at org.eclipse.pde.api.tools.internal.model.ApiBaseline.loadBaselineInfos(ApiBaseline.java:739) at org.eclipse.pde.api.tools.internal.model.ApiBaseline.getApiComponent(ApiBaseline.java:706) at org.eclipse.pde.api.tools.internal.builder.BaseApiAnalyzer.checkBaselineMismatch(BaseApiAnalyzer.java:2646) at org.eclipse.pde.api.tools.internal.builder.ApiAnalysisBuilder.buildAll(ApiAnalysisBuilder.java:891) at org.eclipse.pde.api.tools.internal.builder.ApiAnalysisBuilder.work(ApiAnalysisBuilder.java:432) at org.eclipse.pde.api.tools.internal.builder.ApiAnalysisBuilder$ApiAnalysisJob.run(ApiAnalysisBuilder.java:578) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) Caused by: java.lang.NumberFormatException: For input string: "JavaSE-1" at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.base/java.lang.Integer.parseInt(Integer.java:652) at java.base/java.lang.Integer.parseInt(Integer.java:770) at org.osgi.framework.Version.parseInt(Version.java:167) ... 19 more
Is the new option 'Run API Analysis as job" checked?
Faced the same problem after checking 'Run API Analysis as job" and restart of workspace.
(In reply to Vikas Chandra from comment #5) > Is the new option 'Run API Analysis as job" checked? Yes. Looks like a startup / initialization issue in PDE that is timing dependent, revealed by the job. Or some PDE internal data structure init needs to run *while holding the workspace lock* - now because the job is decoupled from workspace build something runs in parallel?
(In reply to Sarika Sinha from comment #6) > Faced the same problem after checking 'Run API Analysis as job" and restart > of workspace. I can recreate every time but only if I import Git from a different install before restart.
(In reply to Sarika Sinha from comment #8) > but only if I import Git from a different install What do you mean by that? Could you please provide steps?
New Gerrit change created: https://git.eclipse.org/r/c/pde/eclipse.pde.ui/+/189539
This could happen if there are multiple JRE locations for the same java version. Not sure why this comes previously but for SystemAPILibraryComponent, we can have just check if the version strings are equal and return 0. Since systemlibrary's symbolic name public String getSymbolicName() { return fExecEnv[0]; } and version is same @Override public String getVersion() { return fVersion; } private void init(ExecutionEnvironmentDescription description) { fLibraries = description.getLibraryLocations(); fExecEnv = new String[] { description.getProperty(ExecutionEnvironmentDescription.CLASS_LIB_LEVEL) }; fVersion = fExecEnv[0]; it will always be equal and compare can return 0
(In reply to Andrey Loskutov from comment #9) > (In reply to Sarika Sinha from comment #8) > > but only if I import Git from a different install > > What do you mean by that? Could you please provide steps? Steps : 1. Start the Eclipse in the older workspace where I have JDT and Platform repos 2. Check the "Run API Analysis as job" option 3. Import/Install EGit plugin ( I generally take it from a different build where I had it installed) 4. Completion of install asks for restart 5. On the restart, API Builder kicks in and Error dialog pops in I tried skipping step 3 but could not recreate the problem. I have many JREs in the "Installed JREs" but all points to distinct Java path.
Could not reproduce with I20220112-1800
(In reply to Sarika Sinha from comment #13) > Could not reproduce with I20220112-1800 I saw this once again, unfortunately, but couldn't enforce.
(In reply to Sarika Sinha from comment #12) > (In reply to Andrey Loskutov from comment #9) > > (In reply to Sarika Sinha from comment #8) > > > but only if I import Git from a different install > > > > What do you mean by that? Could you please provide steps? > > Steps : > 1. Start the Eclipse in the older workspace where I have JDT and Platform > repos > 2. Check the "Run API Analysis as job" option > 3. Import/Install EGit plugin ( I generally take it from a different build > where I had it installed) > 4. Completion of install asks for restart > 5. On the restart, API Builder kicks in and Error dialog pops in > > > I tried skipping step 3 but could not recreate the problem. > I have many JREs in the "Installed JREs" but all points to distinct Java > path. I got the below with the same steps. ( with Build id: I20220114-1800) java.lang.IllegalStateException at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:1182) at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:868) at org.eclipse.jdt.core.manipulation.CoreASTProvider$1.run(CoreASTProvider.java:272) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.jdt.core.manipulation.CoreASTProvider.createAST(CoreASTProvider.java:264) at org.eclipse.jdt.core.manipulation.CoreASTProvider.getAST(CoreASTProvider.java:197) at org.eclipse.jdt.core.manipulation.SharedASTProviderCore.getAST(SharedASTProviderCore.java:138) at org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditor$1.run(ClassFileEditor.java:713) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Gerrit change https://git.eclipse.org/r/c/pde/eclipse.pde.ui/+/189539 was merged to [master]. Commit: http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=26ba3a58e399a6a34d1ccb398bb4eca4c6dae8d7
I was never able to recreate this with any of the builds on Linux as well as windows. However I added a safety check and a log info In the error log, please look for "Multiple locations for the same Java" That should also print 2 locations along with it.
The internal error should not happen now. Instead we may see some logging info to take this further.
Please look for "Multiple locations for the same Java" in the error log. If you see it, please post on this bug.
I will mark this as resolved and if the log contains "Multiple locations for the same Java", I will investigate ( re-open if required)
(In reply to Vikas Chandra from comment #19) > Please look for "Multiple locations for the same Java" in the error log. If > you see it, please post on this bug. I haven't seen that anymore, also no new log entries. I believe this (abscence of errors) could be the positive side effect of bug 578204 changes.