Created and patch attacthed [1] (I'm not sure if it follows the ODE
style, but I do my best :-D)

https://issues.apache.org/jira/browse/ODE-833

Thank you very much,

Agus

2010/5/25 Rafal Rusin <[email protected]>:
> 2010/5/25 Agustín Gañán <[email protected]>
>
>> Hi again,
>>
>> I've a patch to solve this issue:
>> - Adding in ode-jbi.xml (ode-jbi-bundle project) config file the
>> persistence provider property
>> - Adding in org.apache.ode.store.jpa.DbConfStoreConnectionFactory
>> (ode-bpel-store) the persistence provider property ("hardcoded" but I
>> cannot find the way to set as a property).
>>
>> Should I create a JIRA issue or this is not an issue at all for the ODE
>> team?
>>
>>
> Yes. Please create jira issue with "fix for" 1.3.4. Then attach a patch.
>
>
>
>> thanks,
>>
>> Agus
>>
>>
>> ---------- Mensaje reenviado ----------
>> De: Agustín Gañán <[email protected]>
>> Fecha: 25 de mayo de 2010 10:32
>> Asunto: ODE 1.3.4rc1 + EclipseLink 2.0 in SMX 4.2
>> Para: [email protected]
>>
>>
>> Hi all,
>>
>> I'm working on a project in wich we want to use ODE (1.3.4rc1
>> installed as a bundle) in the process orchestration and EclipseLink
>> (2.0) in the data access layer in Servicemix 4.2  but I found an
>> integration issue.
>>
>> ODE's data layer is using JPA 1.0 but EclipseLinkg is using JPA 2.0.
>> In theory, the OSGI environment support this. I can install ODE
>> without problem and then install EclipseLink succesfully too. The
>> problem cames when I restart the container.
>>
>> In the restart, when ODE is starting I have this error [1] and
>> OdeBpelEngine fails to start:
>>
>> Caused by: java.lang.ClassCastException:
>> org.eclipse.persistence.jpa.PersistenceProvider cannot be cast to
>> javax.persistence.spi.PersistenceProvider
>>
>> The problem is the way in wich ODE look for the PersitenceProvider
>> class to create the EntityManagerFactory (in
>> org.apache.ode.dao.jpa.BPELDAOConnectionFactoryImpl.init())
>>
>> The flow to get the ODE persitence provider class is:
>>
>> 1.- The persitenceProvider property (javax.persistence.provider)
>> passed to create the entityManager (is null, I don't know why)
>>
>> 2.- The OSGI services registered under the interface
>> "javax.persistence.spi.PersistenceProvider". There are two (the ODE
>> one, registered first and the EclipseLink).
>> The osgiLocator returns always the last service registered, in my case
>> the EclipseLink persitence provider and this is the origin of the
>> classCastExcpecion (JPA 1.0 vs JPA 2.0)
>>
>> 3.- The class defined in the bundle classpath (never reach this point).
>>
>> Does anyone knows how can I set correctly the
>> javax.persistence.provider property in the ode-dao persitence unit? I
>> can see in the sources (persitence.xml in ode-dao-jpa) that is defined
>> but it seems that's is being ignored.
>>
>> Thanks all,
>>
>> Agus
>>
>> [1] 10:00:20,414 | WARN  | xtenderThread-61 | ComponentRegistryImpl
>>        | mix.nmr.core.ServiceRegistryImpl   49 | Unable to register
>> service OdeBpelEngine with properties {NAME=OdeBpelEngine,
>> objectClass=[Ljava.lang.String;@19a2b3d, service.id=269,
>> TYPE=service-engine}. Reason: javax.jbi.JBIException: Fatal error
>> javax.jbi.JBIException: Fatal error
>>        at org.apache.ode.jbi.OdeLifeCycle.init(OdeLifeCycle.java:152)
>>        at
>> org.apache.servicemix.jbi.deployer.artifacts.ComponentImpl$ComponentWrapper.init(ComponentImpl.java:249)
>>        at
>> org.apache.servicemix.jbi.runtime.impl.ComponentRegistryImpl.doRegister(ComponentRegistryImpl.java:98)
>>        at
>> org.apache.servicemix.jbi.runtime.impl.ComponentRegistryImpl.doRegister(ComponentRegistryImpl.java:38)
>>        at
>> org.apache.servicemix.nmr.core.ServiceRegistryImpl.register(ServiceRegistryImpl.java:47)
>>        at
>> org.apache.servicemix.nmr.osgi.OsgiServiceRegistryTracker.addingService(OsgiServiceRegistryTracker.java:79)
>>        at
>> org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:896)
>>        at
>> org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:261)
>>        at
>> org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:233)
>>        at
>> org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:840)
>>        at
>> org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:864)
>>        at
>> org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:732)
>>        at
>> org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:662)
>>        at
>> org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3619)
>>        at org.apache.felix.framework.Felix.access$000(Felix.java:39)
>>        at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:667)
>>        at
>> org.apache.felix.framework.ServiceRegistry.registerService(ServiceRegistry.java:97)
>>        at org.apache.felix.framework.Felix.registerService(Felix.java:2760)
>>        at
>> org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:252)
>>        at
>> org.apache.servicemix.jbi.deployer.impl.Deployer.registerService(Deployer.java:775)
>>        at
>> org.apache.servicemix.jbi.deployer.impl.Deployer.registerComponent(Deployer.java:437)
>>        at
>> org.apache.servicemix.jbi.deployer.impl.ComponentInstaller.initComponent(ComponentInstaller.java:427)
>>        at
>> org.apache.servicemix.jbi.deployer.impl.ComponentInstaller.install(ComponentInstaller.java:153)
>>        at
>> org.apache.servicemix.jbi.deployer.impl.Deployer.registerDeployedComponent(Deployer.java:670)
>>        at
>> org.apache.servicemix.jbi.deployer.impl.Deployer$1.addingService(Deployer.java:242)
>>        at
>> org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:896)
>>        at
>> org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:261)
>>        at
>> org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:233)
>>        at
>> org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:840)
>>        at
>> org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:864)
>>        at
>> org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:732)
>>        at
>> org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:662)
>>        at
>> org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3619)
>>        at org.apache.felix.framework.Felix.access$000(Felix.java:39)
>>        at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:667)
>>        at
>> org.apache.felix.framework.ServiceRegistry.registerService(ServiceRegistry.java:97)
>>        at org.apache.felix.framework.Felix.registerService(Felix.java:2760)
>>        at
>> org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:252)
>>        at
>> org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean.registerService(OsgiServiceFactoryBean.java:310)
>>        at
>> org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean.registerService(OsgiServiceFactoryBean.java:279)
>>        at
>> org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean$Executor.registerService(OsgiServiceFactoryBean.java:95)
>>        at
>> org.springframework.osgi.service.exporter.support.internal.controller.ExporterController.registerService(ExporterController.java:40)
>>        at
>> org.springframework.osgi.service.dependency.internal.DefaultMandatoryDependencyManager.startExporter(DefaultMandatoryDependencyManager.java:325)
>>        at
>> org.springframework.osgi.service.dependency.internal.DefaultMandatoryDependencyManager.checkIfExporterShouldStart(DefaultMandatoryDependencyManager.java:267)
>>        at
>> org.springframework.osgi.service.dependency.internal.DefaultMandatoryDependencyManager.discoverDependentImporterFor(DefaultMandatoryDependencyManager.java:260)
>>        at
>> org.springframework.osgi.service.dependency.internal.DefaultMandatoryDependencyManager.addServiceExporter(DefaultMandatoryDependencyManager.java:191)
>>        at
>> org.springframework.osgi.service.dependency.internal.MandatoryDependencyBeanPostProcessor.postProcessAfterInitialization(MandatoryDependencyBeanPostProcessor.java:46)
>>        at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:361)
>>        at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1344)
>>        at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
>>        at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
>>        at java.security.AccessController.doPrivileged(Native Method)
>>        at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
>>        at
>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
>>        at
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
>>        at
>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
>>        at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
>>        at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
>>        at
>> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
>>        at
>> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
>>        at
>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)
>>        at
>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)
>>        at
>> org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
>>        at
>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
>>        at
>> org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)
>>        at java.lang.Thread.run(Thread.java:619)
>> Caused by: javax.persistence.PersistenceException: Provider error.
>> Provider: null
>>        at
>> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:109)
>>        at
>> org.apache.ode.dao.jpa.BPELDAOConnectionFactoryImpl.init(BPELDAOConnectionFactoryImpl.java:113)
>>        at org.apache.ode.il.dbutil.Database.createDaoCF(Database.java:291)
>>        at org.apache.ode.jbi.OdeLifeCycle.initDao(OdeLifeCycle.java:269)
>>        at org.apache.ode.jbi.OdeLifeCycle.init(OdeLifeCycle.java:129)
>>        ... 65 more
>> Caused by: java.lang.ClassCastException:
>> org.eclipse.persistence.jpa.PersistenceProvider cannot be cast to
>> javax.persistence.spi.PersistenceProvider
>>        at
>> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:103)
>>        ... 69 more
>>
>
>
>
> --
> Regards,
> Rafał Rusin
> http://rrusin.blogspot.com
>

Reply via email to