Yes, there's a decision to make in such a case.
Either you import the package (and you need the JVM to export it which
can be done through modifying etc/jre.properties)
or you boot delegate (so you don't import the package and you need to
change the bootdelegation property).
A third case would be to import the package and deploy a bundle such
as jaxp 1.4 implementation.

I think the first thing to do if you control the code, is to verify
why you have a dependency on an implementation and if you can't just
use the XML apis instead.

On Thu, Apr 7, 2011 at 23:52, David Jencks <[email protected]> wrote:
> I ran into some related problems that I wasn't able to resolve clearly.
>  There's also the
> org.osgi.framework.bootdelegation=org.apache.karaf.jaas.boot,sun.*,com.sun.*,javax.transaction,javax.transaction.*
> in config.properties that IIUC ought to force these classes to be loaded
> from the jvm no matter how the bundle is wired.
> Does maven-bundle-plugin generate an Import-Package for these packages?  If
> it does, what happens if you don't modify the custom.properties but get
> m-b-p to not try to import them with
> <Import-Package>!com.sun.org.apache.*,*</Import-Package>
> ?
> Comments from anyone with a better understanding of how this works would be
> great...
> thanks
> david jencks
> On Apr 7, 2011, at 1:29 PM, Cristiano Gavião wrote:
>
> Hummm... got it... :-D
>
> For those people that don't know yet , you have to edit the
> etc/custom.properties file and put the missing packges there on this
> property:
>
> org.osgi.framework.system.packages.extra = \
> com.sun.org.apache.xml.internal.utils; \
> com.sun.org.apache.xpath.internal;\
>
> cheers
>
> Cristiano
>
> On 07/04/11 16:56, Cristiano Gavião wrote:
>
> Hi again,
>
> I'm now with a problem that I don't know how to deal... and need a little
> help.
>
> I've used maven-bundle-plugin to turn my package osgi able with this config:
>
>
> <instructions>
>
>  <Export-Package>org.jb.osgi.core.services</Export-Package>
>
> <Private-Package>org.jb.osgi.core.services.impl</Private-Package>
>
>  <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
>
>  <Embed-Dependency>*;scope=compile|runtime;inline=false</Embed-Dependency>
>                         <_exportcontents>org.jb.core.*</_exportcontents>
>                         <Embed-Transitive>true</Embed-Transitive>
>                     </instructions>
>
> the compile was ok, but when I try to install it on Karaf I get this error:
>
> Error executing command: Unresolved constraint in bundle jbehave-osgi-core
> [88]: Unable to resolve 88.0: missing requirement [88.0] package;
> (package=com.sun.org.apache.xml.internal.utils)
>
> well, if I'm not wrong, this package is a JDK 6 (macOS default) internal
> one.
>
> So, how should I teach karaf to get it from JDK6 ?
>
> thanks
>
> Cristiano
>
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Reply via email to