karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Dolan (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (KARAF-860) bootdelegation to com.sun.* seems to block com.sun.codemodel package from jaxb-xjc
Date Wed, 21 Sep 2011 14:41:09 GMT

     [ https://issues.apache.org/jira/browse/KARAF-860?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Chris Dolan resolved KARAF-860.

    Resolution: Not A Problem

It turns out this was all just programmer error. I had my jars at different OSGi startlevels,
and the impl jar I wanted simply was not activated yet. When I delayed my initialization,
everything started working as expected. The bootdelegation issue was a red herring.

Thank you for all the help, and sorry for the misleading questions.

> bootdelegation to com.sun.* seems to block com.sun.codemodel package from jaxb-xjc
> ----------------------------------------------------------------------------------
>                 Key: KARAF-860
>                 URL: https://issues.apache.org/jira/browse/KARAF-860
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-core
>    Affects Versions: 2.2.2
>         Environment: JDK 1.6.0_26, Equinox
>            Reporter: Chris Dolan
>            Assignee: Freeman Fang
>            Priority: Minor
> This may be just user error or configuration error. If so I apologize in advance...
> In etc/config.properties, the org.osgi.framework.bootdelegation property includes com.sun.*.
I'm using CXF+JAXB for my JAX-RS implementation via Talend Service Factory. The jaxb feature
is like this:
>     <feature name='cxf-jaxb' version='' resolver='(obr)'>
>         <feature version="2.4.2">cxf-specs</feature>
>         <bundle start-level='20'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl/</bundle>
>         <bundle start-level='20'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-xjc/</bundle>
>     </feature>
> The problem is that jaxb-xjc includes classes in com.sun.*, specifically the one that
I need: com.sun.codemodel.JCodeModel
> If I look at the bundle console for CXF (http://localhost:8080/system/console/bundles/160)
I see this: "com.sun.codemodel,version=0.0.0 from org.apache.servicemix.bundles.jaxb-xjc (123)
-- Overwritten by Boot Delegation"
> That leads to this failure in my CXF code generator:
> ...
> Caused by: java.lang.reflect.UndeclaredThrowableException: null
> 	at $Proxy106.build(Unknown Source) ~[na:na]
> 	at org.apache.cxf.jaxrs.ext.codegen.SourceGenerator.generateClassesFromSchema(SourceGenerator.java:821)
> 	... 42 common frames omitted
> Caused by: java.lang.NoSuchMethodException: com.sun.codemodel.JCodeModel.build(java.lang.Object)
> 	at java.lang.Class.getMethod(Class.java:1605) ~[na:1.6.0_26]
> 	at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:50)
> 	... 44 common frames omitted
> I tried to test removing "com.sun.*" from bootdelegation, but I got other problems so
I couldn't verify if that change would resolve the problem.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message