Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [emf-dev] Exception parsing OCL file


Please use the OCL newsgroup to ask OCL questions.

Carlos M wrote:

We have a problem parsing a OCL file which contains the rules to validate our model.
When the method "parse" is called:

        OCLInput oclInput = new OCLInput(input);               
        OCL ocl =  OCL.newInstance(new MyEnvironmentFactory());
        for (Constraint constraint : ocl.parse(oclInput)){          

it's thrown the next exception:

java.lang.ClassCastException: org.eclipse.ocl.ecore.impl.InvalidTypeImpl cannot be cast to org.eclipse.ocl.types.CollectionType
    at org.eclipse.ocl.util.OCLStandardLibraryUtil.getSetTypeResultTypeOf(
    at org.eclipse.ocl.util.OCLStandardLibraryUtil.getResultTypeOf(

I think that this problem it's due to some OCL rules that contain a class type that it doesn't exist in the model, but I'm not sure.
Please, how can I debug this problem?

Thanks in advance.

_______________________________________________ emf-dev mailing list emf-dev@xxxxxxxxxxx

Back to the top