Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312858 - [MWE2] Issues found at validation in the reader component are not printed out
Summary: [MWE2] Issues found at validation in the reader component are not printed out
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 major (vote)
Target Milestone: RC1   Edit
Assignee: Sebastian Zarnekow CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-14 01:12 EDT by Joerg Reichert CLA
Modified: 2017-09-19 16:23 EDT (History)
2 users (show)

See Also:
sebastian.zarnekow: helios+


Attachments
Print issues to console in a human readable and parsable format (12.76 KB, patch)
2010-05-17 08:54 EDT, Sebastian Zarnekow CLA
sebastian.zarnekow: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joerg Reichert CLA 2010-05-14 01:12:13 EDT
Build Identifier: I20100429-1549

Loading an invalid model with the reader component in MWE2 prints out an not very helpful error message (note I use a custom reader component that inherits from org.eclipse.xtext.mwe.Reader, so don't be confused by the entry in the stack trace): 

Error message in XML MWE (that worked as expected):

2964 ERROR WorkflowRunner     - [ERROR]: Couldn't resolve reference to ServiceComponent 'DHL_Service'.(Element: ERROR:Couldn't resolve reference to ServiceComponent 'DHL_Service'. (file:/D:/e36M7xM7/workspace/de.abg.jreichert.serviceqos.generator/src/model/splitted/Measurements.sqos line : 5); Reported by: -UNKNOWN-)
2964 ERROR WorkflowRunner     - [ERROR]: Couldn't resolve reference to ServiceComponent 'DHL_Service.DHL_ServiceSoap12'.(Element: ERROR:Couldn't resolve reference to ServiceComponent 'DHL_Service.DHL_ServiceSoap12'. (file:/D:/e36M7xM7/workspace/de.abg.jreichert.serviceqos.generator/src/model/splitted/Measurements.sqos line : 6); Reported by: -UNKNOWN-)
2964 ERROR WorkflowRunner     - [ERROR]: Couldn't resolve reference to ServiceComponent 'DHL_Service.DHL_ServiceSoap.GetDHLRate'.(Element: ERROR:Couldn't resolve reference to ServiceComponent 'DHL_Service.DHL_ServiceSoap.GetDHLRate'. (file:/D:/e36M7xM7/workspace/de.abg.jreichert.serviceqos.generator/src/model/splitted/Measurements.sqos line : 7); Reported by: -UNKNOWN-)
2964 ERROR WorkflowRunner     - [ERROR]: Couldn't resolve reference to ServiceComponent 'DHL_Service'.(Element: ERROR:Couldn't resolve reference to ServiceComponent 'DHL_Service'. (file:/D:/e36M7xM7/workspace/de.abg.jreichert.serviceqos.generator/src/model/splitted/Measurements.sqos line : 8); Reported by: -UNKNOWN-)
2964 ERROR WorkflowRunner     - [ERROR]: The feature 'component' of 'de.abg.jreichert.serviceqos.serviceQos.impl.NonFunctionalPropertyMeasurementImpl@1c794cc{file:/D:/e36M7xM7/workspace/de.abg.jreichert.serviceqos.generator/src/model/splitted/Measurements.sqos#//@elements.0/@elements.0}' contains an unresolved proxy 'de.abg.jreichert.serviceqos.serviceQos.impl.ServiceImpl@18c4a7f{file:/D:/e36M7xM7/workspace/de.abg.jreichert.serviceqos.generator/src/model/splitted/Measurements.sqos#xtextLink_:://@elements.0/@elements.0::http://www.abg.de/jreichert/serviceqos/ServiceQos«NonFunctionalPropertyMeasurement«2::/9}'(Element: ERROR:The feature 'component' of 'de.abg.jreichert.serviceqos.serviceQos.impl.NonFunctionalPropertyMeasurementImpl@1c794cc{file:/D:/e36M7xM7/workspace/de.abg.jreichert.serviceqos.generator/src/model/splitted/Measurements.sqos#//@elements.0/@elements.0}' contains an unresolved proxy 'de.abg.jreichert.serviceqos.serviceQos.impl.ServiceImpl@18c4a7f{file:/D:/e36M7xM7/workspace/de.abg.jreichert.serviceqos.generator/src/model/splitted/Measurements.sqos#xtextLink_:://@elements.0/@elements.0::http://www.abg.de/jreichert/serviceqos/ServiceQos«NonFunctionalPropertyMeasurement«2::/9}' (file:/D:/e36M7xM7/workspace/de.abg.jreichert.serviceqos.generator/src/model/splitted/Measurements.sqos line : 5); Reported by: -UNKNOWN-)
2965 ERROR WorkflowRunner     - [ERROR]: The feature 'component' of 'de.abg.jreichert.serviceqos.serviceQos.impl.NonFunctionalPropertyMeasurementImpl@1f9e31e{file:/D:/e36M7xM7/workspace/de.abg.jreichert.serviceqos.generator/src/model/splitted/Measurements.sqos#//@elements.0/@elements.1}' contains an unresolved proxy 'de.abg.jreichert.serviceqos.serviceQos.impl.ServiceImpl@16ee3ec{file:/D:/e36M7xM7/workspace/de.abg.jreichert.serviceqos.generator/src/model/splitted/Measurements.sqos#xtextLink_:://@elements.0/@elements.1::http://www.abg.de/jreichert/serviceqos/ServiceQos«NonFunctionalPropertyMeasurement«2::/9}'(Element: ERROR:The feature 'component' of 'de.abg.jreichert.serviceqos.serviceQos.impl.NonFunctionalPropertyMeasurementImpl@1f9e31e{file:/D:/e36M7xM7/workspace/de.abg.jreichert.serviceqos.generator/src/model/splitted/Measurements.sqos#//@elements.0/@elements.1}' contains an unresolved proxy 'de.abg.jreichert.serviceqos.serviceQos.impl.ServiceImpl@16ee3ec{file:/D:/e36M7xM7/workspace/de.abg.jreichert.serviceqos.generator/src/model/splitted/Measurements.sqos#xtextLink_:://@elements.0/@elements.1::http://www.abg.de/jreichert/serviceqos/ServiceQos«NonFunctionalPropertyMeasurement«2::/9}' (file:/D:/e36M7xM7/workspace/de.abg.jreichert.serviceqos.generator/src/model/splitted/Measurements.sqos line : 6); Reported by: -UNKNOWN-)
2965 ERROR WorkflowRunner     - [ERROR]: The feature 'component' of 'de.abg.jreichert.serviceqos.serviceQos.impl.NonFunctionalPropertyMeasurementImpl@e0c7c3{file:/D:/e36M7xM7/workspace/de.abg.jreichert.serviceqos.generator/src/model/splitted/Measurements.sqos#//@elements.0/@elements.2}' contains an unresolved proxy 'de.abg.jreichert.serviceqos.serviceQos.impl.ServiceImpl@135da43{file:/D:/e36M7xM7/workspace/de.abg.jreichert.serviceqos.generator/src/model/splitted/Measurements.sqos#xtextLink_:://@elements.0/@elements.2::http://www.abg.de/jreichert/serviceqos/ServiceQos«NonFunctionalPropertyMeasurement«2::/9}'(Element: ERROR:The feature 'component' of 'de.abg.jreichert.serviceqos.serviceQos.impl.NonFunctionalPropertyMeasurementImpl@e0c7c3{file:/D:/e36M7xM7/workspace/de.abg.jreichert.serviceqos.generator/src/model/splitted/Measurements.sqos#//@elements.0/@elements.2}' contains an unresolved proxy 'de.abg.jreichert.serviceqos.serviceQos.impl.ServiceImpl@135da43{file:/D:/e36M7xM7/workspace/de.abg.jreichert.serviceqos.generator/src/model/splitted/Measurements.sqos#xtextLink_:://@elements.0/@elements.2::http://www.abg.de/jreichert/serviceqos/ServiceQos«NonFunctionalPropertyMeasurement«2::/9}' (file:/D:/e36M7xM7/workspace/de.abg.jreichert.serviceqos.generator/src/model/splitted/Measurements.sqos line : 7); Reported by: -UNKNOWN-)
2965 ERROR WorkflowRunner     - [ERROR]: The feature 'component' of 'de.abg.jreichert.serviceqos.serviceQos.impl.NonFunctionalPropertyMeasurementImpl@15b123b{file:/D:/e36M7xM7/workspace/de.abg.jreichert.serviceqos.generator/src/model/splitted/Measurements.sqos#//@elements.0/@elements.3}' contains an unresolved proxy 'de.abg.jreichert.serviceqos.serviceQos.impl.ServiceImpl@8c7be5{file:/D:/e36M7xM7/workspace/de.abg.jreichert.serviceqos.generator/src/model/splitted/Measurements.sqos#xtextLink_:://@elements.0/@elements.3::http://www.abg.de/jreichert/serviceqos/ServiceQos«NonFunctionalPropertyMeasurement«2::/9}'(Element: ERROR:The feature 'component' of 'de.abg.jreichert.serviceqos.serviceQos.impl.NonFunctionalPropertyMeasurementImpl@15b123b{file:/D:/e36M7xM7/workspace/de.abg.jreichert.serviceqos.generator/src/model/splitted/Measurements.sqos#//@elements.0/@elements.3}' contains an unresolved proxy 'de.abg.jreichert.serviceqos.serviceQos.impl.ServiceImpl@8c7be5{file:/D:/e36M7xM7/workspace/de.abg.jreichert.serviceqos.generator/src/model/splitted/Measurements.sqos#xtextLink_:://@elements.0/@elements.3::http://www.abg.de/jreichert/serviceqos/ServiceQos«NonFunctionalPropertyMeasurement«2::/9}' (file:/D:/e36M7xM7/workspace/de.abg.jreichert.serviceqos.generator/src/model/splitted/Measurements.sqos line : 8); Reported by: -UNKNOWN-)


