We are trying to use openJPA fo rpersistence along with Spring . We ran into coupel of issues with SessionInfo, WorkItemInfo classes and a query in JBPorm.xml file.
We had to change the Id generation for the above 2 classes into Sequence as below
strategy = GenerationType.SEQUENCE, generator="sessionInfoIdSeq"...It was originally havifn AUTO but with geenrator as sessionInfoIdSeq...which prevented htese classes from enhanced.
Also once cross these problems, I ran into a query defined in JBPOrm.xml with ":" in it which is not suitable for JPA and also a field eventype reference which it complains that not found .So I had to include a orm.xml in my classpath and override the query as below.
<named-native-query name="ProcessInstancesWaitingForEvent" result-set-mapping="ProcessInstancesWaitingForEvent.mapping">
<query>
select distinct
p.InstanceId
from
ProcessInstanceInfo p
join
EventTypes e on p.InstanceId=e.InstanceId
</query>
</named-native-query>
Did anybody come across similar problems.Are my solutions right?
Also finally I am running into a problem if I include the plugin in my pom.xml to enhance, it complains as below
MetaDataFactory could not be configured (conf.newMetaDataFactoryInstance(
) returned null). This might mean that no configuration properties were found. E
nsure that you have a META-INF/persistence.xml file, that it is available in you
r classpath, or that the properties file you are using for configuration is avai
lable. If you are using Ant, please see the <properties> or <propertiesFile> att
ributes of the task's nested <config> element. This can also occur if your OpenJ
PA distribution jars are corrupt, or if your security policy is overly strict.
Any help will be appreciated.