[
https://issues.apache.org/jira/browse/FELIX-6397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jean-Baptiste Onofré resolved FELIX-6397.
-----------------------------------------
Resolution: Fixed
> Utils ResourceBuilder should export all packages
> ------------------------------------------------
>
> Key: FELIX-6397
> URL: https://issues.apache.org/jira/browse/FELIX-6397
> Project: Felix
> Issue Type: Bug
> Components: Utils
> Affects Versions: utils-1.11.6
> Reporter: Jean-Baptiste Onofré
> Assignee: Jean-Baptiste Onofré
> Priority: Major
> Fix For: utils-1.11.8
>
>
> The current {{utils}} {{ResourceBuilder}} doesn't allow to export {{java.*}}
> packages. However, since R7, the framework is supposed to export {{java.*}}
> packages.
> In Karaf, when we do that in {{system.packages}}, it fails with:
> {code:java}
> org.osgi.framework.BundleException: Unable to build resource for System
> Bundle: Exporting java.* packages not allowed: java.applet
> at
> org.apache.felix.utils.resource.ResourceBuilder.build(ResourceBuilder.java:82)
> at
> org.apache.felix.utils.resource.ResourceBuilder.build(ResourceBuilder.java:67)
> at
> org.apache.karaf.features.internal.region.SubsystemResolver.prepare(SubsystemResolver.java:180)
> at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:383)
> at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1062)
> at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: org.osgi.framework.BundleException: Exporting java.* packages not
> allowed: java.applet
> at
> org.apache.felix.utils.resource.ResourceBuilder.normalizeExportClauses(ResourceBuilder.java:709)
> at
> org.apache.felix.utils.resource.ResourceBuilder.doBuild(ResourceBuilder.java:206)
> at
> org.apache.felix.utils.resource.ResourceBuilder.build(ResourceBuilder.java:80)
> ... 9 more {code}
> Actually, {{utils}} should not test if package is part of {{java.*}}:
> [https://github.com/apache/felix-dev/blob/master/utils/src/main/java/org/apache/felix/utils/resource/ResourceBuilder.java#L705]
> {code:java}
> if (pkgName.startsWith("java.")) {{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)