[jira] [Commented] (ARIES-1160) Hibernate JPA: EntityManagerFactoryManager failed to create EntityManagerFactories by Bundle.RESOLVED

2014-04-14 Thread Sergey Beryozkin (JIRA)

[ 
https://issues.apache.org/jira/browse/ARIES-1160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13968280#comment-13968280
 ] 

Sergey Beryozkin commented on ARIES-1160:
-

Sure, everyone seems to be happy about it, so I'm about to apply it shortly

Cheers, Sergey

 Hibernate JPA: EntityManagerFactoryManager failed to create 
 EntityManagerFactories by Bundle.RESOLVED
 -

 Key: ARIES-1160
 URL: https://issues.apache.org/jira/browse/ARIES-1160
 Project: Aries
  Issue Type: Bug
  Components: JPA
Affects Versions: 1.0
 Environment: OSGi
Reporter: Andrei Shakirin
 Attachments: ARIES-1160-2.patch, aries-jpa-1.0.0-ARIES-1160.patch, 
 org.apache.aries.jpa.container.patch


 Use case: persistence bundle is deployed in OSGi using Hibernate persistence 
 provider. Bundle contains blueprint configuration injecting EntityManager and 
 activates transaction management:
 blueprint  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=addressDao 
 class=de.conrad.ccp.basit.customer.ecom.dao.impl.AddressDaoImpl 
   jpa:context unitname=ecom property=entityManager/
   tx:transaction method=* value=Required/
   /bean
   
   service ref=addressDao 
 interface=de.conrad.ccp.basit.entity.customer.ecom.dao.AddressDao /
   
 /blueprint
 Effect: bundle waiting for EntityManager service. The reason of problem is 
 runtime exception by 
 providerService.createContainerEntityManagerFactory(mpui.getPersistenceUnitInfo(),
  mpui.getContainerProperties()).
 Exception is unfortunately not logged by Aries. The stack trace is following:
 java.lang.IllegalStateException: The bundle 
 de.conrad.poc.customerservice-ecom/0
 .0.1.SNAPSHOT is not started.
 at 
 org.apache.aries.jpa.container.unit.impl.JndiDataSource.getDs(JndiDat
 aSource.java:61)
 at 
 org.apache.aries.jpa.container.unit.impl.DelayedLookupDataSource.getC
 onnection(DelayedLookupDataSource.java:36)
 at 
 org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.get
 Connection(InjectedDataSourceConnectionProvider.java:70)
 at 
 org.hibernate.engine.jdbc.internal.JdbcServicesImpl$ConnectionProvide
 rJdbcConnectionAccess.obtainConnection(JdbcServicesImpl.java:242)
 at 
 org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcSer
 vicesImpl.java:117)
 at 
 org.hibernate.service.internal.StandardServiceRegistryImpl.configureS
 ervice(StandardServiceRegistryImpl.java:76)
 at 
 org.hibernate.service.internal.AbstractServiceRegistryImpl.initialize
 Service(AbstractServiceRegistryImpl.java:160)
 at 
 org.hibernate.service.internal.AbstractServiceRegistryImpl.getService
 (AbstractServiceRegistryImpl.java:132)
 at 
 org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.
 java:1825)
 at 
 org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.jav
 a:1783)
 at 
 org.hibernate.ejb.EntityManagerFactoryImpl.init(EntityManagerFactor
 yImpl.java:96)
 at 
 org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Con
 figuration.java:914)
 at 
 org.hibernate.osgi.OsgiPersistenceProvider.createContainerEntityManag
 erFactory(OsgiPersistenceProvider.java:99)
 at 
 org.apache.aries.jpa.container.impl.EntityManagerFactoryManager.creat
 eEntityManagerFactories(EntityManagerFactoryManager.java:330)
 at 
 org.apache.aries.jpa.container.impl.EntityManagerFactoryManager.bundl
 eStateChange(EntityManagerFactoryManager.java:175)
 at 
 org.apache.aries.jpa.container.impl.PersistenceBundleManager.addingSe
 rvice(PersistenceBundleManager.java:197)
 The problem is that call of createEntityManagerFactories() in 
 EntityManagerFactoryManager.bundleStateChange() is made by BUNDLE.RESOLVED 
 event.
 The lookup of data source is failed, because the bundle context is not yet 
 available (call by BUNDLE.RESOLVED event). The createEntityManagerFactory is 
 called again by Bundle.ACTIVE event, the problem is that emfs hash map is 
 already created, but it is empty.
 Therefore  STARTED/ACTIVE createEntityManagerFactories() is called, but makes 
 nothing.
 Attached patch contains two changes:
 a) log runtime exception throwing by 
 providerService.createContainerEntityManagerFactory
 b) adds check to empty hash map:
 if(((emfs == null) || emfs.isEmpty())  !quiesce)
 The patch fixes the problem.
 Basically it should analyzed is call createEntityManagerFactories() really 
 necessary for Bundle.RESOLVED event. 



