| Summary: | CCE when Validating an expression | ||
|---|---|---|---|
| Product: | [Modeling] Acceleo | Reporter: | Cedric Brun <cedric.brun> |
| Component: | Query Language | Assignee: | Yvan Lussaud <yvan.lussaud> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 3.6.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| See Also: |
https://git.eclipse.org/r/44356 https://git.eclipse.org/c/acceleo/org.eclipse.acceleo.git/commit/?id=6d7a437a54a05d0ec2cea52c21527b09de0c9c84 |
||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 462490 | ||
New Gerrit change created: https://git.eclipse.org/r/44356 Gerrit change https://git.eclipse.org/r/44356 was merged to [master]. Commit: http://git.eclipse.org/c/acceleo/org.eclipse.acceleo.git/commit/?id=6d7a437a54a05d0ec2cea52c21527b09de0c9c84 done for M7 Closing resolved bugs |
I get a class cast exception with the following stack trace when validating this expression : aql:not self.target.oclAsType(ecore::EClass).eAllSuperTypes->including(self.target)->asSet().eInverse('eType')->isEmpty() TRY org.eclipse.sirius.common.acceleo.aql 4 0 2015-03-18 17:53:17.482 !MESSAGE An internal error occured during validation of a query !STACK 0 org.eclipse.acceleo.query.runtime.AcceleoQueryValidationException: An internal error occured during validation of a query at org.eclipse.acceleo.query.runtime.impl.ValidationServices.callOrApplyTypes(ValidationServices.java:411) at org.eclipse.acceleo.query.parser.AstValidator.caseCall(AstValidator.java:176) at org.eclipse.acceleo.query.parser.AstValidator.caseCall(AstValidator.java:1) at org.eclipse.acceleo.query.ast.util.AstSwitch.doSwitch(AstSwitch.java:117) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.eclipse.acceleo.query.parser.AstValidator.caseCall(AstValidator.java:167) at org.eclipse.acceleo.query.parser.AstValidator.caseCall(AstValidator.java:1) at org.eclipse.acceleo.query.ast.util.AstSwitch.doSwitch(AstSwitch.java:117) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.eclipse.acceleo.query.parser.AstValidator.caseCall(AstValidator.java:167) at org.eclipse.acceleo.query.parser.AstValidator.caseCall(AstValidator.java:1) at org.eclipse.acceleo.query.ast.util.AstSwitch.doSwitch(AstSwitch.java:117) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53) at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69) at org.eclipse.acceleo.query.parser.AstValidator.validate(AstValidator.java:337) at org.eclipse.acceleo.query.runtime.impl.QueryValidationEngine.validate(QueryValidationEngine.java:61) at org.eclipse.sirius.common.acceleo.aql.business.internal.AQLSiriusInterpreter.analyzeExpression(AQLSiriusInterpreter.java:257) at org.eclipse.sirius.common.tools.internal.interpreter.AbstractInterpreter.validateExpression(AbstractInterpreter.java:241) at org.eclipse.sirius.tools.internal.validation.description.constraints.ValidInterpretedExpressionConstraint.checkExpression(ValidInterpretedExpressionConstraint.java:83) 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: org.eclipse.acceleo.query.runtime.AcceleoQueryValidationException: empty argument array passed to callOrApply at org.eclipse.acceleo.query.runtime.impl.ValidationServices.validateCallOnSet(ValidationServices.java:499) at org.eclipse.acceleo.query.runtime.impl.ValidationServices.callOrApplyTypes(ValidationServices.java:398) ... 37 more Caused by: org.eclipse.acceleo.query.runtime.AcceleoQueryValidationException: An internal error occured during validation of a query at org.eclipse.acceleo.query.runtime.impl.ValidationServices.callOrApplyTypes(ValidationServices.java:411) at org.eclipse.acceleo.query.runtime.impl.ValidationServices.validateCallOnSet(ValidationServices.java:479) ... 38 more Caused by: org.eclipse.acceleo.query.runtime.AcceleoQueryValidationException: An internal error occured during validation of a query at org.eclipse.acceleo.query.runtime.impl.ValidationServices.callType(ValidationServices.java:282) at org.eclipse.acceleo.query.runtime.impl.ValidationServices.callOrApplyTypes(ValidationServices.java:404) ... 39 more Caused by: java.lang.ClassCastException: org.eclipse.acceleo.query.validation.type.EClassifierType cannot be cast to org.eclipse.acceleo.query.validation.type.EClassifierLiteralType at org.eclipse.acceleo.query.services.EObjectServices$EInverseService.getType(EObjectServices.java:438) at org.eclipse.acceleo.query.runtime.impl.ValidationServices.getServiceTypes(ValidationServices.java:340) at org.eclipse.acceleo.query.runtime.impl.ValidationServices.callType(ValidationServices.java:269) I guess that's related to the eInverse('someFeatureName')