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

Java language server seems to fail to start due to not finding the parent project specified in pom.xml #702

Open
tristan957 opened this issue Nov 1, 2018 · 31 comments
Assignees

Comments

@tristan957
Copy link

My work has this really funky setup for projects where there is this overarching Maven project called microservice-parent. Now the git repo contains a maven submodule of that project called dp-ms-demand-automation-parent, and that contains a maven submodule called dp-ms-demand-automation-server.

Folder structure looks like this

dp-ms-demand-automation
    .git/
    pom.xml (dp-ms-demand-automation-parent)
    server/
        pom.xml (dp-ms-demand-automation-server)
        src/

As you can see there is a ghost Maven project for microservice-parent.

The following error is shown in both pom files.

[Java] Project build error: Non-resolvable parent POM for com.tenx.ms:dp-ms-demand-automation-parent:1.0.0-SNAPSHOT: Failure to find com.tenx.ms:microservice-parent:pom:1.5.14-1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at no local POM

Is it possible to have the language server still start even though this error exists?

Environment
  • Operating System: macOS 14
  • JDK version: 8.172
  • Visual Studio Code version: 1.28.2
  • Java extension version: 0.33
Steps To Reproduce
  1. Create project structure similar to the one above
  2. Open vscode

Log

!SESSION 2018-11-01 09:40:36.045 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_181
java.vendor=Azul Systems, Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Command-line arguments:  -data /Users/tristan.partin/Library/Application Support/Code/User/workspaceStorage/2258a3bf734a6933686c851c9d962710/redhat.java/jdt_ws

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:37.853
!MESSAGE class org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin is started

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:38.011
!MESSAGE Main thread is waiting

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:38.033
!MESSAGE >> initialize

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:38.034
!MESSAGE Initializing Java Language Server 0.27.0.201810230509

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:38.063
!MESSAGE Installed reference:file:/Users/tristan.partin/.vscode/extensions/vscjava.vscode-java-debug-0.15.0/server/com.microsoft.java.debug.plugin-0.15.0.jar