--
This message was sent by Atlassian JIRA

[jira] [Commented] (ARIES-1160) Hibernate JPA: EntityManagerFactoryManager failed to create EntityManagerFactories by Bundle.RESOLVED

2014-04-14 Thread Sergey Beryozkin (JIRA)

[ 
https://issues.apache.org/jira/browse/ARIES-1160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13968302#comment-13968302
 ] 

Sergey Beryozkin commented on ARIES-1160:
-

Looks like Apache SVN can not accept the commits right now...

 Hibernate JPA: EntityManagerFactoryManager failed to create 
 EntityManagerFactories by Bundle.RESOLVED
 -

 Key: ARIES-1160
 URL: https://issues.apache.org/jira/browse/ARIES-1160
 Project: Aries
  Issue Type: Bug
  Components: JPA
Affects Versions: 1.0
 Environment: OSGi
Reporter: Andrei Shakirin
 Attachments: ARIES-1160-2.patch, aries-jpa-1.0.0-ARIES-1160.patch, 
 org.apache.aries.jpa.container.patch


 Use case: persistence bundle is deployed in OSGi using Hibernate persistence 
 provider. Bundle contains blueprint configuration injecting EntityManager and 
 activates transaction management:
 blueprint  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=addressDao 
 class=de.conrad.ccp.basit.customer.ecom.dao.impl.AddressDaoImpl 
   jpa:context unitname=ecom property=entityManager/
   tx:transaction method=* value=Required/
   /bean
   
   service ref=addressDao 
 interface=de.conrad.ccp.basit.entity.customer.ecom.dao.AddressDao /
   
 /blueprint
 Effect: bundle waiting for EntityManager service. The reason of problem is 
 runtime exception by 
 providerService.createContainerEntityManagerFactory(mpui.getPersistenceUnitInfo(),
  mpui.getContainerProperties()).
 Exception is unfortunately not logged by Aries. The stack trace is following:
 java.lang.IllegalStateException: The bundle 
 de.conrad.poc.customerservice-ecom/0
 .0.1.SNAPSHOT is not started.
 at 
 org.apache.aries.jpa.container.unit.impl.JndiDataSource.getDs(JndiDat
 aSource.java:61)
 at 
 org.apache.aries.jpa.container.unit.impl.DelayedLookupDataSource.getC
 onnection(DelayedLookupDataSource.java:36)
 at 
 org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.get
 Connection(InjectedDataSourceConnectionProvider.java:70)
 at 
 org.hibernate.engine.jdbc.internal.JdbcServicesImpl$ConnectionProvide
 rJdbcConnectionAccess.obtainConnection(JdbcServicesImpl.java:242)
 at 
 org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcSer
 vicesImpl.java:117)
 at 
 org.hibernate.service.internal.StandardServiceRegistryImpl.configureS
 ervice(StandardServiceRegistryImpl.java:76)
 at 
 org.hibernate.service.internal.AbstractServiceRegistryImpl.initialize
 Service(AbstractServiceRegistryImpl.java:160)
 at 
 org.hibernate.service.internal.AbstractServiceRegistryImpl.getService
 (AbstractServiceRegistryImpl.java:132)
 at 
 org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.
 java:1825)
 at 
 org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.jav
 a:1783)
 at 
 org.hibernate.ejb.EntityManagerFactoryImpl.init(EntityManagerFactor
 yImpl.java:96)
 at 
 org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Con
 figuration.java:914)
 at 
 org.hibernate.osgi.OsgiPersistenceProvider.createContainerEntityManag
 erFactory(OsgiPersistenceProvider.java:99)
 at 
 org.apache.aries.jpa.container.impl.EntityManagerFactoryManager.creat
 eEntityManagerFactories(EntityManagerFactoryManager.java:330)
 at 
 org.apache.aries.jpa.container.impl.EntityManagerFactoryManager.bundl
 eStateChange(EntityManagerFactoryManager.java:175)
 at 
 org.apache.aries.jpa.container.impl.PersistenceBundleManager.addingSe
 rvice(PersistenceBundleManager.java:197)
 The problem is that call of createEntityManagerFactories() in 
 EntityManagerFactoryManager.bundleStateChange() is made by BUNDLE.RESOLVED 
 event.
 The lookup of data source is failed, because the bundle context is not yet 
 available (call by BUNDLE.RESOLVED event). The createEntityManagerFactory is 
 called again by Bundle.ACTIVE event, the problem is that emfs hash map is 
 already created, but it is empty.
 Therefore  STARTED/ACTIVE createEntityManagerFactories() is called, but makes 
 nothing.
 Attached patch contains two changes:
 a) log runtime exception throwing by 
 providerService.createContainerEntityManagerFactory
 b) adds check to empty hash map:
 if(((emfs == null) || emfs.isEmpty())  !quiesce)
 The patch fixes the problem.
 Basically it should analyzed is call createEntityManagerFactories() really 
 necessary for Bundle.RESOLVED event. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Resolved] (ARIES-1160) Hibernate JPA: EntityManagerFactoryManager failed to create EntityManagerFactories by Bundle.RESOLVED

