Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 09:06 Go to next message
Andre Seecamp is currently offline Andre SeecampFriend
Messages: 13
Registered: July 2021
Junior Member
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 09:58 Go to previous messageGo to next message
Laurent Redor is currently offline Laurent RedorFriend
Messages: 300
Registered: July 2009
Senior Member
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


Laurent Redor - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Invalid Type Literal error when using AQL Expression [message #1844735 is a reply to message #1844730] Thu, 23 September 2021 13:48 Go to previous messageGo to next message
Andre Seecamp is currently offline Andre SeecampFriend
Messages: 13
Registered: July 2021
Junior Member
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 07:56 Go to previous messageGo to next message
Laurent Redor is currently offline Laurent RedorFriend
Messages: 300
Registered: July 2009
Senior Member
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/


Laurent Redor - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Invalid Type Literal error when using AQL Expression [message #1844828 is a reply to message #1844761] Mon, 27 September 2021 11:39 Go to previous messageGo to next message
Andre Seecamp is currently offline Andre SeecampFriend
Messages: 13
Registered: July 2021
Junior Member
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 17:31 Go to previous messageGo to next message
Andre Seecamp is currently offline Andre SeecampFriend
Messages: 13
Registered: July 2021
Junior Member
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 08:11 Go to previous message
AMir Taghizadegan is currently offline AMir TaghizadeganFriend
Messages: 32
Registered: May 2022
Member
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: Thu Apr 25 16:24:58 GMT 2024

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

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

Back to the top