!ENTRY org.eclipse.core.net 1 0 2018-11-01 09:40:38.080
!MESSAGE System property http.nonProxyHosts has been set to local|*.local|169.254/16|*.169.254/16 by an external source. This value will be overwritten using the values from the preferences

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:38.122
!MESSAGE Creating the default Java project

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:38.124
!MESSAGE Started reference:file:/Users/tristan.partin/.vscode/extensions/vscjava.vscode-java-debug-0.15.0/server/com.microsoft.java.debug.plugin-0.15.0.jar

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:38.376
!MESSAGE >> initialized

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:39.002
!MESSAGE Finished creating the default Java project

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:39.151
!MESSAGE Importing Maven project(s)

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:39.900
!MESSAGE Workspace initialized in 1855ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:39.966
!MESSAGE >> workspace/didChangeConfiguration

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:39.967
!MESSAGE >> registerFeature 'workspace/didChangeWatchedFiles'

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:39.979
!MESSAGE >>New configuration: {java={home=null, jdt={ls={vmargs=-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication}}, errors={incompleteClasspath={severity=warning}}, configuration={updateBuildConfiguration=automatic, maven={userSettings=null}}, trace={server=off}, import={gradle={enabled=true}, maven={enabled=true}, exclusions=[**/node_modules/**, **/.metadata/**, **/archetype-resources/**, **/META-INF/maven/**]}, referencesCodeLens={enabled=true}, signatureHelp={enabled=false}, implementationsCodeLens={enabled=true}, format={enabled=false, settings={url=null, profile=null}, comments={enabled=true}, onType={enabled=false}}, saveActions={organizeImports=false}, contentProvider={preferred=null}, autobuild={enabled=false}, completion={enabled=true, overwrite=false, guessMethodArguments=false, favoriteStaticMembers=[org.junit.Assert.*, org.junit.Assume.*, org.junit.jupiter.api.Assertions.*, org.junit.jupiter.api.Assumptions.*, org.junit.jupiter.api.DynamicContainer.*, org.junit.jupiter.api.DynamicTest.*, org.mockito.Mockito.*, org.mockito.ArgumentMatchers.*, org.mockito.Answers.*], importOrder=[java, javax, com, org]}, progressReports={enabled=true}, debug={logLevel=warn, settings={showHex=false, showStaticVariables=true, showQualifiedNames=false, maxStringLength=0.0, enableHotCodeReplace=true, enableRunDebugCodeLens=true}}}}

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:39.981
!MESSAGE >> workspace/didChangeWatchedFiles 

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:53.005
!MESSAGE >> shutdown

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:53.030
!MESSAGE >> exit

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:53.031
!MESSAGE Shutdown received... waking up main thread

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:53.035
!MESSAGE class org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin is stopping:
!SESSION 2018-11-01 09:40:57.683 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_181
java.vendor=Azul Systems, Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Command-line arguments:  -data /Users/tristan.partin/Library/Application Support/Code/User/workspaceStorage/2258a3bf734a6933686c851c9d962710/redhat.java/jdt_ws

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:59.196
!MESSAGE class org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin is started

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:59.308
!MESSAGE Main thread is waiting

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:59.330
!MESSAGE >> initialize

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:59.331
!MESSAGE Initializing Java Language Server 0.27.0.201810230509

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:59.352
!MESSAGE >> initialized

!ENTRY org.eclipse.core.net 1 0 2018-11-01 09:40:59.394
!MESSAGE System property http.nonProxyHosts has been set to local|*.local|169.254/16|*.169.254/16 by an external source. This value will be overwritten using the values from the preferences

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:59.417
!MESSAGE Creating the default Java project

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:59.436
!MESSAGE Finished creating the default Java project

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:59.660
!MESSAGE Importing Maven project(s)

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:59.710
!MESSAGE Workspace initialized in 371ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:59.750
!MESSAGE >> workspace/didChangeConfiguration

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:59.751
!MESSAGE >> registerFeature 'workspace/didChangeWatchedFiles'

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:40:59.774
!MESSAGE >>New configuration: {java={home=null, jdt={ls={vmargs=-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication}}, errors={incompleteClasspath={severity=warning}}, configuration={updateBuildConfiguration=automatic, maven={userSettings=null}}, trace={server=off}, import={gradle={enabled=true}, maven={enabled=true}, exclusions=[**/node_modules/**, **/.metadata/**, **/archetype-resources/**, **/META-INF/maven/**]}, referencesCodeLens={enabled=true}, signatureHelp={enabled=false}, implementationsCodeLens={enabled=true}, format={enabled=false, settings={url=null, profile=null}, comments={enabled=true}, onType={enabled=false}}, saveActions={organizeImports=false}, contentProvider={preferred=null}, autobuild={enabled=false}, completion={enabled=true, overwrite=false, guessMethodArguments=false, favoriteStaticMembers=[org.junit.Assert.*, org.junit.Assume.*, org.junit.jupiter.api.Assertions.*, org.junit.jupiter.api.Assumptions.*, org.junit.jupiter.api.DynamicContainer.*, org.junit.jupiter.api.DynamicTest.*, org.mockito.Mockito.*, org.mockito.ArgumentMatchers.*, org.mockito.Answers.*], importOrder=[java, javax, com, org]}, progressReports={enabled=true}, debug={logLevel=warn, settings={showHex=false, showStaticVariables=true, showQualifiedNames=false, maxStringLength=0.0, enableHotCodeReplace=true, enableRunDebugCodeLens=true}}}}

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:41:08.696
!MESSAGE >> shutdown

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:41:08.719
!MESSAGE >> exit

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:41:08.719
!MESSAGE Shutdown received... waking up main thread

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:41:08.724
!MESSAGE class org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin is stopping:
!SESSION 2018-11-01 09:41:13.408 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_181
java.vendor=Azul Systems, Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Command-line arguments:  -data /Users/tristan.partin/Library/Application Support/Code/User/workspaceStorage/2258a3bf734a6933686c851c9d962710/redhat.java/jdt_ws

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:41:14.948
!MESSAGE class org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin is started

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:41:15.070
!MESSAGE Main thread is waiting

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:41:15.093
!MESSAGE >> initialize

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:41:15.094
!MESSAGE Initializing Java Language Server 0.27.0.201810230509

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:41:15.105
!MESSAGE Installed reference:file:/Users/tristan.partin/.vscode/extensions/pivotal.vscode-spring-boot-1.1.0/jars/jdt-ls-commons.jar

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:41:15.107
!MESSAGE Installed reference:file:/Users/tristan.partin/.vscode/extensions/pivotal.vscode-spring-boot-1.1.0/jars/jdt-ls-extension.jar

!ENTRY org.eclipse.core.net 1 0 2018-11-01 09:41:15.177
!MESSAGE System property http.nonProxyHosts has been set to local|*.local|169.254/16|*.169.254/16 by an external source. This value will be overwritten using the values from the preferences

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:41:15.178
!MESSAGE Started reference:file:/Users/tristan.partin/.vscode/extensions/pivotal.vscode-spring-boot-1.1.0/jars/jdt-ls-commons.jar

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:41:15.178
!MESSAGE Started reference:file:/Users/tristan.partin/.vscode/extensions/pivotal.vscode-spring-boot-1.1.0/jars/jdt-ls-extension.jar

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:41:15.192
!MESSAGE >> initialized

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:41:15.203
!MESSAGE Creating the default Java project

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:41:15.216
!MESSAGE Finished creating the default Java project

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:41:15.478
!MESSAGE Importing Maven project(s)

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:41:15.526
!MESSAGE Workspace initialized in 423ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:41:15.538
!MESSAGE >> workspace/didChangeConfiguration

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:41:15.539
!MESSAGE >> registerFeature 'workspace/didChangeWatchedFiles'

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:41:15.558
!MESSAGE >>New configuration: {java={home=null, jdt={ls={vmargs=-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication}}, errors={incompleteClasspath={severity=warning}}, configuration={updateBuildConfiguration=automatic, maven={userSettings=null}}, trace={server=off}, import={gradle={enabled=true}, maven={enabled=true}, exclusions=[**/node_modules/**, **/.metadata/**, **/archetype-resources/**, **/META-INF/maven/**]}, referencesCodeLens={enabled=true}, signatureHelp={enabled=false}, implementationsCodeLens={enabled=true}, format={enabled=false, settings={url=null, profile=null}, comments={enabled=true}, onType={enabled=false}}, saveActions={organizeImports=false}, contentProvider={preferred=null}, autobuild={enabled=false}, completion={enabled=true, overwrite=false, guessMethodArguments=false, favoriteStaticMembers=[org.junit.Assert.*, org.junit.Assume.*, org.junit.jupiter.api.Assertions.*, org.junit.jupiter.api.Assumptions.*, org.junit.jupiter.api.DynamicContainer.*, org.junit.jupiter.api.DynamicTest.*, org.mockito.Mockito.*, org.mockito.ArgumentMatchers.*, org.mockito.Answers.*], importOrder=[java, javax, com, org]}, progressReports={enabled=true}, debug={logLevel=warn, settings={showHex=false, showStaticVariables=true, showQualifiedNames=false, maxStringLength=0.0, enableHotCodeReplace=true, enableRunDebugCodeLens=true}}, test={report={position=sideView}}}}

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:44:54.432
!MESSAGE >> workspace/didChangeWatchedFiles 

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:44:54.470
!MESSAGE Starting Maven update for dp-ms-demand-automation-server

!ENTRY org.eclipse.core.jobs 4 2 2018-11-01 09:44:54.474
!MESSAGE An internal error occurred during: "Update project dp-ms-demand-automation-server".
!STACK 0
java.lang.NullPointerException
	at org.eclipse.jdt.ls.core.internal.managers.MavenBuildSupport.collectProjects(MavenBuildSupport.java:88)
	at org.eclipse.jdt.ls.core.internal.managers.MavenBuildSupport.update(MavenBuildSupport.java:71)
	at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager$4.runInWorkspace(ProjectsManager.java:416)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:54:30.072
!MESSAGE >> workspace/didChangeWatchedFiles 

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:54:30.094
!MESSAGE Starting Maven update for dp-ms-demand-automation-parent

!ENTRY org.eclipse.core.jobs 4 2 2018-11-01 09:54:30.096
!MESSAGE An internal error occurred during: "Update project dp-ms-demand-automation-parent".
!STACK 0
java.lang.NullPointerException
	at org.eclipse.jdt.ls.core.internal.managers.MavenBuildSupport.collectProjects(MavenBuildSupport.java:88)
	at org.eclipse.jdt.ls.core.internal.managers.MavenBuildSupport.update(MavenBuildSupport.java:71)
	at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager$4.runInWorkspace(ProjectsManager.java:416)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:54:39.669
!MESSAGE >> workspace/didChangeWatchedFiles 

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:54:39.686
!MESSAGE Starting Maven update for dp-ms-demand-automation-parent

!ENTRY org.eclipse.core.jobs 4 2 2018-11-01 09:54:39.687
!MESSAGE An internal error occurred during: "Update project dp-ms-demand-automation-parent".
!STACK 0
java.lang.NullPointerException
	at org.eclipse.jdt.ls.core.internal.managers.MavenBuildSupport.collectProjects(MavenBuildSupport.java:88)
	at org.eclipse.jdt.ls.core.internal.managers.MavenBuildSupport.update(MavenBuildSupport.java:71)
	at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager$4.runInWorkspace(ProjectsManager.java:416)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:55:55.166
!MESSAGE >> workspace/didChangeConfiguration

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:55:55.167
!MESSAGE >> registerFeature 'workspace/didChangeWatchedFiles'

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:55:55.175
!MESSAGE >>New configuration: {java={home=null, jdt={ls={vmargs=-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication}}, errors={incompleteClasspath={severity=warning}}, configuration={updateBuildConfiguration=automatic, maven={userSettings=null}}, trace={server=verbose}, import={gradle={enabled=true}, maven={enabled=true}, exclusions=[**/node_modules/**, **/.metadata/**, **/archetype-resources/**, **/META-INF/maven/**]}, referencesCodeLens={enabled=true}, signatureHelp={enabled=false}, implementationsCodeLens={enabled=true}, format={enabled=false, settings={url=null, profile=null}, comments={enabled=true}, onType={enabled=false}}, saveActions={organizeImports=false}, contentProvider={preferred=null}, autobuild={enabled=false}, completion={enabled=true, overwrite=false, guessMethodArguments=false, favoriteStaticMembers=[org.junit.Assert.*, org.junit.Assume.*, org.junit.jupiter.api.Assertions.*, org.junit.jupiter.api.Assumptions.*, org.junit.jupiter.api.DynamicContainer.*, org.junit.jupiter.api.DynamicTest.*, org.mockito.Mockito.*, org.mockito.ArgumentMatchers.*, org.mockito.Answers.*], importOrder=[java, javax, com, org]}, progressReports={enabled=true}, debug={logLevel=warn, settings={showHex=false, showStaticVariables=true, showQualifiedNames=false, maxStringLength=0.0, enableHotCodeReplace=true, enableRunDebugCodeLens=true}}, test={report={position=sideView}}}}

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:56:18.465
!MESSAGE >> shutdown

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:56:18.489
!MESSAGE >> exit

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:56:18.489
!MESSAGE Shutdown received... waking up main thread

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:56:18.494
!MESSAGE class org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin is stopping:
!SESSION 2018-11-01 09:56:23.259 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_181
java.vendor=Azul Systems, Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Command-line arguments:  -data /Users/tristan.partin/Library/Application Support/Code/User/workspaceStorage/2258a3bf734a6933686c851c9d962710/redhat.java/jdt_ws

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:56:24.854
!MESSAGE class org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin is started

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:56:24.967
!MESSAGE Main thread is waiting

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:56:24.988
!MESSAGE >> initialize

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:56:24.990
!MESSAGE Initializing Java Language Server 0.27.0.201810230509

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:56:25.012
!MESSAGE >> initialized

!ENTRY org.eclipse.core.net 1 0 2018-11-01 09:56:25.061
!MESSAGE System property http.nonProxyHosts has been set to local|*.local|169.254/16|*.169.254/16 by an external source. This value will be overwritten using the values from the preferences

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:56:25.090
!MESSAGE Creating the default Java project

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:56:25.107
!MESSAGE Finished creating the default Java project

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:56:25.384
!MESSAGE Importing Maven project(s)

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:56:25.434
!MESSAGE Workspace initialized in 437ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:56:25.446
!MESSAGE >> workspace/didChangeConfiguration

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:56:25.448
!MESSAGE >> registerFeature 'workspace/didChangeWatchedFiles'

!ENTRY org.eclipse.jdt.ls.core 1 0 2018-11-01 09:56:25.495
!MESSAGE >>New configuration: {java={home=null, jdt={ls={vmargs=-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication}}, errors={incompleteClasspath={severity=warning}}, configuration={updateBuildConfiguration=automatic, maven={userSettings=null}}, trace={server=verbose}, import={gradle={enabled=true}, maven={enabled=true}, exclusions=[**/node_modules/**, **/.metadata/**, **/archetype-resources/**, **/META-INF/maven/**]}, referencesCodeLens={enabled=true}, signatureHelp={enabled=false}, implementationsCodeLens={enabled=true}, format={enabled=false, settings={url=null, profile=null}, comments={enabled=true}, onType={enabled=false}}, saveActions={organizeImports=false}, contentProvider={preferred=null}, autobuild={enabled=false}, completion={enabled=true, overwrite=false, guessMethodArguments=false, favoriteStaticMembers=[org.junit.Assert.*, org.junit.Assume.*, org.junit.jupiter.api.Assertions.*, org.junit.jupiter.api.Assumptions.*, org.junit.jupiter.api.DynamicContainer.*, org.junit.jupiter.api.DynamicTest.*, org.mockito.Mockito.*, org.mockito.ArgumentMatchers.*, org.mockito.Answers.*], importOrder=[java, javax, com, org]}, progressReports={enabled=true}, debug={logLevel=warn, settings={showHex=false, showStaticVariables=true, showQualifiedNames=false, maxStringLength=0.0, enableHotCodeReplace=true, enableRunDebugCodeLens=true}}, test={report={position=sideView}}}}
Current Result

No language server start up

Expected Result

Language server to start even though it is missing parent module. Fairly certain IntelliJ handles this case gracefully

@fbricon
Copy link
Collaborator

fbricon commented Nov 1, 2018

We'll fix it. Could you attach a set of sample projects reproducing the bug? That'll help

@dlee005c
Copy link

Coming over from #712
@fbricon
I've installed java-0.33.0-1263.vsix and see that the error in the language server is no longer occurring and the language server is running, but the problem/error in pom.xml is still occurring, resulting in java references in the pom not getting loaded (spring stuff).

@fbricon
Copy link
Collaborator

fbricon commented Nov 13, 2018

@dlee005c can you share a set of sample maven projects reproducing this issue?

@dlee005c
Copy link

dlee005c commented Nov 13, 2018

That's a little tricky. I can't expose my company's internal repository. Do you know of any publicly available internal maven repositories that contain unique artifacts? I'll try to find one.
(I mispoke. i mean a mirror with unique artifacts)

@fbricon
Copy link
Collaborator

fbricon commented Nov 13, 2018

@dlee005c What do you mean by unique artifacts? unique by name? having a single version?
Anyways, you should be able to manually create a series of new pom files, that should mimic your real life project's hierarchy.

Does your project build normally in Eclipse?

@dlee005c
Copy link

i mean artifacts that aren't in the central repo.
I'm fairly sure the issue arises when referencing an artifact from a mirror and has less to do with the project hierarchy.
Builds normally in eclipse

@fbricon
Copy link
Collaborator

fbricon commented Nov 13, 2018

have you tried calling theClean the Java language server workspace command?

@dlee005c
Copy link

Yes. Does not change anything.
Also, thanks for working with me on this.

@fbricon
Copy link
Collaborator

fbricon commented Nov 13, 2018

what's your Maven settings.xml configuration? (you can obfuscate any sensitive data)

@dlee005c
Copy link

dlee005c commented Nov 13, 2018

<?xml version="1.0" encoding="UTF-8"?>
<settings
        xmlns="http://maven.apache.org/SETTINGS/1.0.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <mirrors>
        <mirror>
            <!-- This sends everything else to /public -->
            <id>nexus</id>
            <mirrorOf>*</mirrorOf>
            <url>http://my.nexus:8081/and/its/path</url>
        </mirror>
    </mirrors>
    <profiles>
        <profile>
            <id>nexus</id>
            <!-- Enable snapshots for the built in central repo to direct -->
            <!-- all requests to nexus via the mirror -->
            <repositories>
                <repository>
                    <id>central</id>
                    <url>http://central</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>central</id>
                    <url>http://central</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </pluginRepository>
            </pluginRepositories>
        </profile>
    </profiles>
    <activeProfiles>
        <!-- make the profile active all the time -->
        <activeProfile>nexus</activeProfile>
    </activeProfiles>
    <pluginGroups>
        <!-- define the sonatype plugin group, so the nexus plugins will work without typing the groupId -->
        <pluginGroup>org.sonatype.plugins</pluginGroup>
    </pluginGroups>
</settings>

@fbricon
Copy link
Collaborator

fbricon commented Nov 13, 2018

@dlee005c thanks. I'll let @snjeza look into it for now.

@snjeza snjeza reopened this Nov 13, 2018
@tristan957
Copy link
Author

@fbricon is there a release slated any time soon?

@fbricon
Copy link
Collaborator

fbricon commented Nov 14, 2018

@tristan957 probably this Friday. but it should be light in features and bug fixes

@tristan957
Copy link
Author

As long as it includes this fix, I would be extremely happy

@tristan957
Copy link
Author

Otherwise the waiting game continues haha

@snjeza
Copy link
Contributor

snjeza commented Nov 14, 2018

I've configured the Java extention to use my settings.xml file ("java.configuration.maven.userSettings": "~/.m2/settings.xml")

@dlee005c Could you try to remove the java.configuration.maven.userSettings property or use an absolute path (("java.configuration.maven.userSettings": "/home/<your_username>/.m2/settings.xml", for instance)?

@dlee005c
Copy link

Took out my configuration and it works like a charm now. Thank you both for taking the time to help me sort through this. I'm very happy to being going back to this instead of eclipse.

@snjeza snjeza closed this as completed Nov 14, 2018
@fbricon
Copy link
Collaborator

fbricon commented Nov 14, 2018

@snjeza would be nice if the server understood ~/.m2 paths

@tristan957
Copy link
Author

Was this supposed to have been fixed in 0.34?

@tristan957
Copy link
Author

tristan957 commented Nov 19, 2018

It is not for me. Running VSCode 1.29.1, extension version 0.34. Maybe I misreported my issue, but in the pom.xml file I am still seeing

[Java] Project build error: Non-resolvable parent POM for com.tenx.ms:dp-ms-demand-automation-parent:1.0.0-SNAPSHOT: Failure to find com.tenx.ms:microservice-parent:pom:1.5.14-1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at no local POM [0]

In the output

[Error - 3:49:07 PM] Request textDocument/hover failed.
  Message: Internal error.
  Code: -32603 
java.util.concurrent.CompletionException: java.lang.NullPointerException
	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
	at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:659)
	at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:632)
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
	at java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:561)
	at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:580)
	at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:443)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.lang.NullPointerException
	at org.eclipse.lsp4j.adapters.HoverTypeAdapter.writeContents(HoverTypeAdapter.java:82)
	at org.eclipse.lsp4j.adapters.HoverTypeAdapter.write(HoverTypeAdapter.java:142)
	at org.eclipse.lsp4j.adapters.HoverTypeAdapter.write(HoverTypeAdapter.java:38)
	at com.google.gson.TypeAdapter$1.write(TypeAdapter.java:191)
	at com.google.gson.Gson.toJson(Gson.java:669)
	at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.write(MessageTypeAdapter.java:412)
	at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.write(MessageTypeAdapter.java:55)
	at com.google.gson.Gson.toJson(Gson.java:669)
	at com.google.gson.Gson.toJson(Gson.java:648)
	at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.serialize(MessageJsonHandler.java:143)
	at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.serialize(MessageJsonHandler.java:138)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageConsumer.consume(StreamMessageConsumer.java:59)
	at org.eclipse.jdt.ls.core.internal.ParentProcessWatcher.lambda$0(ParentProcessWatcher.java:83)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.lambda$handleRequest$1(RemoteEndpoint.java:281)
	at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:656)
	... 9 more

[Error - 3:49:08 PM] Request textDocument/hover failed.
  Message: Internal error.
  Code: -32603 
java.util.concurrent.CompletionException: java.lang.NullPointerException
	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
	at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:659)
	at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:632)
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
	at java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:561)
	at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:580)
	at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:443)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.lang.NullPointerException
	at org.eclipse.lsp4j.adapters.HoverTypeAdapter.writeContents(HoverTypeAdapter.java:82)
	at org.eclipse.lsp4j.adapters.HoverTypeAdapter.write(HoverTypeAdapter.java:142)
	at org.eclipse.lsp4j.adapters.HoverTypeAdapter.write(HoverTypeAdapter.java:38)
	at com.google.gson.TypeAdapter$1.write(TypeAdapter.java:191)
	at com.google.gson.Gson.toJson(Gson.java:669)
	at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.write(MessageTypeAdapter.java:412)
	at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.write(MessageTypeAdapter.java:55)
	at com.google.gson.Gson.toJson(Gson.java:669)
	at com.google.gson.Gson.toJson(Gson.java:648)
	at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.serialize(MessageJsonHandler.java:143)
	at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.serialize(MessageJsonHandler.java:138)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageConsumer.consume(StreamMessageConsumer.java:59)
	at org.eclipse.jdt.ls.core.internal.ParentProcessWatcher.lambda$0(ParentProcessWatcher.java:83)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.lambda$handleRequest$1(RemoteEndpoint.java:281)
	at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:656)
	... 9 more

[Error - 3:49:09 PM] Request textDocument/hover failed.
  Message: Internal error.
  Code: -32603 
java.util.concurrent.CompletionException: java.lang.NullPointerException
	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
	at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:659)
	at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:632)
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
	at java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:561)
	at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:580)
	at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:443)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.lang.NullPointerException
	at org.eclipse.lsp4j.adapters.HoverTypeAdapter.writeContents(HoverTypeAdapter.java:82)
	at org.eclipse.lsp4j.adapters.HoverTypeAdapter.write(HoverTypeAdapter.java:142)
	at org.eclipse.lsp4j.adapters.HoverTypeAdapter.write(HoverTypeAdapter.java:38)
	at com.google.gson.TypeAdapter$1.write(TypeAdapter.java:191)
	at com.google.gson.Gson.toJson(Gson.java:669)
	at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.write(MessageTypeAdapter.java:412)
	at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.write(MessageTypeAdapter.java:55)
	at com.google.gson.Gson.toJson(Gson.java:669)
	at com.google.gson.Gson.toJson(Gson.java:648)
	at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.serialize(MessageJsonHandler.java:143)
	at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.serialize(MessageJsonHandler.java:138)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageConsumer.consume(StreamMessageConsumer.java:59)
	at org.eclipse.jdt.ls.core.internal.ParentProcessWatcher.lambda$0(ParentProcessWatcher.java:83)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.lambda$handleRequest$1(RemoteEndpoint.java:281)
	at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:656)
	... 9 more

[Error - 3:49:09 PM] Request textDocument/hover failed.
  Message: Internal error.
  Code: -32603 
java.util.concurrent.CompletionException: java.lang.NullPointerException
	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
	at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:659)
	at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:632)
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
	at java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:561)
	at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:580)
	at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:443)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.lang.NullPointerException
	at org.eclipse.lsp4j.adapters.HoverTypeAdapter.writeContents(HoverTypeAdapter.java:82)
	at org.eclipse.lsp4j.adapters.HoverTypeAdapter.write(HoverTypeAdapter.java:142)
	at org.eclipse.lsp4j.adapters.HoverTypeAdapter.write(HoverTypeAdapter.java:38)
	at com.google.gson.TypeAdapter$1.write(TypeAdapter.java:191)
	at com.google.gson.Gson.toJson(Gson.java:669)
	at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.write(MessageTypeAdapter.java:412)
	at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.write(MessageTypeAdapter.java:55)
	at com.google.gson.Gson.toJson(Gson.java:669)
	at com.google.gson.Gson.toJson(Gson.java:648)
	at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.serialize(MessageJsonHandler.java:143)
	at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.serialize(MessageJsonHandler.java:138)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageConsumer.consume(StreamMessageConsumer.java:59)
	at org.eclipse.jdt.ls.core.internal.ParentProcessWatcher.lambda$0(ParentProcessWatcher.java:83)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.lambda$handleRequest$1(RemoteEndpoint.java:281)
	at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:656)
	... 9 more

[Error - 3:49:10 PM] Request textDocument/hover failed.
  Message: Internal error.
  Code: -32603 
java.util.concurrent.CompletionException: java.lang.NullPointerException
	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
	at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:659)
	at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:632)
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
	at java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:561)
	at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:580)
	at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:443)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.lang.NullPointerException
	at org.eclipse.lsp4j.adapters.HoverTypeAdapter.writeContents(HoverTypeAdapter.java:82)
	at org.eclipse.lsp4j.adapters.HoverTypeAdapter.write(HoverTypeAdapter.java:142)
	at org.eclipse.lsp4j.adapters.HoverTypeAdapter.write(HoverTypeAdapter.java:38)
	at com.google.gson.TypeAdapter$1.write(TypeAdapter.java:191)
	at com.google.gson.Gson.toJson(Gson.java:669)
	at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.write(MessageTypeAdapter.java:412)
	at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.write(MessageTypeAdapter.java:55)
	at com.google.gson.Gson.toJson(Gson.java:669)
	at com.google.gson.Gson.toJson(Gson.java:648)
	at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.serialize(MessageJsonHandler.java:143)
	at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.serialize(MessageJsonHandler.java:138)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageConsumer.consume(StreamMessageConsumer.java:59)
	at org.eclipse.jdt.ls.core.internal.ParentProcessWatcher.lambda$0(ParentProcessWatcher.java:83)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.lambda$handleRequest$1(RemoteEndpoint.java:281)
	at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:656)
	... 9 more

[Error - 3:49:10 PM] Request textDocument/hover failed.
  Message: Internal error.
  Code: -32603 
java.util.concurrent.CompletionException: java.lang.NullPointerException
	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
	at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:659)
	at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:632)
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
	at java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:561)
	at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:580)
	at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:443)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.lang.NullPointerException
	at org.eclipse.lsp4j.adapters.HoverTypeAdapter.writeContents(HoverTypeAdapter.java:82)
	at org.eclipse.lsp4j.adapters.HoverTypeAdapter.write(HoverTypeAdapter.java:142)
	at org.eclipse.lsp4j.adapters.HoverTypeAdapter.write(HoverTypeAdapter.java:38)
	at com.google.gson.TypeAdapter$1.write(TypeAdapter.java:191)
	at com.google.gson.Gson.toJson(Gson.java:669)
	at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.write(MessageTypeAdapter.java:412)
	at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.write(MessageTypeAdapter.java:55)
	at com.google.gson.Gson.toJson(Gson.java:669)
	at com.google.gson.Gson.toJson(Gson.java:648)
	at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.serialize(MessageJsonHandler.java:143)
	at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.serialize(MessageJsonHandler.java:138)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageConsumer.consume(StreamMessageConsumer.java:59)
	at org.eclipse.jdt.ls.core.internal.ParentProcessWatcher.lambda$0(ParentProcessWatcher.java:83)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.lambda$handleRequest$1(RemoteEndpoint.java:281)
	at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:656)
	... 9 more

@fbricon
Copy link
Collaborator

fbricon commented Nov 19, 2018

Please open another ticket for the NPE, this is an orthogonal issue.

The non-resolvable parent issue should have been fixed. @snjeza?

@snjeza
Copy link
Contributor

snjeza commented Nov 20, 2018

I have fixed eclipse-jdtls/eclipse.jdt.ls#839. #723 is a separate issue.

@danmikita
Copy link

@snjeza I am having an issue where any dependencies that are stored in my personal Artifactory will not resolve. Anything in maven central resolves just fine. It appears that the plugin isn't referencing my local .m2/repository... I have set the variable in the configuration file, and I am using the latest version.

{
    "java.configuration.maven.userSettings": "~/.m2/settings.xml"
}

Is there something I am missing?

@fbricon
Copy link
Collaborator

fbricon commented Nov 29, 2018

@danmikita since "~/.m2/settings.xml" is the default location, you don't need to add it to your settings. See if removing it helps.

@danmikita
Copy link

@fbricon Unfortunately, that did not fix the problem. How does this work. Does it only reference the settings.xml and pull down all new artifacts? Or does it also use the local artifact repository? ~/.m2/repository

Oddly - If I build the master branch of the language server directly and run against it, it works great!

@fbricon
Copy link
Collaborator

fbricon commented Nov 29, 2018

try the Clean the Java language server workspace command.

@danmikita
Copy link

Sorry for the delay in response... I wanted to validate a few things before responding. That did not work. 😞 It is literally only dependencies from our local repository that fail to resolve. Is it possible the language server hasn't been updated to v0.28.0 of eclipse.jdt.ls? I'm not sure where to look for that...

@snjeza
Copy link
Contributor

snjeza commented Nov 29, 2018

Oddly - If I build the master branch of the language server directly and run against it, it works great!

@danmikita could you try to use an absolute path - #702 (comment)?

@danmikita
Copy link

danmikita commented Nov 29, 2018

@snjeza I just tried the absolute path as you suggested and still a no-go. 😢 To try to debug this issue a bit, I saw that this extension pulls down a tar.gz from http://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz

I wanted to find where that was being downloaded to so I could replace it manually with my copy of the language server to narrow down the problem a bit. I know my copy of the lsp has your commit which added maven user settings - which DOES work. Unfortunately, I couldn't track down the install location for the lsp that this extension pulls down.

Do you have any other ideas I can run with?

@danmikita
Copy link

danmikita commented Nov 30, 2018

@snjeza @fbricon I was able to copy my locally compiled server to the correct location and use it with the plugin. I get the same results - aka, local maven dependencies do not resolve. So I have narrowed it down to being a problem in the vscode-java extension. Just an update. I'll see if I can dig into the extension a bit and try to find the problem. Let me know if you have any pointers for me.

@tristan957
Copy link
Author

tristan957 commented Dec 21, 2018

So I have come back with more info about my parent POM file. I should be able to get a minimal project going in a few hours to post here. The parent section looks like so

<parent>
    <groupId>com.tenx.ms</groupId>
    <artifactId>dp-ms-demand-automation-parent</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <relativePath>..</relativePath>
</parent>

That relative path does not exist on my system, due to some weird way this product gets deployed. If I had to guess, somewhere within either the extension or JLS, it is throwing a FileNotFoundException. Is there any way to keep the error, or lessen it to a warning, but still allow the JLS to operate functionally, instead of having the language server fail?

I understand why the error exists. I think there may be development strategies that aren't necessarily thought of as valid cases.

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

No branches or pull requests

5 participants