The debug log message is an early warning that something might be wrong. It
says that Aries JPA needs a DataSourceFactory to initialize your
persistence unit.

As in OSGi services can start in any order this can be a temporary state
(if the DSF is just not yet up). In your case this is a permanent state as
you seem to the missing this service.
Blueprint reports this after a while but the timeout is quite high. This is
why there is the debug log message.

Another way to get an early warning is to se the karaf diag command.

Now back to your original problem. You need to install a DataSourceFactory
OSGi service. Many databases already provide this in their driver jar.
Unsurprisingly Oracle does not.
You can solve this by installing the feature pax-jdbc-oracle.

Cheers
Christian

2018-03-20 15:35 GMT+01:00 GFO <[email protected]>:

> Hello,
>
> I am trying to connect my bundles to a Oracle Database (10g) through
> ServiceMix.
>
> I have a bundle which contains my entities and my persistence.xml file in
> META-INF.
>
> Alongside, I have a DAO bundle in which I inject my entity manager.
>
> When I start my entities+persistence bundle, it has the state "Active". But
> when I look at the logs (I turned them into DEBUG), I have the following
> line : " org.apache.aries.jpa.container - 1.0.4 | The persistence unit
> my-unit in bundle my-bundle/0.0.1.SNAPSHOT cannot be registered because no
> DataSourceFactory service for JDBC driver oracle.jdbc.driver.OracleDriver
> exists.".
>
> You'll find the result of service:list DataSource and DataSourceFactory
> here: https://pastebin.com/H1UB4D4h. Does the log line is "normal" as it
> is
> in DEBUG ?
>
> Plus, when I launch my DAO bundle, I stays in "GRACE_PERIOD" and then
> "FAILED" states.
> In the logs, my DAO bundle seems to find the persistence infos from the
> other bundle : "Registering bundle bundle-dao_0.0.1.SNAPSHOT as a client of
> persistence unit my-unit with properties
> {org.apache.aries.jpa.context.type=TRANSACTION}.".
>
> But my DAO bundle seems to wait for a dependency : "Bundle
> bundle-dao/0.0.1.SNAPSHOT is waiting for dependencies
> [(&(&(org.apache.aries.jpa.proxy.factory=true)(osgi.unit.name
> =my-unit))(objectClass=javax.persistence.EntityManagerFactory))]".
>
> I don't know why.
>
> Here you'll find the logs of the launch of the DAO bundle :
> https://pastebin.com/YnVirQqm.
>
> Here is my persistence.xml (from entity+persistence bundle):
> https://pastebin.com/FY2s5AAT
>
> Here is my blueprint context (from DAO bundle):
> https://pastebin.com/WxpeBAte
>
> Here is the result of bundle:list -t 0 command:
> https://pastebin.com/2L80Ud6L
>
> Here is the MANIFEST of my DAO bundle: https://pastebin.com/fpYmALgg
>
>
> Please can you help me on this problem? I'm completely stuck. :(
>
> Thanks a lot!
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com

Reply via email to