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

Variable mismatch exception immediately after startup #489

Open
udalrich opened this issue Dec 2, 2024 · 0 comments
Open

Variable mismatch exception immediately after startup #489

udalrich opened this issue Dec 2, 2024 · 0 comments

Comments

@udalrich
Copy link

udalrich commented Dec 2, 2024

Describe the bug
lsp-java had been working. I recently upgraded to the latest version, and no features work any more.

When I look in *lsp-log*, I see messages like

Dec 2, 2024, 10:50:51 AM Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
cannot assign instance of org.eclipse.jdt.internal.core.ClasspathAttribute to field org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace.value of type java.lang.String in instance of org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace
java.lang.ClassCastException: cannot assign instance of org.eclipse.jdt.internal.core.ClasspathAttribute to field org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace.value of type java.lang.String in instance of org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace
	at java.base/java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2096)
	at java.base/java.io.ObjectStreamClass$FieldReflector.checkObjectFieldValueTypes(ObjectStreamClass.java:2060)
	at java.base/java.io.ObjectStreamClass.checkObjFieldValueTypes(ObjectStreamClass.java:1347)
	at java.base/java.io.ObjectInputStream$FieldValues.defaultCheckFieldValues(ObjectInputStream.java:2679)
	at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2486)
	at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2257)
	at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1733)
	at java.base/java.io.ObjectInputStream.readArray(ObjectInputStream.java:2157)

which make me think that it is trying to read serialized data for an incompatible version.

I have deleted .cache, .factorypath, .settings, .classpath, .project from the root of the project, but the project persists.

Given that there are java stack traces, a likely response (which I have received before when filing LSP issues) is "this is a server problem, ask them". Since this used to work for me, I suspect that the problem is not a bug in the server, but that I have old files somewhere. If you are able to point me to additional caches that should be cleared, that would be useful

