Bug 489567 - NPE launching the VSM validation
Summary: NPE launching the VSM validation
Status: CLOSED WORKSFORME
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 3.1.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.0.0M7   Edit
Assignee: Maxime Porhel CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2016-03-14 12:35 EDT by Cedric Brun CLA
Modified: 2016-06-24 08:03 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cedric Brun CLA 2016-03-14 12:35:46 EDT
When I launch the vsm validation of ecore.odesign in ecoretools (commit 2482493f8a1a05c4f45c9b3f5f2bf42fd9f614f1), the validation rules gets automatically disabled by Eclipse as it failed with : 

java.lang.NullPointerException
	at org.eclipse.sirius.common.tools.api.interpreter.IInterpreterContextUtils.collectNSUris(IInterpreterContextUtils.java:125)
	at org.eclipse.sirius.common.tools.api.interpreter.IInterpreterContextUtils.haveSameScopeDefinition(IInterpreterContextUtils.java:115)
	at org.eclipse.sirius.business.api.dialect.description.MultiLanguagesValidator.provide(MultiLanguagesValidator.java:63)
	at org.eclipse.sirius.business.api.dialect.description.MultiLanguagesValidator.validateExpression(MultiLanguagesValidator.java:49)
	at org.eclipse.sirius.tools.internal.validation.description.constraints.ValidInterpretedExpressionConstraint.checkExpression(ValidInterpretedExpressionConstraint.java:81)
	at org.eclipse.sirius.tools.internal.validation.description.constraints.ValidInterpretedExpressionConstraint.validate(ValidInterpretedExpressionConstraint.java:56)
	at org.eclipse.emf.validation.internal.util.JavaConstraintParser$ConstraintAdapter.validate(JavaConstraintParser.java:80)
	at org.eclipse.emf.validation.internal.service.AbstractValidator.evaluateConstraints(AbstractValidator.java:241)
	at org.eclipse.emf.validation.internal.service.BatchValidator.validate(BatchValidator.java:264)
	at org.eclipse.emf.validation.internal.service.BatchValidator.validate(BatchValidator.java:211)
	at org.eclipse.emf.validation.internal.service.BatchValidator.doValidate(BatchValidator.java:149)
	at org.eclipse.emf.validation.internal.service.AbstractValidator.validate(AbstractValidator.java:147)
	at org.eclipse.emf.validation.internal.service.AbstractValidator.validate(AbstractValidator.java:126)
	at org.eclipse.emf.validation.internal.service.BatchValidator.validate(BatchValidator.java:117)
	at org.eclipse.sirius.tools.internal.validation.EValidatorAdapter.validate(EValidatorAdapter.java:80)
	at org.eclipse.emf.ecore.util.Diagnostician.doValidate(Diagnostician.java:171)
	at org.eclipse.emf.edit.ui.action.ValidateAction$3.doValidate(ValidateAction.java:309)
	at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:158)
	at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:137)
	at org.eclipse.emf.edit.ui.action.ValidateAction.validate(ValidateAction.java:264)
	at org.eclipse.emf.edit.ui.action.ValidateAction$1.run(ValidateAction.java:176)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)

Tested with Sirius 3.1.5.201603031306
Comment 1 Eclipse Genie CLA 2016-03-14 12:41:42 EDT
New Gerrit change created: https://git.eclipse.org/r/68377
Comment 2 Cedric Brun CLA 2016-03-14 13:22:49 EDT
I just tried with a nightly build of Sirius 4.0.0 (201603141405) and the problem has been fixed.
Comment 3 Esteban DUGUEPEROUX CLA 2016-03-17 12:46:28 EDT
I cannot reproduce the issue with Sirius 3.1.0 having EcoreTools at revision 2482493f8a1a05c4f45c9b3f5f2bf42fd9f614f1 in the workspace.
Could you give more details on the scenario?
Comment 4 Maxime Porhel CLA 2016-04-26 03:45:13 EDT
Cédric, with ecore.odesign (ecoretools, commit 2482493f8a1a05c4f45c9b3f5f2bf42fd9f614f1) and Sirius 3.1.5 (3.1.5.201604151508 released  on 2016-04-10), I cannot reproduce either. 

This might have been a temporary issue or something related to your environment. 
Feel free to reopen the issue if you encounter again the NPE or if you have more information.
Comment 5 Pierre-Charles David CLA 2016-06-24 08:03:08 EDT
Available in Sirius 4.0.0.