Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » JPQL validation errors in named-queries.xml not ignored
JPQL validation errors in named-queries.xml not ignored [message #900117] Sat, 04 August 2012 04:00 Go to previous message
Karsten Wutzke is currently offline Karsten Wutzke
Messages: 110
Registered: July 2009
Senior Member
Hello,

I have a named-queries.xml file with the following simple query:

  <named-query name="IndividualDocument.forTypes">
    <query>
      SELECT id
      FROM IndividualDocument id
        JOIN FETCH id.company co
        LEFT JOIN FETCH id.documentType dt
      WHERE dt IS NULL OR dt IN :docTypes
      ORDER BY id.fileName
    </query>
  </named-query>


There are several errors in the XML editor:

Multiple annotations found at this line:
- The abstract schema type 'co' is unknown.
- The FROM clause has 'IndividualDocument id JOIN FETCH id.company' and 'co LEFT JOIN FETCH
id.documentType' that are not separated by a comma.
- An identification variable must be provider for a range variable declaration.

Multiple annotations found at this line:
- The abstract schema type 'dt' is unknown.
- The FROM clause has 'co LEFT JOIN FETCH id.documentType' and 'dt ' that are not separated by a
comma.
- An identification variable must be provider for a range variable declaration.

Multiple annotations found at this line:
- The identification variable 'dt' is not defined in the FROM clause.
- The IN expression does not have a valid state field path expression or TYPE expession.
- The left parenthesis is missing from the IN expression.

The above query is just an example. The file is full of validation errors:

index.php/fa/11021/0/

Everything is working fine with Hibernate as JPA provider, so I assume this one and other queries to be correct. There are no problems with the mappings (code is generated, assume this as working).

Problem is, as suggested here http://www.eclipse.org/forums/index.php/mv/msg/359515/882912/#msg_882912, that I already set all Errors/Warnings in my workspace settings to "Ignore":

index.php/fa/11022/0/

However, this doesn't do ANYTHING... I cleaned and re-built the project several times - nothing. Errors still there.

How do you *globally* turn off this whole Dali validation stuff? It would suffice to turn off all JPQL/named-queries.xml validation somewhere.

I even upgraded to the latest Indigo release some minutes ago (full reinstall). Still stuck.

Sorry for the rant, but these problems occurr much too frequently. It makes Dali one of the most annoying (not to say useless) Eclipse tools overall.

Anyway, how do you solve this? I can't do anything useful with the project as long as the errors prevail.

Thanks
Karsten

[Updated on: Sat, 04 August 2012 04:04]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:Status of how users with multiple projects should use dali/persistence.xml and <jar-file >
Next Topic:Metamodel gets regenerated on Windows/Ubuntu
Goto Forum:
  


Current Time: Tue May 21 02:02:54 EDT 2013

Powered by FUDForum. Page generated in 0.02409 seconds