'Intelij Java persistence imports work except for namedquery

I'm working on a local project where i'm using JPA, so far my configuration worked but i'm encountering the following error while importing the javax.persistence named query.

enter image description here

I have no idea why this one import is giving an error, besides the code also works when i run the project.

This is my module-info file, which seems to be working fine too

enter image description here

and here are my used JARs for JPA

enter image description here

i'm at a loss as to what is cousing this error, does anyone have any ideas on how to solve this ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source