2014-04-14 Thread Sergey Beryozkin (JIRA)

 [ 
https://issues.apache.org/jira/browse/ARIES-1160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Beryozkin resolved ARIES-1160.
-

   Resolution: Fixed
Fix Version/s: 1.0.1-SNAPSHOT
 Assignee: Sergey Beryozkin

Andrei, Christian, thanks for opening this JIRA and creating patches, the 
latest patch from Christian applied.
I'm marking as fixed for 1.0.1-SNAPSHOT, which seems to be the only matching 
version.

 Hibernate JPA: EntityManagerFactoryManager failed to create 
 EntityManagerFactories by Bundle.RESOLVED
 -

 Key: ARIES-1160
 URL: https://issues.apache.org/jira/browse/ARIES-1160
 Project: Aries
  Issue Type: Bug
  Components: JPA
Affects Versions: 1.0
 Environment: OSGi
Reporter: Andrei Shakirin
Assignee: Sergey Beryozkin
 Fix For: 1.0.1-SNAPSHOT

 Attachments: ARIES-1160-2.patch, aries-jpa-1.0.0-ARIES-1160.patch, 
 org.apache.aries.jpa.container.patch


 Use case: persistence bundle is deployed in OSGi using Hibernate persistence 
 provider. Bundle contains blueprint configuration injecting EntityManager and 
 activates transaction management:
 blueprint  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=addressDao 
 class=de.conrad.ccp.basit.customer.ecom.dao.impl.AddressDaoImpl 
   jpa:context unitname=ecom property=entityManager/
   tx:transaction method=* value=Required/
   /bean
   
   service ref=addressDao 
 interface=de.conrad.ccp.basit.entity.customer.ecom.dao.AddressDao /
   
 /blueprint
 Effect: bundle waiting for EntityManager service. The reason of problem is 
 runtime exception by 
 providerService.createContainerEntityManagerFactory(mpui.getPersistenceUnitInfo(),
  mpui.getContainerProperties()).
 Exception is unfortunately not logged by Aries. The stack trace is following:
 java.lang.IllegalStateException: The bundle 
 de.conrad.poc.customerservice-ecom/0
 .0.1.SNAPSHOT is not started.
 at 
 org.apache.aries.jpa.container.unit.impl.JndiDataSource.getDs(JndiDat
 aSource.java:61)
 at 
 org.apache.aries.jpa.container.unit.impl.DelayedLookupDataSource.getC
 onnection(DelayedLookupDataSource.java:36)
 at 
 org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.get
 Connection(InjectedDataSourceConnectionProvider.java:70)
 at 
 org.hibernate.engine.jdbc.internal.JdbcServicesImpl$ConnectionProvide
 rJdbcConnectionAccess.obtainConnection(JdbcServicesImpl.java:242)
 at 
 org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcSer
 vicesImpl.java:117)
 at 
 org.hibernate.service.internal.StandardServiceRegistryImpl.configureS
 ervice(StandardServiceRegistryImpl.java:76)
 at 
 org.hibernate.service.internal.AbstractServiceRegistryImpl.initialize
 Service(AbstractServiceRegistryImpl.java:160)
 at 
 org.hibernate.service.internal.AbstractServiceRegistryImpl.getService
 (AbstractServiceRegistryImpl.java:132)
 at 
 org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.
 java:1825)
 at 
 org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.jav
 a:1783)
 at 
 org.hibernate.ejb.EntityManagerFactoryImpl.init(EntityManagerFactor
 yImpl.java:96)
 at 
 org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Con
 figuration.java:914)
 at 
 org.hibernate.osgi.OsgiPersistenceProvider.createContainerEntityManag
 erFactory(OsgiPersistenceProvider.java:99)
 at 
 org.apache.aries.jpa.container.impl.EntityManagerFactoryManager.creat
 eEntityManagerFactories(EntityManagerFactoryManager.java:330)
 at 
 org.apache.aries.jpa.container.impl.EntityManagerFactoryManager.bundl
 eStateChange(EntityManagerFactoryManager.java:175)
 at 
 org.apache.aries.jpa.container.impl.PersistenceBundleManager.addingSe
 rvice(PersistenceBundleManager.java:197)
 The problem is that call of createEntityManagerFactories() in 
 EntityManagerFactoryManager.bundleStateChange() is made by BUNDLE.RESOLVED 
 event.
 The lookup of data source is failed, because the bundle context is not yet 
 available (call by BUNDLE.RESOLVED event). The createEntityManagerFactory is 
 called again by Bundle.ACTIVE event, the problem is that emfs hash map is 
 already created, but it is empty.
 Therefore  STARTED/ACTIVE createEntityManagerFactories() is called, but makes 
 nothing.
 Attached patch contains two changes:
 a) log runtime exception throwing by 
 providerService.createContainerEntityManagerFactory
 b) adds check to empty hash map:
 if(((emfs == 

Jenkins build is still unstable: Aries » Apache Aries Whiteboard support for JMX DynamicMBean services #1923

2014-04-14 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/Aries/org.apache.aries.jmx$org.apache.aries.jmx.whiteboard/1923/



Jenkins build is still unstable: Aries » Apache Aries Subsystem iTests #1923

2014-04-14 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/Aries/org.apache.aries.subsystem$org.apache.aries.subsystem.itests/1923/



Jenkins build is still unstable: Aries » Apache Aries Proxy iTests #1923

2014-04-14 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/Aries/org.apache.aries.proxy$org.apache.aries.proxy.itests/1923/



Jenkins build is still unstable: Aries » Apache Aries Transaction Integration Tests #1923

2014-04-14 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/Aries/org.apache.aries.transaction$org.apache.aries.transaction.itests/1923/



Jenkins build is still unstable: Aries » Apache Aries Blueprint sample iTests #1923

2014-04-14 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/Aries/org.apache.aries.samples.blueprint.helloworld$org.apache.aries.samples.blueprint.helloworld.itests/1923/



Jenkins build is still unstable: Aries » Aries EJB Modelling iTests #1923

2014-04-14 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/Aries/org.apache.aries.ejb$org.apache.aries.ejb.modeller.itest/1923/



Jenkins build is still unstable: Aries » Apache Aries Blog sample iTests #1923

2014-04-14 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/Aries/org.apache.aries.samples.blog$org.apache.aries.samples.blog.itests/1923/



Jenkins build is still unstable: Aries » Aries JPA iTests #1923

2014-04-14 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/Aries/org.apache.aries.jpa$org.apache.aries.jpa.container.itest/1923/



Jenkins build is still unstable: Aries » Apache Aries Application Resolve CM Transform iTests #1923

2014-04-14 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/Aries/org.apache.aries.application$org.apache.aries.application.resolve.transform.cm.itests/1923/



Jenkins build is still unstable: Aries » Apache Aries Application integration tests #1923

2014-04-14 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/Aries/org.apache.aries.application$org.apache.aries.application.runtime.isolated.itests/1923/



Jenkins build is still unstable: Aries » Apache Aries Blueprint Annotation iTests #1923

2014-04-14 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/Aries/org.apache.aries.blueprint$org.apache.aries.blueprint.annotation.itests/1923/



Jenkins build is still unstable: Aries » Apache Aries JMX integration tests #1923

2014-04-14 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/Aries/org.apache.aries.jmx$org.apache.aries.jmx.itests/1923/



Jenkins build is still unstable: Aries » Apache Aries Blueprint iTests #1923

2014-04-14 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/Aries/org.apache.aries.blueprint$org.apache.aries.blueprint.itests/1923/



Jenkins build is still unstable: Aries » Aries Quiesce Manager iTests #1923

2014-04-14 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/Aries/org.apache.aries.quiesce$org.apache.aries.quiesce.manager.itest/1923/



Jenkins build is still unstable: Aries » Apache Aries Web integration tests #1923

2014-04-14 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/Aries/org.apache.aries.web$org.apache.aries.web.itests/1923/



Jenkins build is still unstable: Aries » Aries EJB Extender iTests #1923

2014-04-14 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/Aries/org.apache.aries.ejb$org.apache.aries.ejb.openejb.extender.itest/1923/



Jenkins build is still unstable: Aries #1923

2014-04-14 Thread Apache Jenkins Server
See https://builds.apache.org/job/Aries/changes