ode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Agustín Gañán (JIRA) <j...@apache.org>
Subject [jira] Commented: (ODE-833) ODE 1.3.4rc1 + EclipseLink 2.0 integration in SMX 4.2
Date Tue, 25 May 2010 10:50:24 GMT

    [ https://issues.apache.org/jira/browse/ODE-833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12871090#action_12871090
] 

Agustín Gañán commented on ODE-833:
-----------------------------------

Attached a patch to set the PersitenceProvider class explicitly in the 2 persistence units
(ode-dao and ode-store).
- In ode-dao by adding in ode-jbi.xml (ode-jbi-bundle project) config file the persistence
provider property
- In ode-store by 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).

> ODE 1.3.4rc1 + EclipseLink 2.0 integration in SMX 4.2
> -----------------------------------------------------
>
>                 Key: ODE-833
>                 URL: https://issues.apache.org/jira/browse/ODE-833
>             Project: ODE
>          Issue Type: Bug
>          Components: JBI Integration
>         Environment: EclipseLink 2.0
> ODE 1.3.4rc1
>            Reporter: Agustín Gañán
>             Fix For: 1.3.4
>
>
> Install ODE 1.3.4rc1 (osgi version) and EclipseLink 2.0 in Servicemix 4.2 causes this
error[1] on container restart.
> ODE's data layer is using JPA 1.0 but EclipseLinkg is using JPA 2.0.
> The problem is for the PersitenceProvider class to create the EntityManagerFactory (in
org.apache.ode.dao.jpa.BPELDAOConnectionFactoryImpl.init())
> 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).
> [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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message