The service lists look good but that the db command does not work shows that there is a problem. The problem seems to be already in the datasource though.

Can you try to access the datasource directly outside of OSGi and make sure that it is correct?

Christian

Am 26.04.2012 12:29, schrieb Borut Bolčina:
Hi,

Dne 26. april 2012 11:09 je Christian Schneider <[email protected] <mailto:[email protected]>> napisal/-a:

    You can check if the datasource works by using my db commands for
    karaf:
    https://github.com/cschneider/Karaf-Tutorial/tree/master/db/command


Installed:
karaf@root> install -s mvn:net.lr.tutorial.karaf.db/db-command/1.0-SNAPSHOT
Bundle ID: 129

Selected:
karaf@root> db:select jdbc/mysqlds

But the query returns nothing:
karaf@root> db:exec "select * from my_table_which_holds_some_data"




    You should also check with the service:list command if the
    blueprint.xml offers the DataSource service.


Yes, i think it does:

weather-datasource (123) provides:
----------------------------------
javax.sql.DataSource
org.osgi.service.blueprint.container.BlueprintContainer

OpenJPA Aggregate Jar (125) provides:
-------------------------------------
javax.persistence.spi.PersistenceProvider

weather-model (128) provides:
-----------------------------
javax.persistence.EntityManagerFactory


Thanks for the tips. Will have to dig some more into the issue.

-borut



--

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

Open Source Architect
Talend Application Integration Division http://www.talend.com

Reply via email to