Inspecting pax-logging-api-1.11.4.jar manifest, shows: 

Import-Package: 
org.osgi.framework;version="[1.0.0,2.0.0)",
org.osgi.framework.wiring;version="[1.0.0,2.0.0)",
org.osgi.util.tracker;version="[1.0.0,2.0.0)",
org.osgi.service.event;version="[1.0.0,2.0.0)";resolution:=optional,
org.osgi.service.log;version="[1.3.0,2.0.0)",
org.apache.log;resolution:=optional,
javax.xml.parsers,
org.w3c.dom,org.ops4j.pax.logging;version="[0.9.5,2.0.0)",
org.ops4j.pax.logging.avalon;version="[0.9.5,2.0.0)”


And pax-logging-api-1.11.4.jar is included in Karaf’s framework feature.  

<feature version="${project.version}" description="Karaf core feature" 
name="framework" hidden="true">
        <!-- persistent wiring extension -->
        <bundle 
start-level="1">mvn:org.apache.karaf.features/org.apache.karaf.features.extension/${project.version}</bundle>
        <!-- mvn: and wrap: url handlers -->
        <bundle 
start-level="5">mvn:org.ops4j.pax.url/pax-url-aether/${pax.url.version}</bundle>
        <!-- logging -->
        <bundle 
start-level="8">mvn:org.ops4j.pax.logging/pax-logging-api/${pax.logging.version}</bundle>
        <bundle 
start-level="8">mvn:org.ops4j.pax.logging/pax-logging-log4j2/${pax.logging.version}</bundle>
        <bundle 
start-level="8">mvn:org.fusesource.jansi/jansi/${jansi.version}</bundle>
        <!-- config admin -->
        <bundle 
start-level="9">mvn:org.apache.felix/org.apache.felix.coordinator/${felix.coordinator.version}</bundle>
        <bundle 
start-level="10">mvn:org.apache.felix/org.apache.felix.configadmin/${felix.configadmin.version}</bundle>
        <!-- file install -->
        <bundle 
start-level="11">mvn:org.apache.felix/org.apache.felix.fileinstall/${felix.fileinstall.version}</bundle>
        <!-- features service -->
        <bundle 
start-level="15">mvn:org.apache.karaf.features/org.apache.karaf.features.core/${project.version}</bundle>
        <bundle dependency="true" 
start-level="30">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxb-api-2.2/${servicemix-spec.version}</bundle>
        <bundle dependency="true" 
start-level="30">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/${servicemix-spec.version}</bundle>
    </feature>

I can see that package javax.xml.parsers  is in  
/Library/Java/JavaVirtualMachines/jdk-13.0.2.jdk/Contents/Home/lib/jrt-fs.jar,  
so it is part of the Java 13 runtime.
Why can’t Karaf resolve it then?.  Does Karaf 4.2.8 works (has been tested) 
with Java 13?