Note
Before logging the bug please make sure that the issue is reproducible with latest melpa packages and it is reproducible with the clean config(the config from the getting started page.

I did an update of all packages this morning.

To Reproduce

I tried to create instructions starting with emacs -Q, but was unable to figure out how to install lsp and lsp-java.

Create a .dir-locals.el several levels above the project with this content:

((nil . ((lsp-java-java-path . "/opt/homebrew/Cellar/openjdk@17/17.0.12/bin/java")
         )
      )

Open an existing java file.
Accept the local variable setting: lsp-java-java-path : "/opt/homebrew/Cellar/openjdk@17/17.0.12/bin/java"
 
Open existing code inside a maven project.

M-x lsp-workspace-restart
Type the name of a variable and ..

Expected behavior

Completions appear. No exceptions are logged from lsp.

Screenshots
If applicable, add screenshots to help explain your problem.

Logs
Please include the debug stack trace (if there is an error) and the content of Messages buffer with lsp-print-io set to t in case the bug is related to client->server communication.

*lsp-log*

at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:467)
at org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper.readContainer(MavenClasspathContainerSaveHelper.java:63)
at org.eclipse.m2e.jdt.internal.BuildPathManager.getSavedContainer(BuildPathManager.java:229)
at org.eclipse.m2e.jdt.internal.MavenClasspathContainerInitializer.initialize(MavenClasspathContainerInitializer.java:48)
at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:3146)
at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:2094)
at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:3821)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:3271)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:3435)
at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:2520)
at org.eclipse.jdt.internal.core.DeltaProcessor.createExternalArchiveDelta(DeltaProcessor.java:1007)
at org.eclipse.jdt.internal.core.DeltaProcessor.checkExternalArchiveChanges(DeltaProcessor.java:877)
at org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged(DeltaProcessor.java:2100)
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.handleEvent(NotificationManager.java:279)
at org.eclipse.core.internal.resources.Workspace.broadcastEvent(Workspace.java:383)
at org.eclipse.core.internal.resources.Resource.refreshLocal(Resource.java:1572)
at org.eclipse.jdt.ls.core.internal.managers.MavenProjectImporter.updateProjects(MavenProjectImporter.java:276)
at org.eclipse.jdt.ls.core.internal.managers.MavenProjectImporter.importToWorkspace(MavenProjectImporter.java:245)
at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.importProjects(ProjectsManager.java:150)
at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.initializeProjects(ProjectsManager.java:112)
at org.eclipse.jdt.ls.core.internal.handlers.InitHandler$1.runInWorkspace(InitHandler.java:257)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:43)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Dec 2, 2024, 11:34:37 AM Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
cannot assign instance of org.eclipse.jdt.internal.core.ClasspathAttribute to field org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace.value of type java.lang.String in instance of org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace
java.lang.ClassCastException: cannot assign instance of org.eclipse.jdt.internal.core.ClasspathAttribute to field org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace.value of type java.lang.String in instance of org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace
at java.base/java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2096)
at java.base/java.io.ObjectStreamClass$FieldReflector.checkObjectFieldValueTypes(ObjectStreamClass.java:2060)
at java.base/java.io.ObjectStreamClass.checkObjFieldValueTypes(ObjectStreamClass.java:1347)
at java.base/java.io.ObjectInputStream$FieldValues.defaultCheckFieldValues(ObjectInputStream.java:2679)
at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2486)
at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2257)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1733)
at java.base/java.io.ObjectInputStream.readArray(ObjectInputStream.java:2157)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1721)
at java.base/java.io.ObjectInputStream$FieldValues.(ObjectInputStream.java:2606)
at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2457)
at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2257)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1733)
at java.base/java.io.ObjectInputStream.readArray(ObjectInputStream.java:2157)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1721)
at java.base/java.io.ObjectInputStream$FieldValues.(ObjectInputStream.java:2606)
at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2457)
at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2257)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1733)
at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:509)
at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:467)
at org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper.readContainer(MavenClasspathContainerSaveHelper.java:63)
at org.eclipse.m2e.jdt.internal.BuildPathManager.getSavedContainer(BuildPathManager.java:229)
at org.eclipse.m2e.jdt.internal.MavenClasspathContainerInitializer.initialize(MavenClasspathContainerInitializer.java:48)
at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:3146)
at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:2094)
at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:3821)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:3271)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:3435)
at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:2520)
at org.eclipse.jdt.internal.core.DeltaProcessor.createExternalArchiveDelta(DeltaProcessor.java:1007)
at org.eclipse.jdt.internal.core.DeltaProcessor.checkExternalArchiveChanges(DeltaProcessor.java:877)
at org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged(DeltaProcessor.java:2100)
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.handleEvent(NotificationManager.java:279)
at org.eclipse.core.internal.resources.Workspace.broadcastEvent(Workspace.java:383)
at org.eclipse.core.internal.resources.Resource.refreshLocal(Resource.java:1572)
at org.eclipse.jdt.ls.core.internal.managers.MavenProjectImporter.updateProjects(MavenProjectImporter.java:276)
at org.eclipse.jdt.ls.core.internal.managers.MavenProjectImporter.importToWorkspace(MavenProjectImporter.java:245)
at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.importProjects(ProjectsManager.java:150)
at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.initializeProjects(ProjectsManager.java:112)
at org.eclipse.jdt.ls.core.internal.handlers.InitHandler$1.runInWorkspace(InitHandler.java:257)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:43)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Dec 2, 2024, 11:34:37 AM Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
cannot assign instance of org.eclipse.jdt.internal.core.ClasspathAttribute to field org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace.value of type java.lang.String in instance of org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace
java.lang.ClassCastException: cannot assign instance of org.eclipse.jdt.internal.core.ClasspathAttribute to field org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace.value of type java.lang.String in instance of org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace
at java.base/java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2096)
at java.base/java.io.ObjectStreamClass$FieldReflector.checkObjectFieldValueTypes(ObjectStreamClass.java:2060)
at java.base/java.io.ObjectStreamClass.checkObjFieldValueTypes(ObjectStreamClass.java:1347)
at java.base/java.io.ObjectInputStream$FieldValues.defaultCheckFieldValues(ObjectInputStream.java:2679)
at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2486)
at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2257)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1733)
at java.base/java.io.ObjectInputStream.readArray(ObjectInputStream.java:2157)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1721)
at java.base/java.io.ObjectInputStream$FieldValues.(ObjectInputStream.java:2606)
at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2457)
at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2257)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1733)
at java.base/java.io.ObjectInputStream.readArray(ObjectInputStream.java:2157)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1721)
at java.base/java.io.ObjectInputStream$FieldValues.(ObjectInputStream.java:2606)
at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2457)
at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2257)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1733)
at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:509)
at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:467)
at org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper.readContainer(MavenClasspathContainerSaveHelper.java:63)
at org.eclipse.m2e.jdt.internal.BuildPathManager.getSavedContainer(BuildPathManager.java:229)
at org.eclipse.m2e.jdt.internal.MavenClasspathContainerInitializer.initialize(MavenClasspathContainerInitializer.java:48)
at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:3146)
at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:2094)
at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:3821)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:3271)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:3435)
at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:2520)
at org.eclipse.jdt.internal.core.DeltaProcessor.createExternalArchiveDelta(DeltaProcessor.java:1007)
at org.eclipse.jdt.internal.core.DeltaProcessor.checkExternalArchiveChanges(DeltaProcessor.java:877)
at org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged(DeltaProcessor.java:2100)
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.handleEvent(NotificationManager.java:279)
at org.eclipse.core.internal.resources.Workspace.broadcastEvent(Workspace.java:383)
at org.eclipse.core.internal.resources.Resource.refreshLocal(Resource.java:1572)
at org.eclipse.jdt.ls.core.internal.managers.MavenProjectImporter.updateProjects(MavenProjectImporter.java:276)
at org.eclipse.jdt.ls.core.internal.managers.MavenProjectImporter.importToWorkspace(MavenProjectImporter.java:245)
at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.importProjects(ProjectsManager.java:150)
at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.initializeProjects(ProjectsManager.java:112)
at org.eclipse.jdt.ls.core.internal.handlers.InitHandler$1.runInWorkspace(InitHandler.java:257)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:43)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Dec 2, 2024, 11:34:37 AM Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
cannot assign instance of org.eclipse.jdt.internal.core.ClasspathAttribute to field org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace.value of type java.lang.String in instance of org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace
java.lang.ClassCastException: cannot assign instance of org.eclipse.jdt.internal.core.ClasspathAttribute to field org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace.value of type java.lang.String in instance of org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace
at java.base/java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2096)
at java.base/java.io.ObjectStreamClass$FieldReflector.checkObjectFieldValueTypes(ObjectStreamClass.java:2060)
at java.base/java.io.ObjectStreamClass.checkObjFieldValueTypes(ObjectStreamClass.java:1347)
at java.base/java.io.ObjectInputStream$FieldValues.defaultCheckFieldValues(ObjectInputStream.java:2679)
at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2486)
at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2257)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1733)
at java.base/java.io.ObjectInputStream.readArray(ObjectInputStream.java:2157)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1721)
at java.base/java.io.ObjectInputStream$FieldValues.(ObjectInputStream.java:2606)
at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2457)
at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2257)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1733)
at java.base/java.io.ObjectInputStream.readArray(ObjectInputStream.java:2157)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1721)
at java.base/java.io.ObjectInputStream$FieldValues.(ObjectInputStream.java:2606)
at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2457)
at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2257)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1733)
at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:509)
at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:467)
at org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper.readContainer(MavenClasspathContainerSaveHelper.java:63)
at org.eclipse.m2e.jdt.internal.BuildPathManager.getSavedContainer(BuildPathManager.java:229)
at org.eclipse.m2e.jdt.internal.MavenClasspathContainerInitializer.initialize(MavenClasspathContainerInitializer.java:48)
at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:3146)
at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:2094)
at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:3821)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:3271)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:3435)
at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:2520)
at org.eclipse.jdt.internal.core.DeltaProcessor.createExternalArchiveDelta(DeltaProcessor.java:1007)
at org.eclipse.jdt.internal.core.DeltaProcessor.checkExternalArchiveChanges(DeltaProcessor.java:877)
at org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged(DeltaProcessor.java:2100)
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.handleEvent(NotificationManager.java:279)
at org.eclipse.core.internal.resources.Workspace.broadcastEvent(Workspace.java:383)
at org.eclipse.core.internal.resources.Resource.refreshLocal(Resource.java:1572)
at org.eclipse.jdt.ls.core.internal.managers.MavenProjectImporter.updateProjects(MavenProjectImporter.java:276)
at org.eclipse.jdt.ls.core.internal.managers.MavenProjectImporter.importToWorkspace(MavenProjectImporter.java:245)
at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.importProjects(ProjectsManager.java:150)
at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.initializeProjects(ProjectsManager.java:112)
at org.eclipse.jdt.ls.core.internal.handlers.InitHandler$1.runInWorkspace(InitHandler.java:257)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:43)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Dec 2, 2024, 11:34:37 AM Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
cannot assign instance of org.eclipse.jdt.internal.core.ClasspathAttribute to field org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace.value of type java.lang.String in instance of org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace
java.lang.ClassCastException: cannot assign instance of org.eclipse.jdt.internal.core.ClasspathAttribute to field org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace.value of type java.lang.String in instance of org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace
at java.base/java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2096)
at java.base/java.io.ObjectStreamClass$FieldReflector.checkObjectFieldValueTypes(ObjectStreamClass.java:2060)
at java.base/java.io.ObjectStreamClass.checkObjFieldValueTypes(ObjectStreamClass.java:1347)
at java.base/java.io.ObjectInputStream$FieldValues.defaultCheckFieldValues(ObjectInputStream.java:2679)
at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2486)
at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2257)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1733)
at java.base/java.io.ObjectInputStream.readArray(ObjectInputStream.java:2157)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1721)
at java.base/java.io.ObjectInputStream$FieldValues.(ObjectInputStream.java:2606)
at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2457)
at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2257)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1733)
at java.base/java.io.ObjectInputStream.readArray(ObjectInputStream.java:2157)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1721)
at java.base/java.io.ObjectInputStream$FieldValues.(ObjectInputStream.java:2606)
at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2457)
at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2257)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1733)
at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:509)
at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:467)
at org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper.readContainer(MavenClasspathContainerSaveHelper.java:63)
at org.eclipse.m2e.jdt.internal.BuildPathManager.getSavedContainer(BuildPathManager.java:229)
at org.eclipse.m2e.jdt.internal.MavenClasspathContainerInitializer.initialize(MavenClasspathContainerInitializer.java:48)
at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:3146)
at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:2094)
at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:3821)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:3271)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:3435)
at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:2520)
at org.eclipse.jdt.internal.core.DeltaProcessor.createExternalArchiveDelta(DeltaProcessor.java:1007)
at org.eclipse.jdt.internal.core.DeltaProcessor.checkExternalArchiveChanges(DeltaProcessor.java:877)
at org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged(DeltaProcessor.java:2100)
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.handleEvent(NotificationManager.java:279)
at org.eclipse.core.internal.resources.Workspace.broadcastEvent(Workspace.java:383)
at org.eclipse.core.internal.resources.Resource.refreshLocal(Resource.java:1572)
at org.eclipse.jdt.ls.core.internal.managers.MavenProjectImporter.updateProjects(MavenProjectImporter.java:276)
at org.eclipse.jdt.ls.core.internal.managers.MavenProjectImporter.importToWorkspace(MavenProjectImporter.java:245)
at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.importProjects(ProjectsManager.java:150)
at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.initializeProjects(ProjectsManager.java:112)
at org.eclipse.jdt.ls.core.internal.handlers.InitHandler$1.runInWorkspace(InitHandler.java:257)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:43)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Dec 2, 2024, 11:34:37 AM Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
cannot assign instance of org.eclipse.jdt.internal.core.ClasspathAttribute to field org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace.value of type java.lang.String in instance of org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace
java.lang.ClassCastException: cannot assign instance of org.eclipse.jdt.internal.core.ClasspathAttribute to field org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace.value of type java.lang.String in instance of org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace
at java.base/java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2096)
at java.base/java.io.ObjectStreamClass$FieldReflector.checkObjectFieldValueTypes(ObjectStreamClass.java:2060)
at java.base/java.io.ObjectStreamClass.checkObjFieldValueTypes(ObjectStreamClass.java:1347)
at java.base/java.io.ObjectInputStream$FieldValues.defaultCheckFieldValues(ObjectInputStream.java:2679)
at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2486)
at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2257)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1733)
at java.base/java.io.ObjectInputStream.readArray(ObjectInputStream.java:2157)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1721)
at java.base/java.io.ObjectInputStream$FieldValues.(ObjectInputStream.java:2606)
at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2457)
at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2257)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1733)
at java.base/java.io.ObjectInputStream.readArray(ObjectInputStream.java:2157)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1721)
at java.base/java.io.ObjectInputStream$FieldValues.(ObjectInputStream.java:2606)
at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2457)
at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2257)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1733)
at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:509)
at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:467)
at org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper.readContainer(MavenClasspathContainerSaveHelper.java:63)
at org.eclipse.m2e.jdt.internal.BuildPathManager.getSavedContainer(BuildPathManager.java:229)
at org.eclipse.m2e.jdt.internal.MavenClasspathContainerInitializer.initialize(MavenClasspathContainerInitializer.java:48)
at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:3146)
at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:2094)
at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:3821)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:3271)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:3435)
at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:2520)
at org.eclipse.jdt.internal.core.DeltaProcessor.createExternalArchiveDelta(DeltaProcessor.java:1007)
at org.eclipse.jdt.internal.core.DeltaProcessor.checkExternalArchiveChanges(DeltaProcessor.java:877)
at org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged(DeltaProcessor.java:2100)
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.handleEvent(NotificationManager.java:279)
at org.eclipse.core.internal.resources.Workspace.broadcastEvent(Workspace.java:383)
at org.eclipse.core.internal.resources.Resource.refreshLocal(Resource.java:1572)
at org.eclipse.jdt.ls.core.internal.managers.MavenProjectImporter.updateProjects(MavenProjectImporter.java:276)
at org.eclipse.jdt.ls.core.internal.managers.MavenProjectImporter.importToWorkspace(MavenProjectImporter.java:245)
at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.importProjects(ProjectsManager.java:150)
at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.initializeProjects(ProjectsManager.java:112)
at org.eclipse.jdt.ls.core.internal.handlers.InitHandler$1.runInWorkspace(InitHandler.java:257)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:43)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Dec 2, 2024, 11:34:37 AM Importing Maven project(s)
Dec 2, 2024, 11:34:37 AM Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
cannot assign instance of org.eclipse.jdt.internal.core.ClasspathAttribute to field org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace.value of type java.lang.String in instance of org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace
java.lang.ClassCastException: cannot assign instance of org.eclipse.jdt.internal.core.ClasspathAttribute to field org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace.value of type java.lang.String in instance of org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper$ClasspathAttributeReplace
at java.base/java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2096)
at java.base/java.io.ObjectStreamClass$FieldReflector.checkObjectFieldValueTypes(ObjectStreamClass.java:2060)
at java.base/java.io.ObjectStreamClass.checkObjFieldValueTypes(ObjectStreamClass.java:1347)
at java.base/java.io.ObjectInputStream$FieldValues.defaultCheckFieldValues(ObjectInputStream.java:2679)
at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2486)
at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2257)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1733)
at java.base/java.io.ObjectInputStream.readArray(ObjectInputStream.java:2157)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1721)
at java.base/java.io.ObjectInputStream$FieldValues.(ObjectInputStream.java:2606)
at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2457)
at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2257)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1733)
at java.base/java.io.ObjectInputStream.readArray(ObjectInputStream.java:2157)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1721)
at java.base/java.io.ObjectInputStream$FieldValues.(ObjectInputStream.java:2606)
at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2457)
at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2257)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1733)
at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:509)
at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:467)
at org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper.readContainer(MavenClasspathContainerSaveHelper.java:63)
at org.eclipse.m2e.jdt.internal.BuildPathManager.getSavedContainer(BuildPathManager.java:229)
at org.eclipse.m2e.jdt.internal.MavenClasspathContainerInitializer.initialize(MavenClasspathContainerInitializer.java:48)
at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:3146)
at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:2094)
at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:3821)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:3271)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:3435)
at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:2520)
at org.eclipse.jdt.internal.core.DeltaProcessor.createExternalArchiveDelta(DeltaProcessor.java:1007)
at org.eclipse.jdt.internal.core.DeltaProcessor.checkExternalArchiveChanges(DeltaProcessor.java:877)
at org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged(DeltaProcessor.java:2100)
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.handleEvent(NotificationManager.java:279)
at org.eclipse.core.internal.resources.Workspace.broadcastEvent(Workspace.java:383)
at org.eclipse.core.internal.resources.Resource.refreshLocal(Resource.java:1572)
at org.eclipse.jdt.ls.core.internal.managers.MavenProjectImporter.updateProjects(MavenProjectImporter.java:276)
at org.eclipse.jdt.ls.core.internal.managers.MavenProjectImporter.importToWorkspace(MavenProjectImporter.java:245)
at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.importProjects(ProjectsManager.java:150)
at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.initializeProjects(ProjectsManager.java:112)
at org.eclipse.jdt.ls.core.internal.handlers.InitHandler$1.runInWorkspace(InitHandler.java:257)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:43)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

I deleted a bunch of the *lsp-log* buffer, since otherwise the comment was too long.

The *jdtls-stderr* buffer is empty except for messages that previous servers have exited.

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

1 participant