-
1. Re: OpenJPA-2.2.0 on JBossAS-7.1.0.Final
struberg Jun 19, 2012 4:17 AM (in response to struberg)PS: the log4j dependency is optional. The logger which gets used can be configured in your persistence.xml via the openjpa.Log property:
http://openjpa.apache.org/builds/latest/docs/docbook/manual/ref_guide_conf_openjpa.html#openjpa.Log
-
-
3. Re: OpenJPA-2.2.0 on JBossAS-7.1.0.Final
ilgrosso77 Jul 11, 2012 8:25 AM (in response to struberg)Interesting option!
However, I've found these issues so far:
- 'modules.xml' should instead be 'module.xml' [SOLVED]
- I had to add serp-1.13.1.jar to the directory and to the module.xml file [SOLVED]
- whatever JPA query my application performs, I get
org.apache.openjpa.persistence.ArgumentException: An error occurred while parsing the query filter "SELECT e FROM ExternalResource e". Error message: The name "ExternalResource" is not a recognized entity or identifier. Perhaps you meant ExternalResource, which is a close match. Known entity names: [ExternalResource, AbstractSchema, RAttrUniqueValue, AbstractVirAttr, Membership, TaskExec, SyncopeConf, Report, RAttr, AbstractExec, SyncopeLogger, USchema, MAttr, PasswordPolicy, RSchema, MSchema, MAttrValue, MAttrUniqueValue, AbstractAttr, AbstractDerSchema, AbstractVirSchema, UAttr, AccountPolicy, RAttrValue, UAttrValue, ReportExec, SyncopeUser, Notification, ConnInstance, AbstractDerAttr, AbstractAttrValue, SyncopeRole, SyncPolicy, Policy, ReportletConfInstance, Task, UAttrUniqueValue, Entitlement, SchemaMapping, UserRequest]
I've taken a look at JPQLExpressionBuilder.getClassMetaData() and it seems to me that the problem might lie in some hidden Classloader thing: any hint?
-
4. Re: OpenJPA-2.2.0 on JBossAS-7.1.0.Final
struberg Jul 11, 2012 8:50 AM (in response to ilgrosso77)Hi Francesco!
I've only tested it with resource-local (Persistence.createEntityManagerFactory().createEntityManager()...) but that worked fine!
Please note that OpenJPA needs all entities as <class> entries in the persistence.xml file.
-
5. Re: OpenJPA-2.2.0 on JBossAS-7.1.0.Final
ilgrosso77 Jul 11, 2012 8:56 AM (in response to struberg)Hi Mark,
I am actually trying to deploy Apache Syncope on JBoss AS 7.1 without Hibernate support: this means that I am actually using a Spring-injected EntityManager and persistence.xml.
Additionally, the entity classes are actually recognized by OpenJPA: the exception stacktrace above says:
Known entity names: [AbstractSchema, ExternalResource, RAttrUniqueValue, Membership, TaskExec, SyncopeConf, Report, RAttr, AbstractExec, SyncopeLogger, USchema, PasswordPolicy, MAttr, RSchema, MSchema, MAttrValue, MAttrUniqueValue, AbstractAttr, AbstractDerSchema, UAttr, AccountPolicy, RAttrValue, ReportExec, UAttrValue, SyncopeUser, ConnInstance, AbstractDerAttr, AbstractAttrValue, SyncopeRole, SyncPolicy, Policy, ReportletConfInstance, Task, UAttrUniqueValue, Entitlement, SchemaMapping]
I feel a bit surprised by
Error message: The name "ExternalResource" is not a recognized entity or identifier. Perhaps you meant ExternalResource, which is a close match.
-
6. Re: OpenJPA-2.2.0 on JBossAS-7.1.0.Final
ilgrosso77 Jul 12, 2012 10:29 AM (in response to ilgrosso77)I've managed to fix this issue (and provided a patch to the OpenJPA project) - hope the guys there will apply it soon!
However, I was able to do everything without the need of defining an OpenJPA module: just bundled JARs in my webapp and everything worked fine.