JB, here’s the scr .xml. I will try to put together simplified bundle that
exhibits the behavior by the weekend.
Thx, Scott
http://www.osgi.org/xmlns/scr/v1.3.0;
name="com.medline.bam.schedule.ScheduleFactory" immediate="true">
From: Jean-Baptiste Onofre
Sent: Monday, December 14, 2020 11:25 PM
To: user@karaf.apache.org
Subject: Re: Karaf 4.3.0: Bundles don't resolve because of unsatisfied java.*
packages
CAUTION: This email originated from outside of the organization. Do not click
links or open attachments unless you recognize the sender and know the content
is safe.
Hi,
The MANIFEST doesn’t look good to me. For instance, Private-Package doesn’t
really exists from a framework standpoint.
A the issue comes directly from the framework when it tries to load the bundle
(nothing related with Karaf here), and I don’t see java.lang import at all in
your bundle. Can you check the content of SCR XML ?
You mentioned you didn’t change etc/jre.properties or etc/config.properties, so
java.lang is exported by bundle 0 for sure (the framework).
IMHO, something wrong with bndtools here (I don’t use it).
Can you create a very simple bundle with bndtools and provide to me ? I will
test.
Regards
JB
Le 15 déc. 2020 à 01:21, Leschke, Scott
mailto:slesc...@medline.com>> a écrit :
Today, I tried to update one of the bundle on my 4.2.8 installation (my
production). This if running on Java 1.8 on Windows. It failed to deploy with
the following :
2020-12-14T12:14:57,125 | ERROR | fileinstall-C:/BAM | Felix
| 5 - org.ops4j.pax.logging.pax-logging-api - 1.11.4 | Bundle
medline.bam.schedule [167] Unable to update the bundle.
(org.osgi.framework.BundleException: Importing java.* packages not allowed:
java.lang)
org.osgi.framework.BundleException: Importing java.* packages not allowed:
java.lang
at
org.apache.felix.framework.util.manifestparser.ManifestParser.normalizeImportClauses(ManifestParser.java:349)
~[org.apache.felix.framework-5.6.12.jar:?]
at
org.apache.felix.framework.util.manifestparser.ManifestParser.(ManifestParser.java:181)
~[org.apache.felix.framework-5.6.12.jar:?]
at
org.apache.felix.framework.BundleRevisionImpl.(BundleRevisionImpl.java:117)
~[org.apache.felix.framework-5.6.12.jar:?]
at
org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1282)
~[org.apache.felix.framework-5.6.12.jar:?]
at
org.apache.felix.framework.BundleImpl.revise(BundleImpl.java:1219)
~[org.apache.felix.framework-5.6.12.jar:?]
at
org.apache.felix.framework.Felix.updateBundle(Felix.java:2388)
[org.apache.felix.framework-5.6.12.jar:?]
….
What this and the issue using 4.3.0 have is that I’m using BndTools 5.2.0 in
both to generate my bundles. This is the manifest of the bundle that failed.
Looks OK to me but perhaps there’s something subtle that shouldn’t be there?
All input appreciated.
Regards,
Scott
Manifest-Version: 1.0
Bnd-LastModified: 1607977206683
Bundle-ManifestVersion: 2
Bundle-Name: Medline BAM Model Schedule
Bundle-SymbolicName: medline.bam.schedule
Bundle-Version: 1.0.0.202012142020
Created-By: 14.0.2 (Oracle Corporation)
Export-Package: com.medline.bam.api;version="1.0.0";uses:="com.medline
.bam.api.metric,com.medline.bam.api.provider,com.medline.bam.api.repo
rt,com.medline.util.model.identifier,com.medline.util.query.jdbc,com.
medline.util.service,org.slf4j",com.medline.bam.api.metric;version="1
.0.0";uses:="com.medline.bam.api.provider",com.medline.bam.api.provid
er;version="1.0.0";uses:="com.medline.bam.api,com.medline.bam.api.met
ric,com.medline.bam.api.rule,com.medline.bam.api.schedule,com.medline
.util.query.api,com.medline.util.service,org.slf4j",com.medline.bam.a
pi.report;version="1.0.0";uses:="com.medline.bam.api,com.medline.util
.query.api,com.medline.util.query.http,com.medline.util.query.jdbc,co
m.medline.util.service",com.medline.bam.api.rule;version="1.0.0";uses
:="com.medline.bam.api,com.medline.bam.api.metric,com.medline.bam.api
.provider,com.medline.bam.api.schedule",com.medline.bam.api.schedule;
version="1.0.0";uses:="com.medline.util.model"
Git-Descriptor: 23996f2-dirty
Git-SHA: 23996f202ab9237416af1a4c35c209751d907c47
Import-Package: com.medline.bam.api;version="[1.0,2)",com.medline.bam.
api.metric;version="[1.0,2)",com.medline.bam.api.provider;version="[1
.0,2)",com.medline.bam.api.report;version="[1.0,2)",com.medline.bam.a
pi.rule;version="[1.0,2)",com.medline.bam.api.schedule;version="[1.0,
2)",com.medline.util,com.medline.util.model;version="[1.0,2)",com.med
line.util.model.identifier;version="[1.0,2)",com.medline.util.query.a
pi,com.medline.util.query.http,com.medline.util.query.jdbc,com.medlin
e.util.service,org.apache.commons.lang3;version="[3.4,4)",org.slf4j
Private-Package: com.medline.bam.schedule
Provide-Capability: osgi.service;objectClass:List="com.medline