[
https://issues.apache.org/jira/browse/TOMEE-1383?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
jieryn resolved TOMEE-1383.
---------------------------
Resolution: Invalid
> "classless" persistence.xml can not find @Entities
> --------------------------------------------------
>
> Key: TOMEE-1383
> URL: https://issues.apache.org/jira/browse/TOMEE-1383
> Project: TomEE
> Issue Type: Bug
> Reporter: jieryn
>
> Here is an example persistence.xml that ought to work:
> {code}<persistence xmlns="http://java.sun.com/xml/ns/persistence"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
> http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
> version="2.0">
> <persistence-unit name="persistenceUnit">
> <exclude-unlisted-classes>false</exclude-unlisted-classes>
> <properties>
> <property name="openjpa.jdbc.SynchronizeMappings"
> value="buildSchema(ForeignKeys=true)" />
> </properties>
> </persistence-unit>
> </persistence>
> {code}
> Will throw an exception when trying to fetch entities:
> {code}Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: user
> lacks privilege or object not found: MYOBJ {SELECT t0.id FROM MyObj t0}
> [code=-5501, state=42501]
> at
> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:219)
> at
> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:199)
> at
> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$000(LoggingConnectionDecorator.java:59)
> at
> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection.prepareStatement(LoggingConnectionDecorator.java:251)
> at
> org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:133)
> at
> org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator$ConfiguringConnection.prepareStatement(ConfiguringConnectionDecorator.java:140)
> at
> org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:133)
> at
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager$RefCountConnection.prepareStatement(JDBCStoreManager.java:1643)
> at
> org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:122)
> at
> org.apache.openjpa.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:508)
> at
> org.apache.openjpa.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:488)
> at
> org.apache.openjpa.jdbc.sql.SelectImpl.prepareStatement(SelectImpl.java:481)
> at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:422)
> at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:393)
> at
> org.apache.openjpa.jdbc.sql.LogicalUnion$UnionSelect.execute(LogicalUnion.java:427)
> at
> org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:230)
> at
> org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:220)
> at
> org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.open(SelectResultObjectProvider.java:94)
> at
> org.apache.openjpa.kernel.QueryImpl$PackingResultObjectProvider.open(QueryImpl.java:2070)
> at
> org.apache.openjpa.lib.rop.EagerResultList.<init>(EagerResultList.java:34)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)