Bug 489405 - NumberFormatException on odesign validation
Summary: NumberFormatException on odesign validation
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2016-03-11 03:03 EST by Esteban DUGUEPEROUX CLA
Modified: 2016-03-14 10:39 EDT (History)
0 users

See Also:


Attachments
Sample project to reproduce (198.79 KB, application/zip)
2016-03-11 03:03 EST, Esteban DUGUEPEROUX CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Esteban DUGUEPEROUX CLA 2016-03-11 03:03:01 EST
Created attachment 260240 [details]
Sample project to reproduce

When validating my odesign I get the following exception :

java.lang.IllegalArgumentException
	at org.eclipse.osgi.util.NLS.internalBind(NLS.java:192)
	at org.eclipse.osgi.util.NLS.bind(NLS.java:119)
	at org.eclipse.emf.validation.internal.util.TextUtils.formatMessage(TextUtils.java:167)
	at org.eclipse.emf.validation.model.ConstraintStatus.createStatus(ConstraintStatus.java:254)
	at org.eclipse.emf.validation.model.ConstraintStatus.createStatus(ConstraintStatus.java:306)
	at org.eclipse.sirius.tools.internal.validation.description.constraints.ValidInterpretedExpressionConstraint.checkExpression(ValidInterpretedExpressionConstraint.java:93)
	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)
Caused by: java.lang.NumberFormatException: For input string: "views"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:580)
	at java.lang.Integer.parseInt(Integer.java:615)
	at org.eclipse.osgi.util.NLS.internalBind(NLS.java:190)
	... 22 more
Comment 1 Esteban DUGUEPEROUX CLA 2016-03-11 03:15:52 EST
Scenario to reproduce:

1. Import attached projects
2. Launch a second instance
3. Import in this second instance, the "fr.obeo.dsl.relational.design" project
4. Open the odesign and validate it :


with "aql:views->select(self.oclAsType(DSemanticDecorator).target)" expression
a error marker is created with "Internal exception occured while evaluating an expression" without more details.
Catching AcceleoQueryEvaluationException in debug I get following stacktrace :

org.eclipse.acceleo.query.runtime.AcceleoQueryEvaluationException: Internal exception occured while evaluating an expression
	at org.eclipse.acceleo.query.parser.AstBuilderListener.pop(AstBuilderListener.java:856)
	at org.eclipse.acceleo.query.parser.AstBuilderListener.exitIterationCall(AstBuilderListener.java:1318)
	at org.eclipse.acceleo.query.parser.QueryParser$IterationCallContext.exitRule(QueryParser.java:883)
	at org.antlr.v4.runtime.Parser.triggerExitRuleEvent(Parser.java:425)
	at org.antlr.v4.runtime.Parser.exitRule(Parser.java:635)
	at org.eclipse.acceleo.query.parser.QueryParser.entry(QueryParser.java:116)
	at org.eclipse.acceleo.query.runtime.impl.QueryBuilderEngine.build(QueryBuilderEngine.java:77)
	at org.eclipse.acceleo.query.runtime.impl.QueryValidationEngine.validate(QueryValidationEngine.java:54)
	at org.eclipse.sirius.common.acceleo.aql.business.internal.AQLSiriusInterpreter.analyzeExpression(AQLSiriusInterpreter.java:268)
	at org.eclipse.sirius.common.tools.api.interpreter.CompoundInterpreter.analyzeExpression(CompoundInterpreter.java:1025)
	at org.eclipse.sirius.business.api.dialect.description.MultiLanguagesValidator.validateExpression(MultiLanguagesValidator.java:52)
	at org.eclipse.sirius.tools.internal.validation.description.constraints.ValidInterpretedExpressionConstraint.checkExpression(ValidInterpretedExpressionConstraint.java:86)
	at org.eclipse.sirius.tools.internal.validation.description.constraints.ValidInterpretedExpressionConstraint.validate(ValidInterpretedExpressionConstraint.java:58)
	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:119)
Caused by: java.util.EmptyStackException
	at java.util.Stack.peek(Stack.java:102)
	at java.util.Stack.pop(Stack.java:84)
	at org.eclipse.acceleo.query.parser.AstBuilderListener.pop(AstBuilderListener.java:841)
	... 28 more


And I get exception of bugzilla description with Acceleo 3 expression : [views->select(self.oclAsType(DSemanticDecorator).target)/]
which is invalid but should not trigger this exception.