IntelliJ 13 - no JPA validation after upgrade from v12

I'm having trouble getting JP QL validating working in v13.  I upgraded from v12 and it brought over my project automatically.

As far as I can see I've set everything up correctly, in the module settings I have a JPA facet attached to the module and pointing at the correct persistence.xml.

If I click on the "Facet" list I see JPA, pointing to the same persistence.xml and Hibernate set as the default provider at the bottom of the screen.

On my main editing screen I can see the Persistence window at the bottom left, and everything in that looks good.

In the main settings I have all the "JPA Issues" checked under intentions, but still the JPQL code remains steadfastly green - no error checking, no completion etc.

What am I missing here?

5 comments
Comment actions Permalink

Hello.

Where do you edit JPQL code? Is that JPA console, or say, @NamedQuery annotation, or - ... ?

Regards,
Alexander.

0
Comment actions Permalink

In the standard editor - @Stateless bean with injected @PersistenceContext.  With the same code the validation worked in v12.

The code is basic:

@Stateless
public class MyBean
{
    @PersistenceContext(unitName="ds1")
    javax.persistence.EntityManager em;

    public Collection<SomeEntity> getEntities()
    {
        return em.createQuery("select o from SomeEntity as o").getResultList();
    }


No validation in the createQuery - in any of my (many hundreds) of queries across the application.

0
Comment actions Permalink

Please make sure IntelliLang plugin is enabled (Settings / Plugins).

If it is, then set the caret into this JPAQL code and check intentions shown by Alt+Enter.

1. Is "Language Injection Settings" there?
2. Does applying "Language Injection Settings" show the dialog with correct injected languageID (JPAQL) and properly selected java methods parameters?

If any answer is "no" then Settings / Language Injections should be repaired accordingly.

Thanks,
Alexander.

0
Comment actions Permalink

That's it - the IntelliLang plugin wasn't enabled.......thank you VERY much!!

0
Comment actions Permalink

Thank you for this tip. I was having the same problem as well.

It seems like IntelliLang needs to be enabled by default if JPA is selected, or at least there should be a note in the "Editor > Colors & Fonts > JPA/EJB/Hibernate QL" configuration screen that in order to see the highlighting, the IntelliLang plugin should be enabled.

0

Please sign in to leave a comment.