Ludo,
I have the same problem n Tomee 7.1
In my case the EAR contains persistence.xml in EAR/META-INF
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0"
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">
<persistence-unit name="cmp" transaction-type="JTA">
<description></description>
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<jta-data-source>TWConnectionPool</jta-data-source>
<mapping-file>META-INF/openejb-cmp-generated-orm.xml</mapping-file>'
<validation-mode>AUTO</validation-mode>
<properties>
<property name="hibernate.dialect"
value="org.hibernate.dialect.Oracle10gDialect" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.format_sql" value="true" />
<property name="openjpa.Log" value="DefaultLevel=TRACE" />
</properties>
</persistence-unit>
</persistence>
and the EAR/META-INF/openejb-cmp-generated-orm.xml as follow
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
orm_1_0.xsd"
version="1.0">
<entity
class="openejb.com.toolwire.training.account.ejb.entity.account.Account"
name="Account">
<description>account#Account</description>
<named-query name="Account.findByLoginName(java.lang.String)">
<query>SELECT OBJECT(e) FROM Account e WHERE e.loginName =
?1</query>
</named-query>
<named-query name="Account.findByCustomerId(java.lang.Long)">
<query>SELECT OBJECT(e) FROM Account e WHERE e.customerId =
?1</query>
</named-query>
<attributes>
<id name="accountId" access="PROPERTY">
<column>account_id</column>
</id>
<basic name="lvContractId" access="PROPERTY">
<column>lv_contract_id</column>
</basic>
<basic name="lastName" access="PROPERTY">
<column name="last_name"/>
</basic>
<basic name="firstName" access="PROPERTY">
<column name="first_name"/>
</basic>
<basic name="emailWork" access="PROPERTY">
<column name="email_work"/>
</basic>
<basic name="passwdHint" access="PROPERTY">
<column name="passwd_hint"/>
</basic>
<basic name="passwd" access="PROPERTY"/>
<basic name="loginName" access="PROPERTY">
<column name="login_name"/>
</basic>
<basic name="customerId" access="PROPERTY">
<column name="customer_id"/>
</basic>
</attributes>
</entity>
</entity-mappings>
At runtime, the JPA is failing to map the fields of the CMP bean to the
column as defined by the persistence.xml
197110 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.Runtime -
Found datasource1: datasource 120478350 from configuration. StoreContext:
***@40823751
197120 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Scanning directory "C:\_tomee\webapps\training" for persistent types.
197332 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Scanning resource "META-INF/openejb-cmp-generated-orm.xml" for persistent
types.
197333 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData - The
persistent unit root url is "file:/C:/_tomee/webapps/training/"
197339 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData - The
resource url is
"jar:file:/C:/_tomee/tmp/OpenEJBGenerated.5086304005382265880.jar!/META-INF/openejb-cmp-generated-orm.xml"
197342 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Mapping file name is "META-INF/openejb-cmp-generated-orm.xml"
197347 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Mapping file name is "META-INF/openejb-cmp-generated-orm.xml"
197350 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Scan of "META-INF/openejb-cmp-generated-orm.xml" found persistent types
[openejb.com.toolwire.training.account.ejb.entity.account.Account,
openejb.com.toolwire.training.contract.ejb.entity.contract.Contract,
openejb.com.toolwire.training.customer.ejb.entity.customer.Customer].
197351 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Mapping resource location
"jar:file:/C:/_tomee/tmp/OpenEJBGenerated.5086304005382265880.jar!/META-INF/openejb-cmp-generated-orm.xml"
to persistent types
"[openejb.com.toolwire.training.account.ejb.entity.account.Account,
openejb.com.toolwire.training.contract.ejb.entity.contract.Contract,
openejb.com.toolwire.training.customer.ejb.entity.customer.Customer]".
197357 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Scan of "META-INF/openejb-cmp-generated-orm.xml" found persistent types
[openejb.com.toolwire.training.account.ejb.entity.account.Account,
openejb.com.toolwire.training.contract.ejb.entity.contract.Contract,
openejb.com.toolwire.training.customer.ejb.entity.customer.Customer].
197358 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Mapping resource location
"jar:file:/C:/_tomee/tmp/OpenEJBGenerated.5086304005382265880.jar!/META-INF/openejb-cmp-generated-orm.xml"
to persistent types
"[openejb.com.toolwire.training.account.ejb.entity.account.Account,
openejb.com.toolwire.training.contract.ejb.entity.contract.Contract,
openejb.com.toolwire.training.customer.ejb.entity.customer.Customer]".
197360 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Scanning resource "META-INF/openejb-cmp-generated-orm.xml" for persistent
types.
197361 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData - The
persistent unit root url is "file:/C:/_tomee/webapps/training/"
197368 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData - The
resource url is
"jar:file:/C:/_tomee/tmp/OpenEJBGenerated.5086304005382265880.jar!/META-INF/openejb-cmp-generated-orm.xml"
197369 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Mapping file name is "META-INF/openejb-cmp-generated-orm.xml"
197372 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Mapping file name is "META-INF/openejb-cmp-generated-orm.xml"
197378 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Scan of "META-INF/openejb-cmp-generated-orm.xml" found persistent types
[openejb.com.toolwire.training.account.ejb.entity.account.Account,
openejb.com.toolwire.training.contract.ejb.entity.contract.Contract,
openejb.com.toolwire.training.customer.ejb.entity.customer.Customer].
197382 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Mapping resource location
"jar:file:/C:/_tomee/tmp/OpenEJBGenerated.5086304005382265880.jar!/META-INF/openejb-cmp-generated-orm.xml"
to persistent types
"[openejb.com.toolwire.training.account.ejb.entity.account.Account,
openejb.com.toolwire.training.contract.ejb.entity.contract.Contract,
openejb.com.toolwire.training.customer.ejb.entity.customer.Customer]".
197393 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Scan of "META-INF/openejb-cmp-generated-orm.xml" found persistent types
[openejb.com.toolwire.training.account.ejb.entity.account.Account,
openejb.com.toolwire.training.contract.ejb.entity.contract.Contract,
openejb.com.toolwire.training.customer.ejb.entity.customer.Customer].
197394 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Mapping resource location
"jar:file:/C:/_tomee/tmp/OpenEJBGenerated.5086304005382265880.jar!/META-INF/openejb-cmp-generated-orm.xml"
to persistent types
"[openejb.com.toolwire.training.account.ejb.entity.account.Account,
openejb.com.toolwire.training.contract.ejb.entity.contract.Contract,
openejb.com.toolwire.training.customer.ejb.entity.customer.Customer]".
197400 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Scanning resource "META-INF/orm.xml" for persistent types.
197402 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData - The
persistent unit root url is "file:/C:/_tomee/webapps/training/"
197407 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
parsePersistentTypeNames() found
[openejb.com.toolwire.training.customer.ejb.entity.customer.Customer,
openejb.com.toolwire.training.account.ejb.entity.account.Account,
openejb.com.toolwire.training.contract.ejb.entity.contract.Contract].
197409 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Found 3 classes with metadata in 289 milliseconds.
197425 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.Runtime -
***@4f053071 created
EntityManager ***@40823751.
197432 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Loading metadata for "class
openejb.com.toolwire.training.customer.ejb.entity.customer.Customer" under
mode "[META][QUERY]".
197458 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Parsing resource
"jar:file:/C:/_tomee/tmp/OpenEJBGenerated.5086304005382265880.jar!/META-INF/openejb-cmp-generated-orm.xml".
197461 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Overriding thread context classloader from
"***@6b31f684" to "***@4dcbadb4".
197478 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Parsing class
"openejb.com.toolwire.training.account.ejb.entity.account.Account".
197492 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.Runtime -
Access style for
"openejb.com.toolwire.training.account.ejb.entity.account.Account" can not
be determined. The default "implicit field access" will be used. If this
access style is not correct, specify the correct style explicitly on the
persistent type or within the mapping file.
197493 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Generating default metadata for type
"openejb.com.toolwire.training.account.ejb.entity.account.Account".
197506 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Parsing class
"openejb.com.toolwire.training.account.ejb.entity.account.Account".
197507 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Parsing package
"openejb.com.toolwire.training.account.ejb.entity.account.Account".
197510 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Parsing query "Account.findByLoginName(java.lang.String)".
197513 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Parsing query "Account.findByCustomerId(java.lang.Long)".
197514 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Parsing class
"openejb.com.toolwire.training.contract.ejb.entity.contract.Contract".
197516 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.Runtime -
Access style for
"openejb.com.toolwire.training.contract.ejb.entity.contract.Contract" can
not be determined. The default "implicit field access" will be used. If
this access style is not correct, specify the correct style explicitly on
the persistent type or within the mapping file.
197520 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Generating default metadata for type
"openejb.com.toolwire.training.contract.ejb.entity.contract.Contract".
197526 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Parsing class
"openejb.com.toolwire.training.contract.ejb.entity.contract.Contract".
197528 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Parsing package
"openejb.com.toolwire.training.contract.ejb.entity.contract.Contract".
197531 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Parsing query "Contract.findByCustomerId(java.lang.Long)".
197533 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Parsing class
"openejb.com.toolwire.training.customer.ejb.entity.customer.Customer".
197540 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.Runtime -
Access style for
"openejb.com.toolwire.training.customer.ejb.entity.customer.Customer" can
not be determined. The default "implicit field access" will be used. If
this access style is not correct, specify the correct style explicitly on
the persistent type or within the mapping file.
197542 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Generating default metadata for type
"openejb.com.toolwire.training.customer.ejb.entity.customer.Customer".
197548 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Parsing class
"openejb.com.toolwire.training.customer.ejb.entity.customer.Customer".
197550 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Parsing package
"openejb.com.toolwire.training.customer.ejb.entity.customer.Customer".
197557 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Parsing query "Customer.findAll".
197558 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Finished parsing metadata resource
"jar:file:/C:/_tomee/tmp/OpenEJBGenerated.5086304005382265880.jar!/META-INF/openejb-cmp-generated-orm.xml".
197559 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Restoring thread context classloader from "***@4dcbadb4"
to "***@6b31f684".
197563 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData - Set
persistence-capable superclass of
"openejb.com.toolwire.training.customer.ejb.entity.customer.Customer" to
"null".
197569 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving metadata for
"***@615703274".
197570 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@615703274.confExit".
197576 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@615703274.customerId".
197577 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@615703274.customerName".
197579 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@615703274.customerShortName".
197582 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@615703274.qtreeMode".
197588 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Preparing mapping for
"openejb.com.toolwire.training.customer.ejb.entity.customer.Customer".
197589 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Processing registered persistence-capable class "class
openejb.com.toolwire.training.contract.ejb.entity.contract.Contract".
197590 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Processing registered persistence-capable class "class
openejb.com.toolwire.training.account.ejb.entity.account.Account".
197592 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Processing registered persistence-capable class "class
openejb.com.toolwire.training.customer.ejb.entity.customer.Customer".
197601 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@615703274.customerId".
197610 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"customerId" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
197611 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@615703274.confExit".
197618 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"confExit" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
197619 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@615703274.customerName".
197625 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"customerName" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
197626 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@615703274.customerShortName".
197627 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"customerShortName" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
197629 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@615703274.qtreeMode".
197632 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"qtreeMode" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
197638 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"openejb.com.toolwire.training.customer.ejb.entity.customer.Customer<discriminator>"
has mapping strategy "none".
197641 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"openejb.com.toolwire.training.customer.ejb.entity.customer.Customer<version>"
has mapping strategy "none".
197642 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving mapping for
"***@615703274".
197647 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"openejb.com.toolwire.training.customer.ejb.entity.customer.Customer" has
mapping strategy "full".
197652 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Initializing mapping for
"***@615703274".
197657 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@615703274.confExit".
197660 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@615703274.customerId".
197668 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@615703274.customerName".
197671 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@615703274.customerShortName".
197675 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@615703274.qtreeMode".
197680 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData - Set
persistence-capable superclass of
"openejb.com.toolwire.training.account.ejb.entity.account.Account" to
"null".
197683 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving metadata for
"***@495302153".
197688 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.accountId".
197693 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.customerId".
197702 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.emailWork".
197708 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.firstName".
197714 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.lastName".
197718 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.loginName".
197727 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.lvContractId".
197730 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.passwd".
197735 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.passwdHint".
197740 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Preparing mapping for
"openejb.com.toolwire.training.account.ejb.entity.account.Account".
197743 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.accountId".
197747 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"accountId" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
197754 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.customerId".
197759 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"customerId" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
197764 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.emailWork".
197767 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"emailWork" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
197775 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.firstName".
197784 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"firstName" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
197794 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.lastName".
197799 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"lastName" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
197805 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.loginName".
197810 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"loginName" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
197812 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.lvContractId".
197817 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"lvContractId" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
197822 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.passwd".
197826 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"passwd" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
197834 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.passwdHint".
197840 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"passwdHint" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
197845 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"openejb.com.toolwire.training.account.ejb.entity.account.Account<discriminator>"
has mapping strategy "none".
197850 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"openejb.com.toolwire.training.account.ejb.entity.account.Account<version>"
has mapping strategy "none".
197855 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving mapping for
"***@495302153".
197859 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"openejb.com.toolwire.training.account.ejb.entity.account.Account" has
mapping strategy "full".
197862 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Initializing mapping for
"***@495302153".
197869 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.accountId".
197873 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.customerId".
197878 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.emailWork".
197880 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.firstName".
197891 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.lastName".
197896 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.loginName".
197902 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.lvContractId".
197904 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.passwd".
197907 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@495302153.passwdHint".
197915 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData - Set
persistence-capable superclass of
"openejb.com.toolwire.training.contract.ejb.entity.contract.Contract" to
"null".
197918 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving metadata for
"***@1735776250".
197925 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.conference".
197928 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.contractId".
197936 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.contractName".
197940 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.customerId".
197946 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.description".
197950 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.maxDaysClosed".
197954 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.maxDaysSuspended".
197959 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.nDays".
197962 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.os".
197969 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.product".
197972 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.status".
197981 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Preparing mapping for
"openejb.com.toolwire.training.contract.ejb.entity.contract.Contract".
197988 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.contractId".
197998 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"contractId" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
198007 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.conference".
198014 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"conference" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
198017 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.contractName".
198024 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"contractName" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
198026 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.customerId".
198031 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"customerId" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
198040 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.description".
198047 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"description" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
198051 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.maxDaysClosed".
198060 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"maxDaysClosed" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.PrimitiveFieldStrategy".
198063 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.maxDaysSuspended".
198068 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"maxDaysSuspended" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.PrimitiveFieldStrategy".
198078 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.nDays".
198085 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"nDays" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.PrimitiveFieldStrategy".
198092 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.os".
198095 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"os" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
198100 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.product".
198104 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"product" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
198106 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.status".
198108 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"status" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
198110 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"openejb.com.toolwire.training.contract.ejb.entity.contract.Contract<discriminator>"
has mapping strategy "none".
198115 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"openejb.com.toolwire.training.contract.ejb.entity.contract.Contract<version>"
has mapping strategy "none".
198118 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving mapping for
"***@1735776250".
198120 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
"openejb.com.toolwire.training.contract.ejb.entity.contract.Contract" has
mapping strategy "full".
198125 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Initializing mapping for
"***@1735776250".
198127 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.conference".
198129 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.contractId".
198135 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.contractName".
198137 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.customerId".
198139 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.description".
198144 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.maxDaysClosed".
198146 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.maxDaysSuspended".
198148 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.nDays".
198151 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.os".
198156 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.product".
198158 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Resolving field
"***@1735776250.status".
198223 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Parsing class "java.lang.String".
198238 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.Runtime -
Query "SELECT OBJECT(e) FROM Account e WHERE e.loginName = ?1" is cached."
198239 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.Query -
Executing query: [SELECT OBJECT(e) FROM Account e WHERE e.loginName = ?1]
with parameters: ?
198277 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.jdbc.SQL - <t
2082483929, conn 634155632> executing prepstmnt 134639762 SELECT
t0.accountId, t0.customerId, t0.emailWork, t0.firstName, t0.lastName,
t0.loginName, t0.lvContractId, t0.passwd, t0.passwdHint FROM Account t0
WHERE (t0.loginName = ?) [params=?]
09-Oct-2018 20:56:47.205 INFO [http-nio2-127.0.0.1-8080-exec-7]
org.apache.openejb.resource.jdbc.logging.LoggingPreparedSqlStatement.invoke
SELECT t0.accountId, t0.customerId, t0.emailWork, t0.firstName, t0.lastName,
t0.loginName, t0.lvContractId, t0.passwd, t0.passwdHint FROM Account t0
WHERE (t0.loginName = sadasdasdasd) --> 44ms - FAILED
I can see in the log (setting the log level to verose) that it did not
substitute the ccolumn names in the query
Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-00942:
table or view does not exist
{prepstmnt 134639762 SELECT t0.accountId, t0.customerId, t0.emailWork,
t0.firstName, t0.lastName, t0.loginName, t0.lvContractId, t0.passwd,
t0.passwdHint FROM Account t0 WHERE (t0.loginName = ?) [params=?]}
[code=942, state=42000]
at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:218)
at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:202)
at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$700(LoggingConnectionDecorator.java:58)
at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeQuery(LoggingConnectionDecorator.java:1117)
at
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:268)
at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeQuery(JDBCStoreManager.java:1800)
at
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:258)
at
org.apache.openjpa.jdbc.sql.SelectImpl.executeQuery(SelectImpl.java:500)
at
org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:425)
at
org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:392)
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:93)
at
org.apache.openjpa.lib.rop.EagerResultList.<init>(EagerResultList.java:33)
... 120 more
Any one has insights on this issue? I am running ot of ideas.
It seems that no mater what orm file is set for my EAR, JPA always generates
and loads it';s own
197558 cmp TRACE [http-nio2-127.0.0.1-8080-exec-7] openjpa.MetaData -
Finished parsing metadata resource
"jar:file:/C:/_tomee/tmp/OpenEJBGenerated.5086304005382265880.jar!/META-INF/openejb-cmp-generated-orm.xml".
Such generation always ignores the EAR's orm XML
Maybe it's a bug
Hugo
--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html