You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2015/05/12 17:14:00 UTC

[jira] [Updated] (KARAF-3722) Feature resolver change bundles package export

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

Daniel Kulp updated KARAF-3722:
-------------------------------
    Attachment: testcase.tar.gz

The fix gnodet did fixes the "display" but doesn't actually fix the problem.   A client that hits the service will get the NoClassDefFound stuff.

I've attached a somewhat-bigger-than-I-wanted test case.   Build the two projects in it.  The start a clean karaf and do:

{code}
feature:repo-add cxf 3.1.1-SNAPSHOT
feature:install cxf
feature:install cxf-sts

install -s mvn:org.talend.cxf-examples.jaxws-ws-secpol/ws-secpol-common/1.0
install -s mvn:org.talend.cxf-examples.jaxws-ws-secpol/ws-secpol-server/1.0
install -s mvn:org.talend.cxf-examples.jaxws-cxf-sts-advanced/jaxws-cxf-sts-advanced-sts/1.0
install -s mvn:org.talend.cxf-examples.jaxws-cxf-sts-advanced/jaxws-cxf-sts-advanced-wsp/1.0
install -s mvn:org.talend.cxf-examples.jaxws-ws-secpol/ws-secpol-client/1.0
{code}

That should get a WORKING sample up and running.  You should see something like "server responded with: Hello dkulp" on the console.  A "log:display" should see some soap messages going back and forth and such.

Now, stop the last bundle (ws-secpol-client) and then do:
{code}
feature:install spring-web/3.2.11.RELEASE_1
{code}
That seems to trigger a large refresh since that adds spring and thus CXF gets refreshed to include spring (I think).    Now start the ws-secpol-client bundle again.   It won't get the above line.  A log:display shows some stack traces.  The important one being:

{code}
Caused by: java.lang.ClassNotFoundException: org.opensaml.saml.common.SAMLVersion not found by org.apache.cxf.cxf-rt-ws-security [93]
	at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1558)[org.apache.felix.framework-5.0.0.jar:]
	at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)[org.apache.felix.framework-5.0.0.jar:]
	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1998)[org.apache.felix.framework-5.0.0.jar:]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)[:1.7.0_71]
{code}

which shows that the bundle classloader for the cxf-rt-ws-security does not have access to the OpenSAML stuff that it needs.

> Feature resolver change bundles package export
> ----------------------------------------------
>
>                 Key: KARAF-3722
>                 URL: https://issues.apache.org/jira/browse/KARAF-3722
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-feature
>    Affects Versions: 4.0.0.M3
>            Reporter: Jean-Baptiste Onofré
>            Priority: Blocker
>             Fix For: 4.0.0.M3
>
>         Attachments: testcase.tar.gz
>
>
> With latest 4.0.0-SNAPSHOT, when we code:
> {code}
> feature:repo-add cxf 3.1.1-SNAPSHOT
> feature:install cxf
> {code}
> and check the exports of the CXF security bundle (with bundle ID 93 on my box), we have:
> {code}
> imports -b 93
> org.opensaml.saml.common                       | [3.1.0,4.0.0) | resolved | 93 | org.apache.cxf.cxf-rt-ws-security
> org.opensaml.saml.saml1.core                   | [3.1.0,4.0.0) | resolved | 93 | org.apache.cxf.cxf-rt-ws-security
> org.opensaml.saml.saml2.core                   | [3.1.0,4.0.0) | resolved | 93 | org.apache.cxf.cxf-rt-ws-security
> …..
> net.sf.ehcache                                 | [2.5.0,3.0.0) | resolved | 93 | org.apache.cxf.cxf-rt-ws-security
> net.sf.ehcache.config                          | [2.5.0,3.0.0) | resolved | 93 | org.apache.cxf.cxf-rt-ws-security
> {code}
> Now, we install the cxf-sts feature and do the same thing:
> {code}
> feature:install cxf-sts
> imports -b 93
> {code}
> the optional imports are no longer resolver (causing NoClassDefFound cxf-rt-ws-security for instance).
> It looks like the resolver change the export/resolution.
> It's an important regression IMHO that we have to address.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)