can't define named-query in configuration orm.xml
-------------------------------------------------
Key: OPENJPA-1042
URL: https://issues.apache.org/jira/browse/OPENJPA-1042
Project: OpenJPA
Issue Type: Bug
Affects Versions: 1.2.1
Reporter: Giovanni Azua
Having a orm.xml define like (see the two named-query):
http://perfectjpattern.svn.sourceforge.net/viewvc/perfectjpattern/trunk/perfectjpattern-jee/src/test/resources/META-INF/orm.xml?view=markup
and a test case like "testFindByNamedQueryPositional"
"testFindByNamedQueryNamed":
http://perfectjpattern.svn.sourceforge.net/viewvc/perfectjpattern/trunk/perfectjpattern-jee/src/test/java/org/perfectjpattern/jee/integration/dao/TestJpaBaseReadOnlyDao.java?view=markup
I get the following exception stack:
110 default INFO [main] openjpa.Runtime - Starting OpenJPA 1.2.1
297 default INFO [main] openjpa.jdbc.JDBC - Using dictionary class
"org.apache.openjpa.jdbc.sql.HSQLDictionary".
org.perfectjpattern.jee.api.integration.dao.DaoException:
<openjpa-1.2.1-r752877:753278 nonfatal general error>
org.apache.openjpa.persistence.PersistenceException: org.xml.sax.SAXException:
file:/D:/code/perfectjpattern/perfectjpattern-jee/target/test-classes/META-INF/orm.xml
[Location: Line: 23, C: 44]: org.xml.sax.SAXParseException:
cvc-complex-type.2.4.a: Invalid content was found starting with element
'named-query'. One of '{"http://java.sun.com/xml/ns/persistence/orm":entity,
"http://java.sun.com/xml/ns/persistence/orm":embeddable}' is expected.
I double checked in the JPA orm.xml documentation and seems there is nothing
wrong with defining the named-queries there ... in fact MyEclipse autocompleter
sees the named-query entry as correct, only when running the test cases that
use OpenJPA brings this issue
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.