Skip to main content



      Home
Home » Eclipse Projects » Sirius » Invalid Type Literal error when using AQL Expression
Invalid Type Literal error when using AQL Expression [message #1844677] Tue, 21 September 2021 05:06 Go to next message
Eclipse UserFriend
Hello,

when I use an aql expression with "model::myType" I receive the error
Invalid Type Literal model::myType


For example in the aql expression
aql:self.eContainer().->filter(model::myType)


I found the following forum post where the same error occurs:
https://www.eclipse.org/forums/index.php/t/1090273/

They state that it could have something to do with model schizophrenia but in my odesign file I only reference one metamodel.

Could it be that I referenced the metamodel somewhere else that I am not aware of or is the error caused by something else?

Thanks in advance,
André
Re: Invalid Type Literal error when using AQL Expression [message #1844730 is a reply to message #1844677] Thu, 23 September 2021 05:58 Go to previous messageGo to next message
Eclipse UserFriend
Hello André,
Your expression seems strange. "filter" is for a collection but eContainer() returns an EObject.
Maybe you want something like :
aql:self.eContainer().oclAsType(model::myType))

Regards,
Laurent
Re: Invalid Type Literal error when using AQL Expression [message #1844735 is a reply to message #1844730] Thu, 23 September 2021 09:48 Go to previous messageGo to next message
Eclipse UserFriend
Hello Laurent,

Thank you for your answer.

It seems like that I did not correctly check my example for mistakes. I think I did not copy everything from my aql expression.

Nonetheless, even with your expression I still get the error "Invalid type literal model::myType".

So, if you know where this error origins from I would be really grateful.
Re: Invalid Type Literal error when using AQL Expression [message #1844761 is a reply to message #1844735] Fri, 24 September 2021 03:56 Go to previous messageGo to next message
Eclipse UserFriend
Maybe, the "model" package is not known in the environment where the AQL expression is interpreted?
It is difficult to help more without more details. What is your environment; A runtime, a deployed product, ...?

If you use the "Interpreter" view, what is the result type of expression "aql:self.eContainer()"? The type is displayed in the "title area" just after the combo to select "Sirius interpreter": index.php/fa/41016/0/
Re: Invalid Type Literal error when using AQL Expression [message #1844828 is a reply to message #1844761] Mon, 27 September 2021 07:39 Go to previous messageGo to next message
Eclipse UserFriend
The environment where the error occurs is Sirius Web.
There is probably no file where I can test it via the Sirius Interpreter in the way you mentioned?
Re: Invalid Type Literal error when using AQL Expression [message #1847240 is a reply to message #1844828] Wed, 20 October 2021 13:31 Go to previous messageGo to next message
Eclipse UserFriend
How would I implement the "model" package within Sirius Web? I already have a dependency to the project.
Re: Invalid Type Literal error when using AQL Expression [message #1852958 is a reply to message #1847240] Mon, 13 June 2022 04:11 Go to previous message
Eclipse UserFriend
Hi Andre,
do you have a solution for that problem?
Previous Topic:EMF Model Instance is null
Next Topic:display supertype in the selection popup
Goto Forum:
  


Current Time: Tue Mar 25 15:43:02 EDT 2025

Powered by FUDForum. Page generated in 0.03907 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top