RE: Strange OpenJPA and BP problem

2011-11-16 Thread Timothy Ward

Hi Matt,

No fix, or proposed fix, yet. You should feel free to have a look. Also you 
could avoid packaging your entities separately from your persistence.xml. The 
JPA service specification states pretty clearly that packaging entities and 
persistence.xml in this way is not supported. If you avoid the packaging split 
then you will never hit this problem.

Regards

Tim Ward
---
Apache Aries PMC member  Enterprise OSGi advocate
Enterprise OSGi in Action (http://www.manning.com/cummins)
---


Date: Tue, 15 Nov 2011 14:34:23 -0600
Subject: Re: Strange OpenJPA and BP problem
From: mattmadha...@gmail.com
To: user@aries.apache.org

Hi Tim.Yes I ran to ARIES-765!
I do have my entities and presistence.xml in two different bundles.
After installing the persistence bundle and doing a reffresh in command line 
does seem to work!

Any fixes for ARIES-765 yet?
ThanksMatt

On Tue, Nov 15, 2011 at 1:05 PM, Matt Madhavan mattmadha...@gmail.com wrote:

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 timothyjw...@apache.org 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: mattmadha...@gmail.com
To: user@aries.apache.org

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.IllegalStateExceptionat 
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 

CXF DOSGI and transactions

2011-11-16 Thread De Backer Frederik (DBB)
Hello,

I have installed the latest single bundle release of CXF DOSGI. I have
played around a bit with it and it works ok to remotely expose a service
(see blueprint definition below). However, when I add a transaction
attribute on the bean definition (in comment below), the service is not
exposed anymore. The purpose is not to do transaction propagation from
client to service but just to start a transaction when the service
method is invoked.

service interface=dexia.osgipoc.sedm3.service.BankService
ref=bankServiceBean
service-properties
entry key=service.exported.interfaces
value=* /
entry key=service.exported.configs
value=org.apache.cxf.ws /
entry key=org.apache.cxf.ws.address
value=http://localhost:9090/bankservice; /
/service-properties
/service

bean id=bankServiceBean
class=dexia.osgipoc.sedm3.service.BankServiceImpl
activation=lazy
!-- tx:transaction method=* value=Required /--
property name=actorService ref=actorServiceRef /
property name=accountService ref=accountServiceRef
/
/bean

In the console log I see (NULL for EndpointDescription):

16-nov-2011 10:41:09
org.apache.cxf.dosgi.topologymanager.TopologyManager$2 run
INFO: TopologyManager: export sucessful Endpoints:[Endpoint Desctiption
for Serv
iceReference
{dexia.osgipoc.sedm3.service.BankService}={osgi.service.blueprint.c
ompname=bankServiceBean,
org.apache.cxf.ws.address=http://localhost:9090/bankser
vice, service.exported.interfaces=*,
service.exported.configs=org.apache.cxf.ws,
 service.id=107}
*** EndpointDescription: 
--- NULL 

*** Exception: null 
*** isClosed : false 

]

While in the case that it works correctly, I see:

INFO: TopologyManager: export sucessful Endpoints:[Endpoint Desctiption
for Serv
iceReference
{dexia.osgipoc.sedm3.service.BankService}={osgi.service.blueprint.c
ompname=bankServiceBean,
org.apache.cxf.ws.address=http://localhost:9090/bankser
vice, service.exported.interfaces=*,
service.exported.configs=org.apache.cxf.ws,
 service.id=111}
*** EndpointDescription: 
endpoint.framework.uuid  = c39d5ef1-ca55-4141-9901-d976b0e59ed1
endpoint.id  = http://localhost:9090/bankservice
endpoint.package.version.dexia.osgipoc.sedm3.service  = 0.0.1.SNAPSHOT
endpoint.service.id  = 111
objectClass  = [Ljava.lang.String;@c67f69
org.apache.cxf.ws.address  = http://localhost:9090/bankservice
osgi.service.blueprint.compname  = bankServiceBean
service.imported  = true
service.imported.configs  = [Ljava.lang.String;@1d6e4a4
service.intents  = [Ljava.lang.String;@13ceab3

*** Exception: null 
*** isClosed : false 

]

Thx a lot for the support,

Frederik.

-
Dexia disclaimer:

http://www.dexia.com/maildisclaimer.htm
-