wildwebdeveloper: Cannot use provided schemas

when trying to use a specific schemas provided in preferences, when openign the file and asking for completion, there is this error:

eclipse.buildId=4.15.0.I20200305-0155
java.version=1.8.0_252
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.committers.product
Command-line arguments:  -data /home/apupier/ws/camel-ls -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.committers.product

This is a continuation of log file /home/apupier/ws/camel-ls/.metadata/.bak_5.log
Created Time: 2020-07-02 16:50:27.000

org.eclipse.lsp4e
Error
Thu Jul 02 16:56:59 CEST 2020
org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request textDocument/completion failed with message: entry.getSchemas(...) is not a function or its return value is not iterable

java.util.concurrent.ExecutionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request textDocument/completion failed with message: entry.getSchemas(...) is not a function or its return value is not iterable
	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908)
	at org.eclipse.lsp4e.operations.completion.LSContentAssistProcessor.computeCompletionProposals(LSContentAssistProcessor.java:105)
	at org.eclipse.jface.text.contentassist.AsyncCompletionProposalPopup.lambda$10(AsyncCompletionProposalPopup.java:351)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.jface.text.contentassist.AsyncCompletionProposalPopup.lambda$9(AsyncCompletionProposalPopup.java:350)
	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604)
	at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1596)
	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: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request textDocument/completion failed with message: entry.getSchemas(...) is not a function or its return value is not iterable
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:209)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:193)
	at org.eclipse.lsp4e.LanguageServerWrapper.lambda$1(LanguageServerWrapper.java:243)
	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.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

tried with an URL and with a local file:

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 41 (34 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks for those details @vrubezheny! It would be great if you could add such hints directly into some CONTRIBUTING.md file.

In general, you need:

  • openjdk-11 (with sources) installed ,
  • Eclipse SDK + eclipse-test-framework-4.16.zip
  • cd ~/projects/ (or whereever you save your projects) git clone https://github.com/eclipse/wildwebdeveloper.git (if needed) git clone git://git.eclipse.org/gitroot/lsp4e/lsp4e.git
  • some really simple test project with json schema (like described above)
  • Install Eclipse, install eclipse-test-framework into it (might help in building/running tests), import (in simple case) all wildwebdeveloper plugin projects, (if needed) you might import all jsp4e plugns.
  • Build WWD Target Platform (cd ~/projects/wildwebdeveloper/target-platform/; mvn clean install;) and set it as your Eclipse’s target platform (open in Eclipse wildwebdeveloper/target-platform/target-platform.target file and check it’s installed in Window - Preferences -> Plug-in Development -> Target Platform preference page.
  • Build WWD itself (cd ~/projects/wildwebdeveloper//; mvn clean install;)
  • Create Run/Debug 'Eclipse Application" configuration and start it.
  • Then, in started application, create or import some simple test project (with json schema and a yaml file) and configure in `Window -> Preferences -> YAML -> YAML Schemas’ your schema and a global pattern.
  • That’s it… You can open your yaml file in editor and see the server logs.
  • One more thing to configure: yaml server logs: Window -> Preferences -> Language Servers -> Logs, enable the required either Log to File or Log to Console or both. There will be a new project created in your workspace named after languageServers-log - you may find a link on the same preference page. Also, you can import it into you workspace and always have the logs handy. Quite simple 😃