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

Exception thrown when starting mapping from scratch in VS Code #147

Closed
tpluscode opened this issue Aug 8, 2023 · 1 comment
Closed

Exception thrown when starting mapping from scratch in VS Code #147

tpluscode opened this issue Aug 8, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@tpluscode
Copy link
Contributor

I found that it was impossible to start a fresh mapping in a project. When I added the first .xrm file the xtext server would crash. I could fix this by adding any content to the mapping and restarting the IDE

Aug 08, 2023 2:14:04 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint fallbackResponseError
SEVERE: Internal error: java.util.NoSuchElementException: No value present
java.util.concurrent.CompletionException: java.util.NoSuchElementException: No value present
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:332)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:347)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:636)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
	at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2162)
	at org.eclipse.xtext.ide.server.concurrent.AbstractRequest.logAndCompleteExceptionally(AbstractRequest.java:73)
	at org.eclipse.xtext.ide.server.concurrent.WriteRequest.run(WriteRequest.java:55)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.util.NoSuchElementException: No value present
	at java.base/java.util.Optional.get(Optional.java:143)
	at com.zazuko.rdfmapping.dsl.generator.RdfMappingGenerator.doGenerate(RdfMappingGenerator.java:57)
	at org.eclipse.xtext.generator.GeneratorDelegate.doGenerate(GeneratorDelegate.java:44)
	at org.eclipse.xtext.generator.GeneratorDelegate.generate(GeneratorDelegate.java:35)
	at org.eclipse.xtext.build.IncrementalBuilder$InternalStatefulIncrementalBuilder.generate(IncrementalBuilder.java:349)
	at org.eclipse.xtext.build.IncrementalBuilder$InternalStatefulIncrementalBuilder.lambda$launch$2(IncrementalBuilder.java:277)
	at com.google.common.collect.Iterators$6.transform(Iterators.java:783)
	at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:47)
	at com.google.common.collect.FluentIterable.copyInto(FluentIterable.java:791)
	at org.eclipse.xtext.build.ClusteringStorageAwareResourceLoader.executeClustered(ClusteringStorageAwareResourceLoader.java:69)
	at org.eclipse.xtext.build.BuildContext.executeClustered(BuildContext.java:55)
	at org.eclipse.xtext.build.IncrementalBuilder$InternalStatefulIncrementalBuilder.launch(IncrementalBuilder.java:259)
	at org.eclipse.xtext.build.IncrementalBuilder.build(IncrementalBuilder.java:412)
	at org.eclipse.xtext.build.IncrementalBuilder.build(IncrementalBuilder.java:394)
	at org.eclipse.xtext.ide.server.ProjectManager.doBuild(ProjectManager.java:106)
	at org.eclipse.xtext.ide.server.ProjectManager.doInitialBuild(ProjectManager.java:97)
	at org.eclipse.xtext.ide.server.BuildManager.doInitialBuild(BuildManager.java:164)
	at org.eclipse.xtext.ide.server.WorkspaceManager.refreshWorkspaceConfig(WorkspaceManager.java:233)
	at org.eclipse.xtext.ide.server.WorkspaceManager.initialize(WorkspaceManager.java:170)
	at org.eclipse.xtext.ide.server.LanguageServerImpl.lambda$initialize$0(LanguageServerImpl.java:225)
	at org.eclipse.xtext.ide.server.concurrent.WriteRequest.run(WriteRequest.java:50)
	... 5 more

[Error - 14:14:04] Server initialization failed.
  Message: Internal error.
  Code: -32603 
