cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Dolan (Created) (JIRA)" <>
Subject [jira] [Created] (CXF-4058) If CXF is last in Karaf feature list, endpoints aren't bound
Date Mon, 23 Jan 2012 22:05:40 GMT
If CXF is last in Karaf feature list, endpoints aren't bound

                 Key: CXF-4058
             Project: CXF
          Issue Type: Bug
          Components: OSGi
    Affects Versions: 2.5
         Environment: Talend Service Factory (Karaf 2.2.4, CXF 2.5.0)
            Reporter: Chris Dolan
            Priority: Minor

[I apologize in advance that this bug report has a lot of guesswork in it. I've found a workaround
so I've marked this as "Minor", but it took me a week to find my workaround and I can't figure
where the root cause is.]

If I write my "featuresBoot" property in org.apache.karaf.features.cfg like this, everything


But if I (accidentally) move my feature to the front of the list like so:


then I get 404's for the resources and "No services have been found." on the CXF services

My custom feature contains a JAX-RS application which is bootstrapped with a META-INF/spring/beans.xml
file containing beans roughly like this:

    <jaxrs:server id="admin" address="/path/to/my/application">
            <ref bean="traceInboundStart"/>
            <ref bean="traceOutboundDone"/>
        <jaxrs:serviceBeans >
            <ref bean="mySvc"/>
            <ref bean="jaxRsAuthFilter"/>

Reloading the bundles in "my-custom-feature" fixes the problem (the WADL links appear on the
services list and the endpoint URLs respond correctly). In both scenarios ("my-custom-feature"
at the front or back of the featuresBoot list), the log messages seem to be nearly identical.

A really confusing part is that in *both* cases, I see this log message which seems to suggest

[INFO] Setting the server's publish address to be /path/to/my/application
logger = org.apache.cxf.endpoint.ServerImpl
thread = SpringOsgiExtenderThread-2

So, clearly CXF is getting the JAX-RS application successfully, but somehow that's not being
mapped all the way through to the OSGi HTTP service.

The only other logs that appear relevant appear to be these:

[INFO] SPI-Provider Manifest header found in bundle: org.apache.cxf.bundle
[INFO] Binding bundle: [org.apache.cxf.bundle_2.5.0 [191]] to http service

Those happen just before the "Setting the server's publish address..." message but after the
Spring "Found mandatory OSGi service for bean..." resolution messages in the failing scenario.

I request either 1) a fix so the CXF feature is order independent or 2) a troubleshooting
log message to indicate that the resources are bound too late to help others diagnose this
problem more quickly.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message