Hi,
I am an openhab beginner and using VS Code on windows 10 to design my openhab installation on a raspberry pi.
I have had it working OK for a few weeks, but now unexpectedly there is an error on start up of VS Code, as follows:
Server Error, refer to Server logs (there was also an error number, which I can post later tonight.)
At the same time, when I try to add new items, they aren’t recognised in sitemap, and all fields of the running sitemap show up as their item name rather than the label .
Seems to be an openhab problem rather than a VSCode problem.
Questions…
Any ideas whats going on?
How do I find the server logs?
My install is not quite working fine as follows:
I add a new item in the items file. Ok
I aopen the sitemap. Ok
I add a new entry in the sitemap, say text, and all the known items autofill for selection except the new item just entered.
Very frustrating. Any ideas
You may have forgotten one step: after adding the new item to your items file you need to save that file, otherwise openHAB LSP doesn’t know anything about that new item.
After you found a log entry like Refreshing model 'your_file.items'
the new item should be autodetected.
Interesting.
When i momitor the log, there is no event triggered when items file is save. However there are events when sitemap or rules are saved.
But when i use finder to open the items file, the content has changed.
Hi.
I have the same error. If I copy the folders to my Windows Desktop, all is okay.
Only the direct work on the server gives me:
[Error - 3:01:57 AM] Server initialization failed.
Message: Internal error.
Code: -32603
java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: URI has an authority component
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:292)
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:308)
at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:593)
at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
at org.eclipse.xtext.ide.server.concurrent.WriteRequest.run(WriteRequest.java:44)
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)
Caused by: java.lang.IllegalArgumentException: URI has an authority component
at sun.nio.fs.UnixUriUtils.fromUri(UnixUriUtils.java:53)
at sun.nio.fs.UnixFileSystemProvider.getPath(UnixFileSystemProvider.java:98)
at java.nio.file.Paths.get(Paths.java:138)
at org.eclipse.smarthome.model.lsp.internal.MappingUriExtensions.toPathAsInXtext212(MappingUriExtensions.java:209)
at org.eclipse.smarthome.model.lsp.internal.MappingUriExtensions.mapToClientPath(MappingUriExtensions.java:119)
at org.eclipse.smarthome.model.lsp.internal.MappingUriExtensions.toUriString(MappingUriExtensions.java:110)
at org.eclipse.xtext.ide.server.LanguageServerImpl.lambda$publishDiagnostics$26(LanguageServerImpl.java:447)
at org.eclipse.xtext.xbase.lib.ObjectExtensions.operator_doubleArrow(ObjectExtensions.java:139)
at org.eclipse.xtext.ide.server.LanguageServerImpl.publishDiagnostics(LanguageServerImpl.java:457)
at org.eclipse.xtext.ide.server.LanguageServerImpl.lambda$null$9(LanguageServerImpl.java:293)
at org.eclipse.xtext.ide.server.ProjectManager.lambda$null$3(ProjectManager.java:135)
at org.eclipse.xtext.build.IncrementalBuilder$InternalStatefulIncrementalBuilder.validate(IncrementalBuilder.java:267)
at org.eclipse.xtext.build.IncrementalBuilder$InternalStatefulIncrementalBuilder.lambda$launch$6(IncrementalBuilder.java:244)
at org.eclipse.xtext.build.ClusteringStorageAwareResourceLoader.lambda$executeClustered$1(ClusteringStorageAwareResourceLoader.java:77)
at org.eclipse.xtext.xbase.lib.internal.FunctionDelegate.apply(FunctionDelegate.java:42)
at com.google.common.collect.Lists$TransformingRandomAccessList$1.transform(Lists.java:617)
at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
at java.util.AbstractCollection.toArray(AbstractCollection.java:141)
at java.util.ArrayList.addAll(ArrayList.java:581)
at com.google.common.collect.Iterables.addAll(Iterables.java:352)
at org.eclipse.xtext.build.ClusteringStorageAwareResourceLoader.executeClustered(ClusteringStorageAwareResourceLoader.java:80)
at org.eclipse.xtext.build.BuildContext.executeClustered(BuildContext.java:55)
at org.eclipse.xtext.build.IncrementalBuilder$InternalStatefulIncrementalBuilder.launch(IncrementalBuilder.java:251)
at org.eclipse.xtext.build.IncrementalBuilder.build(IncrementalBuilder.java:399)
at org.eclipse.xtext.build.IncrementalBuilder.build(IncrementalBuilder.java:384)
at org.eclipse.xtext.ide.server.ProjectManager.doBuild(ProjectManager.java:115)
at org.eclipse.xtext.ide.server.ProjectManager.doInitialBuild(ProjectManager.java:107)
at org.eclipse.xtext.ide.server.BuildManager.doInitialBuild(BuildManager.java:148)
at org.eclipse.xtext.ide.server.WorkspaceManager.refreshWorkspaceConfig(WorkspaceManager.java:148)
at org.eclipse.xtext.ide.server.WorkspaceManager.initialize(WorkspaceManager.java:117)
at org.eclipse.xtext.ide.server.LanguageServerImpl.lambda$initialize$10(LanguageServerImpl.java:295)
at org.eclipse.xtext.ide.server.concurrent.WriteRequest.run(WriteRequest.java:38)
... 5 more
You could try to map your share to a drive letter and access the openHAB folders via the drive letter and not the UNC name. This helped in my installation