java.util.concurrent.CompletionException: java.util.NoSuchElementException: No value present
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:332)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:347)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:636)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
	at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2162)
	at org.eclipse.xtext.ide.server.concurrent.AbstractRequest.logAndCompleteExceptionally(AbstractRequest.java:73)
	at org.eclipse.xtext.ide.server.concurrent.WriteRequest.run(WriteRequest.java:55)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.util.NoSuchElementException: No value present
	at java.base/java.util.Optional.get(Optional.java:143)
	at com.zazuko.rdfmapping.dsl.generator.RdfMappingGenerator.doGenerate(RdfMappingGenerator.java:57)
	at org.eclipse.xtext.generator.GeneratorDelegate.doGenerate(GeneratorDelegate.java:44)
	at org.eclipse.xtext.generator.GeneratorDelegate.generate(GeneratorDelegate.java:35)
	at org.eclipse.xtext.build.IncrementalBuilder$InternalStatefulIncrementalBuilder.generate(IncrementalBuilder.java:349)
	at org.eclipse.xtext.build.IncrementalBuilder$InternalStatefulIncrementalBuilder.lambda$launch$2(IncrementalBuilder.java:277)
	at com.google.common.collect.Iterators$6.transform(Iterators.java:783)
	at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:47)
	at com.google.common.collect.FluentIterable.copyInto(FluentIterable.java:791)
	at org.eclipse.xtext.build.ClusteringStorageAwareResourceLoader.executeClustered(ClusteringStorageAwareResourceLoader.java:69)
	at org.eclipse.xtext.build.BuildContext.executeClustered(BuildContext.java:55)
	at org.eclipse.xtext.build.IncrementalBuilder$InternalStatefulIncrementalBuilder.launch(IncrementalBuilder.java:259)
	at org.eclipse.xtext.build.IncrementalBuilder.build(IncrementalBuilder.java:412)
	at org.eclipse.xtext.build.IncrementalBuilder.build(IncrementalBuilder.java:394)
	at org.eclipse.xtext.ide.server.ProjectManager.doBuild(ProjectManager.java:106)
	at org.eclipse.xtext.ide.server.ProjectManager.doInitialBuild(ProjectManager.java:97)
	at org.eclipse.xtext.ide.server.BuildManager.doInitialBuild(BuildManager.java:164)
	at org.eclipse.xtext.ide.server.WorkspaceManager.refreshWorkspaceConfig(WorkspaceManager.java:233)
	at org.eclipse.xtext.ide.server.WorkspaceManager.initialize(WorkspaceManager.java:170)
	at org.eclipse.xtext.ide.server.LanguageServerImpl.lambda$initialize$0(LanguageServerImpl.java:225)
	at org.eclipse.xtext.ide.server.concurrent.WriteRequest.run(WriteRequest.java:50)
	... 5 more

[Error - 14:14:04] Starting client failed
  Message: Internal error.
  Code: -32603 
java.util.concurrent.CompletionException: java.util.NoSuchElementException: No value present
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:332)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:347)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:636)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
	at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2162)
	at org.eclipse.xtext.ide.server.concurrent.AbstractRequest.logAndCompleteExceptionally(AbstractRequest.java:73)
	at org.eclipse.xtext.ide.server.concurrent.WriteRequest.run(WriteRequest.java:55)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.util.NoSuchElementException: No value present
	at java.base/java.util.Optional.get(Optional.java:143)
	at com.zazuko.rdfmapping.dsl.generator.RdfMappingGenerator.doGenerate(RdfMappingGenerator.java:57)
	at org.eclipse.xtext.generator.GeneratorDelegate.doGenerate(GeneratorDelegate.java:44)
	at org.eclipse.xtext.generator.GeneratorDelegate.generate(GeneratorDelegate.java:35)
	at org.eclipse.xtext.build.IncrementalBuilder$InternalStatefulIncrementalBuilder.generate(IncrementalBuilder.java:349)
	at org.eclipse.xtext.build.IncrementalBuilder$InternalStatefulIncrementalBuilder.lambda$launch$2(IncrementalBuilder.java:277)
	at com.google.common.collect.Iterators$6.transform(Iterators.java:783)
	at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:47)
	at com.google.common.collect.FluentIterable.copyInto(FluentIterable.java:791)
	at org.eclipse.xtext.build.ClusteringStorageAwareResourceLoader.executeClustered(ClusteringStorageAwareResourceLoader.java:69)
	at org.eclipse.xtext.build.BuildContext.executeClustered(BuildContext.java:55)
	at org.eclipse.xtext.build.IncrementalBuilder$InternalStatefulIncrementalBuilder.launch(IncrementalBuilder.java:259)
	at org.eclipse.xtext.build.IncrementalBuilder.build(IncrementalBuilder.java:412)
	at org.eclipse.xtext.build.IncrementalBuilder.build(IncrementalBuilder.java:394)
	at org.eclipse.xtext.ide.server.ProjectManager.doBuild(ProjectManager.java:106)
	at org.eclipse.xtext.ide.server.ProjectManager.doInitialBuild(ProjectManager.java:97)
	at org.eclipse.xtext.ide.server.BuildManager.doInitialBuild(BuildManager.java:164)
	at org.eclipse.xtext.ide.server.WorkspaceManager.refreshWorkspaceConfig(WorkspaceManager.java:233)
	at org.eclipse.xtext.ide.server.WorkspaceManager.initialize(WorkspaceManager.java:170)
	at org.eclipse.xtext.ide.server.LanguageServerImpl.lambda$initialize$0(LanguageServerImpl.java:225)
	at org.eclipse.xtext.ide.server.concurrent.WriteRequest.run(WriteRequest.java:50)
	... 5 more
@mchlrch mchlrch transferred this issue from zazuko/expressive-rdf-mapper Dec 5, 2023
@mchlrch mchlrch added the bug Something isn't working label Dec 13, 2023
mchlrch added a commit that referenced this issue Dec 13, 2023
NoSuchElementException in RdfMappingGenerator
mchlrch added a commit to zazuko/expressive-rdf-mapper that referenced this issue Dec 18, 2023
@mchlrch
Copy link
Member

mchlrch commented Dec 19, 2023

Resolved in xrm version 1.5.0

@mchlrch mchlrch closed this as completed Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants