fix(#709): add missing org.springframework.http OSGi import in camel-cxf-all - #720
Open
jbonofre wants to merge 1 commit into
Open
fix(#709): add missing org.springframework.http OSGi import in camel-cxf-all#720jbonofre wants to merge 1 commit into
jbonofre wants to merge 1 commit into
Conversation
…camel-cxf-all CXF's org.apache.cxf.jaxrs.springmvc.SpringWebUtils references org.springframework.http.server.observation.ServerRequestObservationContext, but camel-cxf-all only imported org.springframework.web* (and other specific Spring sub-packages), not org.springframework.http*. This caused a runtime NoClassDefFoundError / ClassNotFoundException for that class. Add org.springframework.http* as an optional, versioned import, consistent with the other optional Spring imports in this bundle.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds the missing
org.springframework.http*OSGi package import to thecamel-cxf-allbundle.Fixes #709.
Why
With the CXF version bundled in 4.18,
org.apache.cxf.jaxrs.springmvc.SpringWebUtilsreferencesorg.springframework.http.server.observation.ServerRequestObservationContext(Spring 6 / Micrometer observability). At runtime this failed with:camel-cxf-allenumerates specific Spring sub-packages in<camel.osgi.import>(aop,beans,context,core,util,web) but did not importorg.springframework.http*. That package is a sibling oforg.springframework.web, soorg.springframework.web*does not cover it — the package was never wired and the class could not be found.Note
camel-cxf-spring-allis unaffected because it imports theorg.springframework*wildcard.Change
org.springframework.http*;resolution:=optional;version="${camel-osgi-spring-version}",Marked
resolution:=optionaland versioned, consistent with the other optional Spring imports in this bundle (these Spring integrations are only used when Spring is on the classpath).Verification
Built the module and confirmed the generated
META-INF/MANIFEST.MFnow includes the required package:Scope
Karaf-specific packaging/OSGi-metadata delta only; no Camel-core change.