Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add jaxb integration test #515

Merged
merged 6 commits into from
Oct 10, 2024
Merged

Conversation

stataru8
Copy link
Collaborator

Fixes #514: Add an integration test for camel-jaxb and fix the feature if needed

}).log("Will marshal: ${body}")
.marshal("jaxbBean")
.log("Marshal: ${body}")
.toF("mock:%s", getResultMockName());
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the reason why I added these extra tests here:


... since the exect same input is being tested here:

Should I rectify my jaxson and jacksonxml tests in this PR?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree that you could keep only the mock.expectedBodiesReceived(JSON_SAMPLE);

<bundle dependency="true">mvn:com.sun.istack/istack-commons-runtime/${auto-detect-version}</bundle>
<bundle dependency="true">mvn:org.glassfish.jaxb/jaxb-core/${glassfish-jaxb-runtime-version}</bundle>
<bundle dependency='true'>mvn:org.glassfish.jaxb/jaxb-runtime/${glassfish-jaxb-runtime-version}</bundle>
<bundle>mvn:org.glassfish.hk2/osgi-resource-locator/${osgi-resource-locator-version}</bundle>
Copy link
Collaborator Author

@stataru8 stataru8 Sep 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

camel-jaxb + @XmlRootElement refuse to work without org.glassfish.jaxb/jaxb-runtime.
According to the last item, "Preferred JAX-B implementation", in https://camel.apache.org/manual/camel-4x-upgrade-guide-4_8.html we should use glassfish.

Ref to the libraries added: https://central.sonatype.com/artifact/org.glassfish.jaxb/jaxb-core/4.0.5. org.glassfish.hk2/osgi-resource-locator appears to be the equivalent of com.sun.xml.bind/jaxb-osgi.

I'm not sure if I'm still missing something, because in the jaxb test I seeing this log:

2024-09-30T20:12:43,861 | INFO  | RMI TCP Connection(4)-127.0.0.1 | StaxConverter                    | 70 - camel-xml-jaxp - 4.8.0.SNAPSHOT | Created XMLInputFactory: com.sun.xml.internal.stream.XMLInputFactoryImpl@3af22731. DOMSource/DOMResult may have issues with com.sun.xml.internal.stream.XMLInputFactoryImpl@3af22731. We suggest using **Woodstox.**

Copy link
Collaborator Author

@stataru8 stataru8 Oct 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stataru8 stataru8 added the help wanted Extra attention is needed label Oct 1, 2024
@stataru8 stataru8 marked this pull request as ready for review October 3, 2024 17:24
@@ -1617,6 +1618,7 @@
<bundle>mvn:org.apache.camel.karaf/camel-javascript/${project.version}</bundle>
</feature>
<feature name='camel-jaxb' version='${project.version}' start-level='50'>
<feature prerequisite="true">spifly</feature>
Copy link
Collaborator Author

@stataru8 stataru8 Oct 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added to fix the warning from https://github.com/apache/camel-karaf/pull/515/files#r1782774809.

A consequence of adding this is that the test works fine without the changes mentioned here https://github.com/apache/camel-karaf/pull/515/files#r1781629096

@stataru8 stataru8 force-pushed the stataru/fix/camel-jaxb branch from 9a360e8 to b2afeef Compare October 4, 2024 17:21
@stataru8 stataru8 removed the help wanted Extra attention is needed label Oct 9, 2024
Copy link
Contributor

@essobedo essobedo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@essobedo essobedo merged commit 5a22fac into apache:main Oct 10, 2024
1 check passed
@essobedo essobedo deleted the stataru/fix/camel-jaxb branch October 10, 2024 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add camel-jaxb integration test
3 participants