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

v0.70 broke workspace/DidChangeConfiguration #1685

Closed
pbogren opened this issue Mar 11, 2021 · 4 comments · Fixed by #1690
Closed

v0.70 broke workspace/DidChangeConfiguration #1685

pbogren opened this issue Mar 11, 2021 · 4 comments · Fixed by #1690
Assignees

Comments

@pbogren
Copy link

pbogren commented Mar 11, 2021

I am using jdtls through nvim-jdtls in neovim nightly where I have the following settings

local cfg = {
    cmd = { 'jdtls'},
    settings = {
        ['java.format.settings.url'] =  '/path/to/style.xml',
        ['java.format.settings.profile'] = 'MyStyle',
    ...
}

cfg.on_init = function(client, _)
    client.notify('workspace/didChangeConfiguration', { settings = client.config.settings })
end

This works fine with v0.69 but with v0.70 I get the following error

[ INFO ] 2021-03-11T16:11:25+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/handlers.lua:379 ] "Mar 11, 2021, 4:11:25 PM >> workspace/didChangeConfiguration"
[ ERROR ] 2021-03-11T16:11:25+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/handlers.lua:375 ] "Mar 11, 2021, 4:11:25 PM URI is not absolute
URI is not absolute
java.lang.IllegalArgumentException: URI is not absolute
    at java.base/java.net.URL.fromURI(URL.java:692)
    at java.base/java.net.URI.toURL(URI.java:1116)
    at org.eclipse.jdt.ls.core.internal.managers.FormatterManager.configureFormatter(FormatterManager.java:171)
    at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.didChangeConfiguration(JDTLanguageServer.java:472)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
    at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.notify(GenericEndpoint.java:152)
    at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleNotification(RemoteEndpoint.java:220)
    at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:187)
    at org.eclipse.jdt.ls.core.internal.ParentProcessWatcher.lambda$0(ParentProcessWatcher.java:123)
    at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
    at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
    at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)"
  [ INFO ] 2021-03-11T16:11:25+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/handlers.lua:379 ] "Mar 11, 2021, 4:11:25 PM >> New configuration: {java.format.settings.url=/path/to/style.xml, java.format.settings.profile=MyStyle}"

EDIT: Just to clarify, I reverted back to v0.69 to verify that the error was introduced after upgrading to v0.70 and it still works in the previous version which should rule out other factors.

@snjeza
Copy link
Contributor

snjeza commented Mar 11, 2021

@MMfood could you try

 ['java.format.settings.url'] = 'file:///path/to/style.xml',

@snjeza snjeza self-assigned this Mar 11, 2021
@pbogren
Copy link
Author

pbogren commented Mar 11, 2021

@snjeza Yes, that worked! Thanks, that was quick!

Is that a bug or a feature?

@snjeza
Copy link
Contributor

snjeza commented Mar 11, 2021

@MMfood It is a bug.

@pbogren
Copy link
Author

pbogren commented Mar 11, 2021

ok, good to know. Also, let me take this opportunity to thank you and others for your work on this project!

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

Successfully merging a pull request may close this issue.

3 participants