You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
!ENTRY org.eclipse.jdt.core 4 4 2022-07-17 08:22:09.035
!MESSAGE Background Indexer Crash Recovery
!STACK 0
java.lang.NullPointerException: Cannot invoke "java.net.URI.toString()" because "this.uri" is null
at org.eclipse.jdt.internal.core.index.IndexLocation.toString(IndexLocation.java:154)
at org.eclipse.jdt.internal.core.search.indexing.IndexManager.writeIndexMapFile(IndexManager.java:1484)
at org.eclipse.jdt.internal.core.search.indexing.IndexManager.addIndex(IndexManager.java:785)
at org.eclipse.jdt.internal.core.search.indexing.AddJarFileToIndex.execute(AddJarFileToIndex.java:98)
at org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobManager.java:478)
at java.base/java.lang.Thread.run(Thread.java:833)
!ENTRY org.eclipse.jdt.core 1 0 2022-07-17 08:22:11.425
!MESSAGE SETUP testBug576433
Exception in thread "Java indexing" java.lang.NullPointerException: Cannot invoke "java.net.URI.toString()" because "this.uri" is null
at org.eclipse.jdt.internal.core.index.IndexLocation.toString(IndexLocation.java:154)
at org.eclipse.jdt.internal.core.search.indexing.IndexManager.writeIndexMapFile(IndexManager.java:1484)
at org.eclipse.jdt.internal.core.search.indexing.IndexManager.addIndex(IndexManager.java:785)
at org.eclipse.jdt.internal.core.search.indexing.AddJarFileToIndex.execute(AddJarFileToIndex.java:98)
at org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobManager.java:478)
at java.base/java.lang.Thread.run(Thread.java:833)
The root cause is that we don't set uri field if we can't parse URL in IndexLocation.
!ENTRY org.eclipse.jdt.core 4 4 2022-07-17 08:22:09.035
!MESSAGE Background Indexer Crash Recovery
!STACK 0
java.lang.NullPointerException: Cannot invoke "java.net.URI.toString()" because "this.uri" is null
at org.eclipse.jdt.internal.core.index.IndexLocation.toString(IndexLocation.java:154)
at org.eclipse.jdt.internal.core.search.indexing.IndexManager.writeIndexMapFile(IndexManager.java:1484)
at org.eclipse.jdt.internal.core.search.indexing.IndexManager.addIndex(IndexManager.java:785)
at org.eclipse.jdt.internal.core.search.indexing.AddJarFileToIndex.execute(AddJarFileToIndex.java:98)
at org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobManager.java:478)
at java.base/java.lang.Thread.run(Thread.java:833)
Looks like we don't properly convert Windows paths before:
!ENTRY org.eclipse.jdt.core 1 0 2022-07-17 08:22:06.335
!MESSAGE SETUP testIndexInJar
!ENTRY org.eclipse.jdt.core 4 4 2022-07-17 08:22:06.361
!MESSAGE Unexpected url to uri failure
!STACK 0
java.net.URISyntaxException: Illegal character in opaque part at index 11: jar:file:C:\workspaces\TestIndex.zip!/Test.index
at java.base/java.net.URI$Parser.fail(URI.java:2974)
at java.base/java.net.URI$Parser.checkChars(URI.java:3145)
at java.base/java.net.URI$Parser.parse(URI.java:3181)
at java.base/java.net.URI.<init>(URI.java:623)
at java.base/java.net.URL.toURI(URL.java:1056)
at org.eclipse.jdt.internal.core.index.IndexLocation.<init>(IndexLocation.java:86)
at org.eclipse.jdt.internal.core.index.JarIndexLocation.<init>(JarIndexLocation.java:35)
at org.eclipse.jdt.internal.core.index.IndexLocation.createIndexLocation(IndexLocation.java:55)
at org.eclipse.jdt.internal.core.search.indexing.IndexManager.indexLibrary(IndexManager.java:754)
at org.eclipse.jdt.internal.core.search.indexing.IndexManager.indexLibrary(IndexManager.java:722)
at org.eclipse.jdt.internal.core.ClasspathChange.requestIndexing(ClasspathChange.java:577)
at org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged(DeltaProcessor.java:2134)
at org.eclipse.jdt.internal.core.DeltaProcessingState.resourceChanged(DeltaProcessingState.java:501)
at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:307)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:297)
at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:160)
at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:388)
at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1514)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2394)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2405)
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:811)
at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3684)
at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3644)
at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3700)
at org.eclipse.jdt.core.tests.model.AbstractJavaModelTests.setClasspath(AbstractJavaModelTests.java:3316)
at org.eclipse.jdt.core.tests.model.JavaIndexTests.testIndexInJar(JavaIndexTests.java:801)
!ENTRY org.eclipse.jdt.core 1 0 2022-07-17 08:22:09.013
!MESSAGE SETUP testSharedIndexLocation
!ENTRY org.eclipse.jdt.core 4 4 2022-07-17 08:22:09.025
!MESSAGE Unexpected url to uri failure
!STACK 0
java.net.URISyntaxException: Illegal character in opaque part at index 7: file:C:\tmp\shared_index7104254713724521707\440334612.index
at java.base/java.net.URI$Parser.fail(URI.java:2974)
at java.base/java.net.URI$Parser.checkChars(URI.java:3145)
at java.base/java.net.URI$Parser.parse(URI.java:3181)
at java.base/java.net.URI.<init>(URI.java:623)
at java.base/java.net.URL.toURI(URL.java:1056)
at org.eclipse.jdt.internal.core.index.IndexLocation.<init>(IndexLocation.java:86)
at org.eclipse.jdt.internal.core.index.FileIndexLocation.<init>(FileIndexLocation.java:34)
at org.eclipse.jdt.internal.core.index.IndexLocation.createIndexLocation(IndexLocation.java:53)
at org.eclipse.jdt.internal.core.search.indexing.IndexManager.indexLibrary(IndexManager.java:754)
at org.eclipse.jdt.internal.core.search.indexing.IndexManager.indexLibrary(IndexManager.java:722)
at org.eclipse.jdt.internal.core.search.indexing.IndexManager.indexAll(IndexManager.java:708)
at org.eclipse.jdt.internal.core.DeltaProcessor.updateIndex(DeltaProcessor.java:2733)
at org.eclipse.jdt.internal.core.DeltaProcessor.updateCurrentDeltaAndIndex(DeltaProcessor.java:2600)
at org.eclipse.jdt.internal.core.DeltaProcessor.traverseDelta(DeltaProcessor.java:2323)
at org.eclipse.jdt.internal.core.DeltaProcessor.processResourceDelta(DeltaProcessor.java:1981)
at org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged(DeltaProcessor.java:2155)
at org.eclipse.jdt.internal.core.DeltaProcessingState.resourceChanged(DeltaProcessingState.java:501)
at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:307)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:297)
at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:160)
at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:388)
at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1514)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2394)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2400)
at org.eclipse.jdt.core.tests.model.AbstractJavaModelTests.createJavaProject(AbstractJavaModelTests.java:2314)
at org.eclipse.jdt.core.tests.model.AbstractJavaModelTests.createJavaProject(AbstractJavaModelTests.java:1977)
at org.eclipse.jdt.core.tests.model.AbstractJavaModelTests.createJavaProject(AbstractJavaModelTests.java:1780)
at org.eclipse.jdt.core.tests.model.AbstractJavaModelTests.createJavaProject(AbstractJavaModelTests.java:1730)
at org.eclipse.jdt.core.tests.model.JavaIndexTests.testSharedIndexLocation(JavaIndexTests.java:901)
The text was updated successfully, but these errors were encountered:
OK, in large parts https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/174169 was wrong and as side effect we have this NPE's and most likely org.eclipse.jdt.core.tests.model.JavaIndexTests.testIndexInJar failure on Windows (is there since 4.24).
URL's are not as strict as URI's but the code that supports such crazy constructs like jar:file: syntax (see org.eclipse.jdt.core.tests.model.JavaIndexTests.testIndexInJar()) is failing now.
This must be reverted in few places.
iloveeclipse
added a commit
to iloveeclipse/eclipse.jdt.core
that referenced
this issue
Jul 17, 2022
In large parts https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/174169
was wrong and as side effect we have NPE's trying to persist jar index
location that has no valid URI and also
org.eclipse.jdt.core.tests.model.JavaIndexTests.testIndexInJar failure
on Windows (is there since 4.24).
URL's are not as strict as URI's but the code that supports such crazy
constructs like jar:file: syntax (see
org.eclipse.jdt.core.tests.model.JavaIndexTests.testIndexInJar()) is
failing now.
Revisited all places from original gerrit that changed URL to URI and
changed to something that actually works.
Fixeseclipse-jdt#235
In large parts https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/174169
was wrong and as side effect we have NPE's trying to persist jar index
location that has no valid URI and also
org.eclipse.jdt.core.tests.model.JavaIndexTests.testIndexInJar failure
on Windows (is there since 4.24).
URL's are not as strict as URI's but the code that supports such crazy
constructs like jar:file: syntax (see
org.eclipse.jdt.core.tests.model.JavaIndexTests.testIndexInJar()) is
failing now.
Revisited all places from original gerrit that changed URL to URI and
changed to something that actually works.
Fixes#235
Saw errors below during tests:
The root cause is that we don't set
uri
field if we can't parse URL inIndexLocation
.Looks like we don't properly convert Windows paths before:
The text was updated successfully, but these errors were encountered: