Hi Tim,
I'm running this in KARAF. Everything seems to deploy and all the bundles
are active with all the services on.

Any idea please? Whats the work around for  ARIES-765 ?

Thanks in advance!

Matt


On Tue, Nov 15, 2011 at 3:04 AM, Timothy Ward <[email protected]>wrote:

>  Hi Matt,
>
> Without more context it is very difficult to debug remotely - did anything
> get redeployed? It looks like you've hit ARIES-765 to me.
>
> Regards
>
> Tim Ward
> -------------------
> Apache Aries PMC member & Enterprise OSGi advocate
> Enterprise OSGi in Action (http://www.manning.com/cummins)
> -------------------
>
>
> ------------------------------
> Date: Mon, 14 Nov 2011 18:20:40 -0600
> Subject: Strange OpenJPA and BP problem
> From: [email protected]
> To: [email protected]
>
>
> Hello,
> I have configured an in-memory Derby data source with open jpa and Aries
> blueprint.
>
> When ever I invoke a a query i'm getting the following InvalidState
> exception! Not getting much info at all! Any ideas please?
>
> <openjpa-2.1.0-r422266:1071316 nonfatal user error>
> org.apache.openjpa.persistence.InvalidStateException: The factory has been
> closed.  The stack trace at which
>  the factory was closed is held in the embedded exception.
>         at
> org.apache.openjpa.kernel.AbstractBrokerFactory.assertOpen(AbstractBrokerFactory.java:676)
>         at
> org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:192)
>         at
> org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156)
>         at
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227)
>         at
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60)
>         at
> org.apache.aries.jpa.container.impl.CountingEntityManagerFactory.createEntityManager(CountingEntityManagerFactory.java:70)
>         at
> org.apache.aries.jpa.container.context.transaction.impl.JTAEntityManager.getPersistenceContext(JTAEntityManager.java:92)
>         at
> org.apache.aries.jpa.container.context.transaction.impl.JTAEntityManager.createNamedQuery(JTAEntityManager.java:310)
>         at
> com.hcsc.ccsp.foundation.core.activeclaims.impl.ReferenceTablesDaoImpl.findAllClmProcExcepRef(ReferenceTablesDaoImpl.java:55)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at
> org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:50)
>         at
> org.apache.aries.blueprint.proxy.Collaborator.invoke(Collaborator.java:91)
>         at
> org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:78)
>         at
> com.hcsc.ccsp.foundation.core.activeclaims.impl.$ReferenceTablesDaoImpl30102981.findAllClmProcExcepRef(Unknown
> Source)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
> .......
>
> Caused by: java.lang.IllegalStateException
>         at
> org.apache.openjpa.kernel.AbstractBrokerFactory.close(AbstractBrokerFactory.java:406)
>         at
> org.apache.openjpa.kernel.DelegatingBrokerFactory.close(DelegatingBrokerFactory.java:197)
>         at
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.close(EntityManagerFactoryImpl.java:275)
>         at
> org.apache.aries.jpa.container.impl.CountingEntityManagerFactory.close(CountingEntityManagerFactory.java:60)
>         at
> org.apache.aries.jpa.container.impl.EntityManagerFactoryManager.destroyEntityManagerFactories(EntityManagerFactoryManager.java:328)
>         at
> org.apache.aries.jpa.container.impl.EntityManagerFactoryManager.bundleStateChange(EntityManagerFactoryManager.java:169)
>         at
> org.apache.aries.jpa.container.impl.PersistenceBundleManager.modifiedBundle(PersistenceBundleManager.java:283)
>         at
> org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:453)
>         at
> org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:237)
>         at
> org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:413)
>         at
> org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:807)
>         at
> org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:729)
>         at
> org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:610)
>         at
> org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3761)
>         at org.apache.felix.framework.Felix.updateBundle(Felix.java:2044)
>         at
> org.apache.felix.framework.BundleImpl.update(BundleImpl.java:936)
>         at
> org.apache.karaf.shell.dev.watch.BundleWatcher.run(BundleWatcher.java:107)
>
> Any ideas please?
>
> My datasource looks like this!
>
> <?xml version="1.0" encoding="UTF-8"?>
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> default-activation="lazy">
>
>
>
> <bean id="derbyXADataSource"
> class="org.apache.derby.jdbc.EmbeddedXADataSource">
>  <property name="databaseName" value="memory:CTS" />
> <property name="createDatabase" value="create" />
>  </bean>
>
> <service id="xaDataSource" ref="derbyXADataSource"
> interface="javax.sql.XADataSource">
>  <service-properties>
> <*entry key="osgi.jndi.service.name" value="jdbc/cts-transaction01" */>
>  </service-properties>
> </service>
>
> <bean id="derbyDataSource"
> class="org.apache.derby.jdbc.EmbeddedDataSource">
>  <property name="databaseName" value="memory:CTS" />
>   <property name="createDatabase" value="create" />
>  </bean>
>
> <service ref="derbyDataSource" interface="javax.sql.DataSource">
>  <service-properties>
> <entry key="osgi.jndi.service.name" value="jdbc/cts-transaction01-nojta"
> />
>  </service-properties>
> </service>
>   </blueprint>
>
> *My persistence.xml looks like:*
> <persistence-unit name="*common.om.activeclaims"* transaction-type="JTA">
>  <description>Persistence unit for pend error model</description>
> <provider>
>  org.apache.openjpa.persistence.PersistenceProviderImpl
> </provider>
>
> <jta-data-source>osgi:service/javax.sql.DataSource/(transactional=true)</jta-data-source>
> <class>com.hcsc.ccsp.common.om.activeclaims.ActvClm</class>
>  <class>com.hcsc.ccsp.common.om.activeclaims.ActvClmProcExcep</class>
> <class>com.hcsc.ccsp.common.om.activeclaims.ActvClmProcExcepPK</class>
>        .......
>
> *My Bean def:*
>
> <bean id="claimExceptionDaoBean"
>
>  
> class="com.hcsc.ccsp.foundation.core.activeclaims.impl.ClaimExceptionDaoImpl">
>   <tx:transaction method="*" value="Required" />
>  <jpa:context property="entityManager" unitname="*common.om.activeclaims*"
> />
>  </bean>
>
>
> Any help will be appreciated. Been struck in this for a few days now.
>
> Thanks in advance!
>
> Matt
>
>
>

Reply via email to