karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Nodet <gno...@apache.org>
Subject Re: Karaf 4.1.5 missing requirement?
Date Wed, 09 May 2018 16:59:53 GMT
The problem comes from the deployment of your datasource.
When you launch "feature:install qcfs-processing", the resolver will need a
service for the datasource, but it does not consider runtime services, only
those that are expressed from the features' dependencies.
In order to solve the problem, you should deploy the datasource inside a
feature and provide the capability if the service is not known (for example
deploying a config for pax-jdbc will not be sufficient, as the resolver has
no knowledge about the fact that it will actually register a service).
This can be done by adding  the following into the feature that deploys the
datasource:

<capability>

    osgi.service;effective:=active;objectClass=javax.sql.DataSource;osgi.jndi.service.name=jdbc/manifestlegacydb

</capability>


2018-05-09 18:38 GMT+02:00 Jerry Smith <jsmith@qcfreightservice.com>:

> I'm at a loss as to what I am missing here.  It seems that my feature
> cannot
> find it's datasource, but as you can see the datasource exists. Any help
> would be appreciated -
>
> karaf@root()> feature:install qcfs-processing
>
> Error executing command: Unable to resolve root: missing requirement [root]
> osgi.identity; osgi.identity=qcfs-processing; type=karaf.feature;
> version="[2.1.0.SNAPSHOT,2.1.0.SNAPSHOT]";
> filter:="(&(osgi.identity=qcfs-processing)(type=karaf.
> feature)(version>=2.1.0.SNAPSHOT)(version<=2.1.0.SNAPSHOT))"
> [caused by: Unable to resolve qcfs-processing/2.1.0.SNAPSHOT: missing
> requirement [qcfs-processing/2.1.0.SNAPSHOT] osgi.identity;
> osgi.identity=com.qcfreightservice.qcfs-system; type=osgi.bundle;
> version="[2.1.0.SNAPSHOT,2.1.0.SNAPSHOT]"; resolution:=mandatory [caused
> by:
> Unable to resolve com.qcfreightservice.qcfs-system/2.1.0.SNAPSHOT: missing
> requirement [com.qcfreightservice.qcfs-system/2.1.0.SNAPSHOT]
> osgi.service;
> objectClass=javax.sql.DataSource; effective:=active;
> filter:="(osgi.jndi.service.name=jdbc/manifestlegacydb)"]]
>
>
>
> karaf@root()> service:list DataSource
>
> [javax.sql.DataSource]
>
> ----------------------
>
>  databaseName = XXXX
>
>  dataSourceName = jdbc/manifestlegacydb
>
>  felix.fileinstall.filename =
> file:/C:/Users/jsmith/Documents/programs/karaf-.1.5/
> etc/org.ops4j.datasource-manifest.cfg
>  jdbc.factory.validationQuery = select scope from GeneralAttributes
>
>  jdbc.pool.testOnBorrow = true
>
>  org.apache.karaf.features.configKey = org.ops4j.datasource-manifest
>
>  osgi.jdbc.driver.name = mssql
>
>  osgi.jndi.service.name = jdbc/manifestlegacydb
>
>  password = XXXX
>
>  pool.maxTotal = 20
>
>  portNumber = 1433
>
>  serverName = XXXX
>
>  service.bundleid = 91
>
>  service.factoryPid = org.ops4j.datasource
>
>  service.id = 266
>
>  service.pid = org.ops4j.datasource.7a9836f5-3b7d-457e-b71b-b565be0abd88
>
>  service.scope = singleton
>
>  url = jdbc:sqlserver://XXXX:1433;database=XXXX;loginTimeout=30;
>
>  user = XXXX
>
> Provided by :
>
>  OPS4J Pax JDBC Config (91)
>
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>



-- 
------------------------
Guillaume Nodet

Mime
View raw message