Hi All,
after KARAF upgrade to 4.2.0, for our DBManager bundle, I am facing this
exception.
java.lang.IllegalStateException: Need active coordination
at
org.apache.aries.jpa.support.impl.EMSupplierImpl.get(EMSupplierImpl.java:81)
~[?:?]
at
org.apache.aries.jpa.support.osgi.impl.EmProxy.invoke(EmProxy.java:38)
~[?:?]
at com.sun.proxy.$Proxy62.createQuery(Unknown Source) ~[?:?]
at Proxy8d7fb7c9_9f56_4f0b_b369_f8f7bec85215.createQuery(Unknown Source)
~[?:?]
at
com.good.server.docs.managerdb.actors.DataStoreConfigurationImpl.fetch(DataStoreConfigurationImpl.java:39)
~[289:com.good.server.docs:1.5.3.SNAPSHOT]
Earlier with KARAF 3.0.0, Our bluePrint.xml file was like this (injecting
entity manager)
<blueprint default-activation="eager"
xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jpa="http://aries.apache.org/xmlns/jpa/v1.0.0"
xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.0.0">
<bean id="dataStoreConfiguration"
class="com.good.server.docs.managerdb.actors.DataStoreConfigurationImpl">
<jpa:context unitname="DataStoreRecord" property="entityManager"/>
<tx:transaction method="*" value="Required"/>
</bean>
</blueprint>
)
After ugprade, I realised that nameSpaceHandler version (1.0.0) of JPA is no
more supported and i changed the versions. based on some old posts here in
forums, I removed <Jpa:context> and <tx:transaction> tags and changed it to
<jpa:enable /> and <tx:enable /> and kept is outside the bean definitions.
now my blueprint looks like this.
<blueprint default-activation="eager"
xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:jpa="http://aries.apache.org/xmlns/jpa/v2.0.0"
xmlns:tx="http://aries.apache.org/xmlns/transactions/v2.0.0"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0">
<jpa:enable />
<tx:enable />
</blueprint>
now my bundles are coming up, but during transaction it throws the exception
as mentioned above.
Can you please suggest something to unblock me?
Regards
Munish
--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html