Static stereotype Enumeration value cannot be set
General description
The edition of an enumeration property of an applied stereotype returns the following error: "Something went wrong while handling the Select widget new value".
Debug values
When debugging the class org.eclipse.sirius.web.services.api.id.IDParser
, in the line UUID uuid = UUID.
_fromString
_(id);
the value of the id parameter is "Incremental"
Steps to reproduce
- Clone, compile and run PapyrusWeb latest version (version used: 19/04/2024), following the README instructions
- Create a new Java project using the "Java template"
- Select the "JavaTemplate" root element and apply the stereotype "CodeGen::Project"
- Choose any value of the enumeration property generationMode.
The error occurs after the choice of the enumeration value. The stack trace is shown below.
Note: this error does not happens if follow the same steps, but with a dynamically created profile with an enumeration value.
Stack trace
2024-07-19T09:52:22.821+02:00 WARN 940254 --- [42-1a9c50559777] o.e.sirius.web.services.api.id.IDParser : Invalid UUID string: Incremental
java.lang.IllegalArgumentException: Invalid UUID string: Incremental at java.base/java.util.UUID.fromString1(UUID.java:280) ~[na:na] at java.base/java.util.UUID.fromString(UUID.java:258) ~[na:na] at org.eclipse.sirius.web.services.api.id.IDParser.parse(IDParser.java:32) ~[sirius-web-services-api-2024.1.4.jar!/:2024.1.4] at org.eclipse.sirius.web.services.representations.RepresentationSearchService.findById(RepresentationSearchService.java:47) ~[sirius-web-services-2024.1.4.jar!/:2024.1.4] at org.eclipse.sirius.components.emf.services.DefaultObjectSearchService.getRepresentation(DefaultObjectSearchService.java:86) ~[sirius-components-emf-2024.1.4.jar!/:2024.1.4] at org.eclipse.sirius.components.emf.services.DefaultObjectSearchService.lambda$getObject$1(DefaultObjectSearchService.java:54) ~[sirius-components-emf-2024.1.4.jar!/:2024.1.4] at java.base/java.util.Optional.or(Optional.java:313) ~[na:na] at org.eclipse.sirius.components.emf.services.DefaultObjectSearchService.getObject(DefaultObjectSearchService.java:54) ~[sirius-components-emf-2024.1.4.jar!/:2024.1.4] at org.eclipse.sirius.components.core.services.ComposedObjectSearchService.getObject(ComposedObjectSearchService.java:51) ~[sirius-components-core-2024.1.4.jar!/:2024.1.4] at org.eclipse.sirius.components.core.services.ObjectService.getObject(ObjectService.java:92) ~[sirius-components-core-2024.1.4.jar!/:2024.1.4] at org.eclipse.sirius.components.view.emf.form.ViewFormDescriptionConverterSwitch.lambda$getSelectNewValueHandler$80(ViewFormDescriptionConverterSwitch.java:874) ~[sirius-components-view-emf-2024.1.4.jar!/:2024.1.4] at java.base/java.util.Optional.flatMap(Optional.java:289) ~[na:na] at org.eclipse.sirius.components.view.emf.form.ViewFormDescriptionConverterSwitch.lambda$getSelectNewValueHandler$81(ViewFormDescriptionConverterSwitch.java:874) ~[sirius-components-view-emf-2024.1.4.jar!/:2024.1.4] at org.eclipse.sirius.components.forms.components.SelectComponent.lambda$render$0(SelectComponent.java:87) ~[sirius-components-forms-2024.1.4.jar!/:2024.1.4] at org.eclipse.sirius.components.collaborative.forms.handlers.EditSelectEventHandler.lambda$handle$0(EditSelectEventHandler.java:90) ~[sirius-components-collaborative-forms-2024.1.4.jar!/:2024.1.4] at java.base/java.util.Optional.map(Optional.java:260) ~[na:na] at org.eclipse.sirius.components.collaborative.forms.handlers.EditSelectEventHandler.handle(EditSelectEventHandler.java:90) ~[sirius-components-collaborative-forms-2024.1.4.jar!/:2024.1.4] at org.eclipse.sirius.components.collaborative.forms.FormEventProcessor.handle(FormEventProcessor.java:142) ~[sirius-components-collaborative-forms-2024.1.4.jar!/:2024.1.4] at org.eclipse.sirius.components.collaborative.editingcontext.EditingContextEventProcessor.handleRepresentationInput(EditingContextEventProcessor.java:347) ~[sirius-components-collaborative-2024.1.4.jar!/:2024.1.4] at org.eclipse.sirius.components.collaborative.editingcontext.EditingContextEventProcessor.doHandle(EditingContextEventProcessor.java:275) ~[sirius-components-collaborative-2024.1.4.jar!/:2024.1.4] at org.eclipse.sirius.components.collaborative.editingcontext.EditingContextEventProcessor.lambda$handle$2(EditingContextEventProcessor.java:241) ~[sirius-components-collaborative-2024.1.4.jar!/:2024.1.4] at org.eclipse.sirius.components.web.concurrent.DelegatingRequestContextRunnable.run(DelegatingRequestContextRunnable.java:40) ~[sirius-components-web-2024.1.4.jar!/:2024.1.4] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[na:na] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na] at java.base/java.lang.Thread.run(Thread.java:840) ~[na:na]
2024-07-19T09:52:22.833+02:00 WARN 940254 --- [42-1a9c50559777] o.e.s.c.interpreter.AQLInterpreter : An error has occurred with the expression 'aql:self.setStereotypeFeatureValue(feature,newValue)': setStereotypeFeatureValue(org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EStructuralFeature,java.lang.Object) with arguments [org.eclipse.papyrus.designer.languages.common.profile.Codegen.impl.ProjectImpl@62ab248a (generationMode: Batch, projectName: null, sourceFolder: null, prefix: null), org.eclipse.emf.ecore.impl.EAttributeImpl@755033c5 (name: generationMode) (ordered: false, unique: true, lowerBound: 1, upperBound: 1) (changeable: true, volatile: false, transient: false, defaultValueLiteral: null, unsettable: false, derived: false) (iD: false), Incremental] failed: class org.eclipse.emf.ecore.impl.EEnumLiteralImpl cannot be cast to class org.eclipse.papyrus.designer.languages.common.profile.Codegen.GenerationModeKind (org.eclipse.emf.ecore.impl.EEnumLiteralImpl and org.eclipse.papyrus.designer.languages.common.profile.Codegen.GenerationModeKind are in unnamed module of loader org.springframework.boot.loader.LaunchedURLClassLoader @6f496d9f) 2024-07-19T09:59:48.882+02:00 WARN 940254 --- [nio-8080-exec-4] o.e.s.c.c.e.EditingContextEventProcessor : The representation with the id 933699fe-0818-384b-b601-7758d43f33e6 does not exist 2024-07-19T09:59:59.549+02:00 WARN 940254 --- [42-1a9c50559777] o.e.sirius.web.services.api.id.IDParser : Invalid UUID string: Batch
java.lang.IllegalArgumentException: Invalid UUID string: Batch at java.base/java.util.UUID.fromString1(UUID.java:280) ~[na:na] at java.base/java.util.UUID.fromString(UUID.java:258) ~[na:na] at org.eclipse.sirius.web.services.api.id.IDParser.parse(IDParser.java:32) ~[sirius-web-services-api-2024.1.4.jar!/:2024.1.4] at org.eclipse.sirius.web.services.representations.RepresentationSearchService.findById(RepresentationSearchService.java:47) ~[sirius-web-services-2024.1.4.jar!/:2024.1.4] at org.eclipse.sirius.components.emf.services.DefaultObjectSearchService.getRepresentation(DefaultObjectSearchService.java:86) ~[sirius-components-emf-2024.1.4.jar!/:2024.1.4] at org.eclipse.sirius.components.emf.services.DefaultObjectSearchService.lambda$getObject$1(DefaultObjectSearchService.java:54) ~[sirius-components-emf-2024.1.4.jar!/:2024.1.4] at java.base/java.util.Optional.or(Optional.java:313) ~[na:na] at org.eclipse.sirius.components.emf.services.DefaultObjectSearchService.getObject(DefaultObjectSearchService.java:54) ~[sirius-components-emf-2024.1.4.jar!/:2024.1.4] at org.eclipse.sirius.components.core.services.ComposedObjectSearchService.getObject(ComposedObjectSearchService.java:51) ~[sirius-components-core-2024.1.4.jar!/:2024.1.4] at org.eclipse.sirius.components.core.services.ObjectService.getObject(ObjectService.java:92) ~[sirius-components-core-2024.1.4.jar!/:2024.1.4] at org.eclipse.sirius.components.view.emf.form.ViewFormDescriptionConverterSwitch.lambda$getSelectNewValueHandler$80(ViewFormDescriptionConverterSwitch.java:874) ~[sirius-components-view-emf-2024.1.4.jar!/:2024.1.4] at java.base/java.util.Optional.flatMap(Optional.java:289) ~[na:na] at org.eclipse.sirius.components.view.emf.form.ViewFormDescriptionConverterSwitch.lambda$getSelectNewValueHandler$81(ViewFormDescriptionConverterSwitch.java:874) ~[sirius-components-view-emf-2024.1.4.jar!/:2024.1.4] at org.eclipse.sirius.components.forms.components.SelectComponent.lambda$render$0(SelectComponent.java:87) ~[sirius-components-forms-2024.1.4.jar!/:2024.1.4] at org.eclipse.sirius.components.collaborative.forms.handlers.EditSelectEventHandler.lambda$handle$0(EditSelectEventHandler.java:90) ~[sirius-components-collaborative-forms-2024.1.4.jar!/:2024.1.4] at java.base/java.util.Optional.map(Optional.java:260) ~[na:na] at org.eclipse.sirius.components.collaborative.forms.handlers.EditSelectEventHandler.handle(EditSelectEventHandler.java:90) ~[sirius-components-collaborative-forms-2024.1.4.jar!/:2024.1.4] at org.eclipse.sirius.components.collaborative.forms.FormEventProcessor.handle(FormEventProcessor.java:142) ~[sirius-components-collaborative-forms-2024.1.4.jar!/:2024.1.4] at org.eclipse.sirius.components.collaborative.editingcontext.EditingContextEventProcessor.handleRepresentationInput(EditingContextEventProcessor.java:347) ~[sirius-components-collaborative-2024.1.4.jar!/:2024.1.4] at org.eclipse.sirius.components.collaborative.editingcontext.EditingContextEventProcessor.doHandle(EditingContextEventProcessor.java:275) ~[sirius-components-collaborative-2024.1.4.jar!/:2024.1.4] at org.eclipse.sirius.components.collaborative.editingcontext.EditingContextEventProcessor.lambda$handle$2(EditingContextEventProcessor.java:241) ~[sirius-components-collaborative-2024.1.4.jar!/:2024.1.4] at org.eclipse.sirius.components.web.concurrent.DelegatingRequestContextRunnable.run(DelegatingRequestContextRunnable.java:40) ~[sirius-components-web-2024.1.4.jar!/:2024.1.4] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[na:na] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na] at java.base/java.lang.Thread.run(Thread.java:840) ~[na:na]
2024-07-19T09:59:59.550+02:00 WARN 940254 --- [42-1a9c50559777] o.e.s.c.interpreter.AQLInterpreter : An error has occurred with the expression 'aql:self.setStereotypeFeatureValue(feature,newValue)': setStereotypeFeatureValue(org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EStructuralFeature,java.lang.Object) with arguments [org.eclipse.papyrus.designer.languages.common.profile.Codegen.impl.ProjectImpl@62ab248a (generationMode: Batch, projectName: null, sourceFolder: null, prefix: null), org.eclipse.emf.ecore.impl.EAttributeImpl@755033c5 (name: generationMode) (ordered: false, unique: true, lowerBound: 1, upperBound: 1) (changeable: true, volatile: false, transient: false, defaultValueLiteral: null, unsettable: false, derived: false) (iD: false), Batch] failed: class org.eclipse.emf.ecore.impl.EEnumLiteralImpl cannot be cast to class org.eclipse.papyrus.designer.languages.common.profile.Codegen.GenerationModeKind (org.eclipse.emf.ecore.impl.EEnumLiteralImpl and org.eclipse.papyrus.designer.languages.common.profile.Codegen.GenerationModeKind are in unnamed module of loader org.springframework.boot.loader.LaunchedURLClassLoader @6f496d9f)