Error message in MWE2 (the issues are not printed, can only be seen when setting a break point):

723  ERROR Mwe2Launcher       - Validation errors.
org.eclipse.emf.mwe.core.WorkflowInterruptedException: Validation errors.
	at org.eclipse.xtext.mwe.Validator.validate(Validator.java:76)
	at org.eclipse.xtext.mwe.Reader.invokeInternal(Reader.java:145)
	at de.abg.jreichert.serviceqos.ServiceQosUriBasedReader.invokeInternal(ServiceQosUriBasedReader.java:21)
	at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:129)
	at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:199)
	at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:31)
	at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:19)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:73)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:51)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:74)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:35)

Reproducible: Always

Steps to Reproduce:
1. Write an invalid (Xtext) model (that e.g. references elements that are not there)
2. Write an MWE2 Workflow with using the org.eclipse.xtext.mwe.Reader component to load the model
Comment 1 Sebastian Zarnekow CLA 2010-05-17 08:54:18 EDT
Created attachment 168719 [details]
Print issues to console in a human readable and parsable format

example output:

1085 [main] ERROR mf.mwe2.launch.runtime.Mwe2Launcher  - Problems running workflow workflow.MyDslGenerator: Validation problems: 
3 errors:
	Person.helios - /Applications/development/java/eclipse/eclipse-3.6M4/runtime-EclipseApplication/org.xtext.example.helios.generator/src/model/Person.helios
		9: Couldn't resolve reference to Type 'Addres'.
		12: mismatched input '/' expecting '{'
	Datatypes.helios - /Applications/development/java/eclipse/eclipse-3.6M4/runtime-EclipseApplication/org.xtext.example.helios.generator/src/model/Datatypes.helios
		5: mismatched input ';' expecting '}'
1 warning:
	Person.helios - /Applications/development/java/eclipse/eclipse-3.6M4/runtime-EclipseApplication/org.xtext.example.helios.generator/src/model/Person.helios
		7: Name should start with a capital
Comment 2 Sebastian Zarnekow CLA 2010-05-17 14:35:17 EDT
Fixed in HEAD.
Comment 3 Karsten Thoms CLA 2017-09-19 16:23:44 EDT
Closing bug which were set to RESOLVED before Eclipse Neon.0.