Rudi Wijaya created CXF-4553: -------------------------------- Summary: jaxrs:server in OSGi Blueprint does not automatically start after cxf bundle is stopped/refreshed Key: CXF-4553 URL: https://issues.apache.org/jira/browse/CXF-4553 Project: CXF Issue Type: Bug Components: JAX-RS, OSGi Affects Versions: 2.6.2 Environment: Karaf Karaf version 2.3.0-SNAPSHOT Karaf home /home/rudi/git/bippo-commerce5/karaf Karaf base /home/rudi/git/bippo-commerce5/karaf OSGi Framework org.apache.felix.framework - 4.0.3
JVM Java Virtual Machine OpenJDK 64-Bit Server VM version 23.2-b09 Version 1.7.0_07 Vendor Oracle Corporation Uptime 1 hour 59 minutes Total compile time 39.663 seconds Threads Live threads 75 Daemon threads 61 Peak 108 Total started 1307 Memory Current heap size 83,067 kbytes Maximum heap size 466,048 kbytes Committed heap size 164,608 kbytes Pending objects 0 Garbage collector Name = 'PS Scavenge', Collections = 1677, Time = 8.353 seconds Garbage collector Name = 'PS MarkSweep', Collections = 2, Time = 0.480 seconds Classes Current classes loaded 12,902 Total classes loaded 12,992 Total classes unloaded 90 Operating system Name Linux version 3.2.0-31-generic Architecture amd64 Processors 4 Reporter: Rudi Wijaya Test case, simple JAX-RS resource using OSGi Blueprint: {code} <cxf:bus> <cxf:features> <cxf:logging /> </cxf:features> </cxf:bus> <jaxrs:server id="requireServer" address="/require"> <jaxrs:serviceBeans> <bean class="org.soluvas.web.backbone.RequireResource"> <argument ref="jsModules"/> <argument ref="jsShims"/> </bean> </jaxrs:serviceBeans> </jaxrs:server> {code} 1. The JAX-RS resource can now be accessed normally. 2. Refresh the 'org.apache.cxf.cxf-api' bundle : {code} karaf@root> list -s -t 0 | grep cxf [ 225] [Active ] [Created ] [ ] [ 40] org.apache.cxf.cxf-api (2.6.2) [ 226] [Active ] [Created ] [ ] [ 40] org.apache.cxf.cxf-rt-core (2.6.2) [ 227] [Active ] [ ] [ ] [ 40] org.apache.cxf.cxf-rt-management (2.6.2) [ 228] [Active ] [Created ] [ ] [ 40] org.apache.cxf.karaf.cxf-karaf-commands (2.6.2) [ 230] [Active ] [Created ] [ ] [ 40] org.apache.cxf.cxf-rt-transports-http (2.6.2) [ 232] [Active ] [ ] [ ] [ 40] org.apache.cxf.cxf-rt-bindings-xml (2.6.2) [ 233] [Active ] [ ] [ ] [ 40] org.apache.cxf.cxf-rt-rs-extension-providers (2.6.2) [ 234] [Active ] [ ] [ ] [ 40] org.apache.cxf.cxf-rt-rs-extension-search (2.6.2) [ 235] [Active ] [Created ] [ ] [ 40] org.apache.cxf.cxf-rt-frontend-jaxrs (2.6.2) [ 236] [Active ] [ ] [ ] [ 40] org.apache.cxf.cxf-rt-databinding-jaxb (2.6.2) [ 340] [Active ] [Created ] [ ] [ 80] com.soluvas.cxf (1.0.0.SNAPSHOT) karaf@root> refresh 225 You are about to access system bundle 225. Do you wish to continue (yes/no): yes {code} 3. Accessing the JAX-RS resource now gives error: {code} No service was found. {code} Workaround: refresh the affected bundles. The JAX-RS resource is now back up again. However, it shouldn't be necessary. jaxrs:server should depend properly on CXF, if CXF is down then it is down, if CXF is up then the JAX-RS server should be up automatically. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira