Quantcast

Unable to install feature via console: datasource filtered by name not found

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Unable to install feature via console: datasource filtered by name not found

lechlukasz
Hello,

I've packed my persistence unit in feature (there are much more bundles, but only the persistence one is relevant in the problem). It looks like following (irrelevant depencencies are removed):

    <feature name="my-feature" version="1.0.0-SNAPSHOT">
                <feature version="2.5.0">jpa</feature>
                <feature version="1.2.0">transaction-api</feature>
                <feature>transaction</feature>
                <feature>eclipselink</feature>
                <feature>pax-jdbc-config</feature>
                <feature>pax-jdbc-postgresql</feature>
               
        <bundle start-level="80">mvn:my.project/persistence/1.0.0-SNAPSHOT</bundle>
        </feature>       
       
This is a working solution, or at least it was until this week. When I started karaf 4.1.0 from scratch and started installing my features, I've got following error:
       
        caused by: Unable to resolve persistence/1.0.0.SNAPSHOT: missing requirement [persistence/1.0.0.SNAPSHOT] osgi.service; objectClass=javax.sql.DataSource; effective:=active; filter:="(osgi.jndi.service.name=datasource-pg)
       
The datasource is refered in the following way:
       
        <persistence-unit name="officialUnit" transaction-type="JTA">
                <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>

               
                <jta-data-source>osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=datasource-pg)</jta-data-source>

               
                <non-jta-data-source>osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=datasource-pg)</non-jta-data-source>
        </persistence-unit>       
       
If I install bundle through bundle:install, it is installed correctly, and imports the datasource-pg. It can't start when I do feature:install. In last week everything was functioning, therefore my suspicious, that it has something to do with some change to the features that was published since that time. Has anybody idea, what went wrong here?

I've found out in another topic, that there are problems with features in karaf. This was in context of maven plugin, which wasn't able to produce karaf distribution with that feature because of the problem with services imported with filters. Did that problem escalate to installing features in running karaf from console?

Best regards!

       
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to install feature via console: datasource filtered by name not found

lechlukasz
It might have something to do with http://stackoverflow.com/questions/42476572/karaf-feature-install-missing-requirement-osgi-service-but-it-is-there

Adding <_removeheaders>Require-Capability</_removeheaders> to maven-bundle-plugin configuration hs "solved" the problem.
Loading...