> On Feb 20, 2020, at 4:53 PM, Alex Soto <[email protected]> wrote:
> 
> Notice that the error I am getting while validating the Features XML is this:
> 
> Unable to resolve root: missing requirement [root] osgi.identity; 
> osgi.identity=framework; type=karaf.feature; 
> filter:="(&(osgi.identity=framework)(type=karaf.feature))" [caused by: Unable 
> to resolve framework/4.2.8: missing requirement [framework/4.2.8] 
> osgi.identity; osgi.identity=org.ops4j.pax.logging.pax-logging-api; 
> type=osgi.bundle; version="[1.11.4,1.11.4]"; resolution:=mandatory [caused 
> by: Unable to resolve org.ops4j.pax.logging.pax-logging-api/1.11.4: missing 
> requirement [org.ops4j.pax.logging.pax-logging-api/1.11.4] 
> osgi.wiring.package; filter:="(osgi.wiring.package=javax.xml.parsers)”]]
> 
> 
> And that, apparently, is required by  pax-logging-api (not my code), so I 
> would think that the correct dependency (providing javax.xml.parsers) would 
> be included in one of the Karaf’s features, or not?
> 
> 
> Best regards,
> Alex soto
> 
> 
> 
> 
>> On Feb 20, 2020, at 3:07 PM, Jean-Baptiste Onofré <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> You have to provide jaxb bundle as it?s now module so not included in jdk 
>> (like ?add-module). 
>> So tour feature should reference jaxb dep. 
>> 
>> Regards 
>> JB
>> 
>> Le jeu. 20 f?vr. 2020 ? 16:58, Alex Soto <[email protected] 
>> <mailto:[email protected]>> a ?crit :
>> More info:
>> 
>> If I specify:
>>      
>>      <javase>1.8</javase>
>> 
>> In the karaf-maven-plugin configuration, then I get error:
>> 
>>      missing requirement [xxx] osgi.ee; 
>> filter:="(&(osgi.ee=JavaSE)(version=13))"
>> 
>> And, if I specify:
>> 
>>      <javase>13</javase>      or
>>      <javase>1.13</javase>
>> 
>> Then I get error:
>> 
>>      missing requirement [xxx] osgi.wiring.package; 
>> filter:="(osgi.wiring.package=javax.xml.parsers)?
>> 
>> Any hint will be appreciated.
>> Best regards,
>> Alex soto
>> 
>> 
>> 
>> 
>> On Feb 20, 2020, at 9:44 AM, Alex Soto <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> Anybody?s done migration of Karaf app to Java 13?  (I said 11 before, but it 
>> is actually 13)
>> 
>> Some of the errors I am getting from karaf-maven-plugin:4.2.8:verify:
>> 
>> 
>> [WARNING] Unable to resolve root: missing requirement [root] osgi.identity; 
>> osgi.identity=framework; type=karaf.feature; 
>> filter:="(&(osgi.identity=framework)(type=karaf.feature))" [caused by: 
>> Unable to resolve framework/4.2.8: missing requirement [framework/4.2.8] 
>> osgi.identity; osgi.identity=org.ops4j.pax.logging.pax-logging-api; 
>> type=osgi.bundle; version="[1.11.4,1.11.4]"; resolution:=mandatory [caused 
>> by: Unable to resolve org.ops4j.pax.logging.pax-logging-api/1.11.4: missing 
>> requirement [org.ops4j.pax.logging.pax-logging-api/1.11.4] 
>> osgi.wiring.package; filter:="(osgi.wiring.package=javax.xml.parsers)"]]
>> 
>> 
>> 
>> 
>> Best regards,
>> Alex soto
>> 
>> 
>> 
>> 
>> On Feb 19, 2020, at 1:26 PM, Alex Soto <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> Hello,
>> 
>> I am migrating to Java 11 (from Java 8).  Everything builds successfully, 
>> but running Pax-Exam integration tests produces this error:
>> 
>> 
>> WARNING: package org.apache.karaf.specs.locator not in java.base
>> ERROR: Error parsing system bundle export statement: 
>> org.osgi.dto;version="1.0",org.osgi.resource;version="1.0",org.osgi.resource.dto;version="1.0";uses:="org.osgi.dto",org.osgi.framework;version="1.8",org.osgi.framework.dto;version="1.8";uses:="org.osgi.dto",org.osgi.framework.hooks.bundle;version="1.1";uses:="org.osgi.framework",org.osgi.framework.hooks.resolver;version="1.0";uses:="org.osgi.framework.wiring",org.osgi.framework.hooks.service;version="1.1";uses:="org.osgi.framework",org.osgi.framework.hooks.weaving;version="1.1";uses:="org.osgi.framework.wiring",org.osgi.framework.launch;version="1.2";uses:="org.osgi.framework",org.osgi.framework.namespace;version="1.1";uses:="org.osgi.resource",org.osgi.framework.startlevel;version="1.0";uses:="org.osgi.framework",org.osgi.framework.startlevel.dto;version="1.0";uses:="org.osgi.dto",org.osgi.framework.wiring;version="1.2";uses:="org.osgi.framework,org.osgi.resource",org.osgi.framework.wiring.dto;version="1.2";uses:="org.osgi.dto,org.osgi.resource.dto",org.osgi.service.co
>>  
>> <http://org.osgi.service.co/>ndpermadmin;version="1.1.1";uses:="org.osgi.framework,org.osgi.service.permissionadmin",org.osgi.service.packageadmin;version="1.2";uses:="org.osgi.framework",org.osgi.service.permissionadmin;version="1.2",org.osgi.service.resolver;version="1.0";uses:="org.osgi.resource",org.osgi.service.startlevel;version="1.1";uses:="org.osgi.framework",org.osgi.service.url;version="1.0",org.osgi.util.tracker;version="1.5.1";uses:="org.osgi.framework",org.apache.karaf.version;version="4.2.8",org.apache.karaf.jaas.boot.principal;uses:=javax.security.auth;version="4.2.8",org.apache.karaf.jaas.boot;uses:="javax.security.auth,javax.security.auth.callback,javax.security.auth.login,javax.security.auth.spi,org.osgi.framework";version="4.2.8",org.apache.karaf.info
>>  <http://he.karaf.info/>;version="4.2.8",,org.apache.karaf.branding, 
>> sun.misc, com.sun.jmx.remote.protocol, com.sun.jmx.remote.protocol.jmxmp, 
>> org.apache.karaf.jaas.boot;uses:="javax.security.auth,javax.security.auth.callback,javax.security.auth.login,javax.security.auth.spi,org.osgi.framework";version=4.2.8,
>>  
>> org.apache.karaf.jaas.boot.principal;uses:=javax.security.auth;version=4.2.8,
>>  org.apache.karaf.diagnostic.core;uses:=org.osgi.framework;version=4.2.8, 
>> org.apache.karaf.diagnostic.core.common;uses:=org.apache.karaf.diagnostic.core;version=4.2.8
>> org.osgi.framework.BundleException: Exported package names cannot be zero 
>> length.
>>      at 
>> org.apache.felix.framework.util.manifestparser.ManifestParser.normalizeExportClauses(ManifestParser.java:876)
>>      at 
>> org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:215)
>>      at 
>> org.apache.felix.framework.ExtensionManager.<init>(ExtensionManager.java:261)
>>      at org.apache.felix.framework.Felix.<init>(Felix.java:429)
>>      at 
>> org.apache.felix.framework.FrameworkFactory.newFramework(FrameworkFactory.java:28)
>>      at org.apache.karaf.main.Main.launch(Main.java:256)
>>      at org.apache.karaf.main.Main.main(Main.java:178)
>> 
>> 
>> I understand there is an empty package export (two consecutive commas in red 
>> color above),  but I don?t know where it is coming from. Any ideas?
>> 
>> Best regards,
>> Alex soto
>> 
>> 
>> 
>> 
>> 
>> 
> 

Reply via email to