Hi,

I don’t know the specifics of what is going on here, but it is not recommended 
to use a pooled datasource factory wrapper with Transaction Control (which does 
its own pooling). You would be better off using the vanilla DataSourceFactory 
service for mysql.

Also, you may wish to update to use version 1.0.0 of Transaction Control, it is 
newer and builds against the released OSGi API.

Best Regards,

Tim

> On 7 Feb 2019, at 11:34, cobusstroebel <co...@scss.co.za> wrote:
> 
> I am using Karaf 4.0.3 with the following features enabled:
> 
>    <feature>jndi</feature>
>    <feature>transaction-api</feature>
>    <feature>transaction</feature>
>    <feature>jpa</feature>
>    <feature>eclipselink</feature>
>    <feature>pax-jdbc-config</feature>
>    <feature>pax-jdbc-mysql</feature>
>    <feature>pax-jdbc-pool-aries</feature>
>    <bundle
> start-level="80">mvn:javax.validation/validation-api/1.1.0.Final</bundle>
> 
> <bundle>mvn:org.apache.aries.tx-control/tx-control-service-xa/0.0.3</bundle>
> 
> <bundle>mvn:org.apache.aries.tx-control/tx-control-provider-jpa-xa/0.0.3</bundle>
> 
> Whenever I drop in my org.apache.aries.tx.controljpa.xa-example.cfg in etc,
> I get the following error:
> 
> An error occured creating the Resource provider for pid
> org.apache.aries.tx.control.jpa.xa.9bc35a19-cd58-43fe-bb73-146cfb846f2f
> org.osgi.service.transaction.control.TransactionException: Unable to create
> the JDBC resource provider
>        at
> org.apache.aries.tx.control.jpa.xa.impl.XAJPADataSourceSetup.decorateJPAProperties(XAJPADataSourceSetup.java:60)[173:tx-control-provider-jpa-xa:0.0.3]
>        at
> org.apache.aries.tx.control.jpa.common.impl.AbstractManagedJPADataSourceSetup.addingService(AbstractManagedJPADataSourceSetup.java:111)[173:tx-control-provider-jpa-xa:0.0.3]
>        at
> org.apache.aries.tx.control.jpa.common.impl.AbstractManagedJPADataSourceSetup.addingService(AbstractManagedJPADataSourceSetup.java:57)[173:tx-control-provider-jpa-xa:0.0.3]
>        at
> org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)[org.osgi.core-6.0.0.jar:]
>        at
> org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)[org.osgi.core-6.0.0.jar:]
>        at
> org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)[org.osgi.core-6.0.0.jar:]
>        at
> org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)[org.osgi.core-6.0.0.jar:]
>        at
> org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:318)[org.osgi.core-6.0.0.jar:]
>        at
> org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261)[org.osgi.core-6.0.0.jar:]
>        at
> org.apache.aries.tx.control.jpa.common.impl.AbstractManagedJPADataSourceSetup.start(AbstractManagedJPADataSourceSetup.java:99)[173:tx-control-provider-jpa-xa:0.0.3]
>        at
> org.apache.aries.tx.control.resource.common.impl.ConfigurationDefinedResourceFactory.updated(ConfigurationDefinedResourceFactory.java:82)[173:tx-control-provider-jpa-xa:0.0.3]
>        at
> org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.updated(ManagedServiceFactoryTracker.java:159)[7:org.apache.felix.configadmin:1.8.8]
>        at
> org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.provideConfiguration(ManagedServiceFactoryTracker.java:93)[7:org.apache.felix.configadmin:1.8.8]
>        at
> org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1753)[7:org.apache.felix.configadmin:1.8.8]
>        at
> org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:143)[7:org.apache.felix.configadmin:1.8.8]
>        at
> org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:110)[7:org.apache.felix.configadmin:1.8.8]
>        at java.lang.Thread.run(Thread.java:745)[:1.8.0_101]
> Caused by: java.sql.SQLException: Not supported
>        at
> org.ops4j.pax.jdbc.pool.aries.impl.ds.AriesPooledDataSourceFactory.createXADataSource(AriesPooledDataSourceFactory.java:113)[165:org.ops4j.pax.jdbc.pool.aries:0.7.0]
>        at
> org.apache.aries.tx.control.jpa.xa.impl.XAJPADataSourceSetup.decorateJPAProperties(XAJPADataSourceSetup.java:57)[173:tx-control-provider-jpa-xa:0.0.3]
>        ...
> 
> Here is what my org.apache.aries.tx.controljpa.xa-example.cfg looks like:
> 
> osgi.unit.name=ExamplePU
> osgi.jdbc.driver.class=com.mysql.jdbc.Driver-pool-xa
> url=jdbc:mysql://localhost:3306/myexample
> databaseName=myexample
> user=whatever
> password=whatever
> 
> 
> Can anyone explain to me why I am getting a not supported exception?
> 
> Kind Regards
> Cobus
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Reply via email to