That worked. Thanks again.

Erwin

> On Dec 30, 2016, at 13:52, Erwin Hogeweg <[email protected]> wrote:
> 
> Hi Tim,
> 
> Thanks for your reply. I’ll give that a try.
> 
> Erwin
> 
>> On Dec 30, 2016, at 13:50, Tim Ward <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> David is right, 
>> 
>> there is a bug in the packaging of the Aries local transaction control 
>> service implementation. You should just be able to use the XA implementation 
>> (which also supports local transactions) instead, or you can wait for a fix 
>> in the snapshots, which will likely appear in the new year.
>> 
>> Tim
>> 
>> Sent from my iPhone
>> 
>> On 30 Dec 2016, at 17:24, David Jencks <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>>> My guess is that the bundle providing the TransactionControl service 
>>> doesn’t say so by having a Provide-Capability header for it.  For runtime 
>>> resolution the effectice=active requirements don’t matter but for at last 
>>> subsystem resolution they do.
>>> 
>>> david jencks
>>> 
>>>> On Dec 30, 2016, at 6:08 AM, Erwin Hogeweg <[email protected] 
>>>> <mailto:[email protected]>> wrote:
>>>> 
>>>> Hi,
>>>> 
>>>> I am having problems getting a feature working with the TransactionControl 
>>>> Service under Karaf. The error msg suggests that the service is missing or 
>>>> not active, but I am at a loss of why.
>>>> 
>>>> This is the error:
>>>> [caused by: Unable to resolve 
>>>> com.my.persistence.repositories/1.0.0.SNAPSHOT_20161227-1454: missing 
>>>> requirement [com.my.persistence.repositories/1.0.0.SNAPSHOT_20161227-1454] 
>>>> osgi.service; 
>>>> filter:="(objectClass=org.osgi.service.transaction.control.TransactionControl)";
>>>>  effective:=active]]
>>>> 
>>>> I have a DSF:
>>>> [org.osgi.service.jdbc.DataSourceFactory]
>>>> -----------------------------------------
>>>>  osgi.jdbc.driver.class = com.mysql.jdbc.Driver
>>>>  osgi.jdbc.driver.name = mysql
>>>>  service.id = 255
>>>>  service.bundleid = 162
>>>>  service.scope = singleton
>>>> Provided by : 
>>>>  OPS4J Pax JDBC MySQL Driver Adapter (162)
>>>> Used by: 
>>>>  OSGi Transaction Control JPA Resource Provider - Local Transactions (114)
>>>> 
>>>> I have a TransactionControl service:
>>>> [org.osgi.service.transaction.control.TransactionControl]
>>>> ---------------------------------------------------------
>>>>  service.vendor = Apache Aries
>>>>  service.description = The Apache Aries Transaction Control Service for 
>>>> Local Transactions
>>>>  osgi.local.enabled = true
>>>>  service.id = 206
>>>>  service.bundleid = 113
>>>>  service.scope = singleton
>>>> Provided by : 
>>>>  OSGi Transaction Control Service - Local Transactions (113)
>>>> 
>>>> TransactionControl bundles appear to be running correctly:
>>>> OSGi Transaction Control Service - Local Transactions (113) provides:
>>>> ---------------------------------------------------------------------
>>>> [org.osgi.service.transaction.control.TransactionControl]
>>>> 
>>>> OSGi Transaction Control JPA Resource Provider - Local Transactions (114) 
>>>> uses:
>>>> -------------------------------------------------------------------------------
>>>> [javax.persistence.spi.PersistenceProvider]
>>>> [org.osgi.service.jpa.EntityManagerFactoryBuilder]
>>>> [org.osgi.service.jdbc.DataSourceFactory]
>>>> 
>>>> OSGi Transaction Control JPA Resource Provider - Local Transactions (114) 
>>>> provides:
>>>> -----------------------------------------------------------------------------------
>>>> osgi.local.enabled = true
>>>> objectClass = 
>>>> [org.osgi.service.transaction.control.jpa.JPAEntityManagerProviderFactory]
>>>> service.id = 207
>>>> service.bundleid = 114
>>>> service.scope = bundle
>>>> ----
>>>> service.pid = org.apache.aries.tx.control.jpa.local
>>>> objectClass = [org.osgi.service.cm.ManagedServiceFactory]
>>>> service.id = 209
>>>> service.bundleid = 114
>>>> service.scope = singleton
>>>> ----
>>>> service.pid = 
>>>> org.apache.aries.tx.control.jpa.local.adaeed20-19cf-4dff-9276-0afc20052ecc
>>>> user = db_user
>>>> url = jdbc:mysql://localhost:3306/my_db <mysql://localhost:3306/my_db>
>>>> service.factoryPid = org.apache.aries.tx.control.jpa.local
>>>> osgi.unit.name = my.pu
>>>> osgi.jdbc.driver.class = com.mysql.jdbc.Driver
>>>> felix.fileinstall.filename = 
>>>> file:<…>/apache-karaf-4.0.7/etc/org.apache.aries.tx.control.jpa.local-.cfg
>>>> databaseName = my_db
>>>> objectClass = 
>>>> [org.osgi.service.transaction.control.jpa.JPAEntityManagerProvider]
>>>> service.id = 256
>>>> service.bundleid = 114
>>>> service.scope = singleton
>>>> 
>>>> 
>>>> FWIW, transactionControl resolves just fine in a ‘stand-alone’ equinox 
>>>> framework:
>>>> 
>>>> g! bundle 89
>>>> com.my.persistence.repositories_1.0.0.SNAPSHOT_20161227-1454 [89]
>>>> ...
>>>>   Services in use:
>>>> ...
>>>>     
>>>> {org.osgi.service.transaction.control.TransactionControl}={service.vendor=Apache
>>>>  Aries, service.description=The Apache Aries Transaction Control Service 
>>>> for Local Transactions, osgi.local.enabled=true, service.id=70, 
>>>> service.bundleid=51, service.scope=singleton}
>>>> 
>>>> Does anyone have a suggestion as of what I am missing?
>>>> 
>>>> 
>>>> Thanks and a Happy new Year,
>>>> 
>>>> Erwin
>>>> 
>>> 
> 

Reply via email to