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

Jakarta EE compatible release #112

Closed
davsclaus opened this issue Jan 12, 2023 · 9 comments
Closed

Jakarta EE compatible release #112

davsclaus opened this issue Jan 12, 2023 · 9 comments

Comments

@davsclaus
Copy link

Hi

Apache Camel has datasonnet integration and we are working on Camel v4 which is upgrading to JEE 10 (javax -> jakarta) and we can see that camel-datasonnet fails with datasonnet 2.2.0 due to


java.lang.NoClassDefFoundError: javax/xml/bind/JAXBElement

	at com.datasonnet.plugins.DefaultJavaFormatPlugin.<clinit>(DefaultJavaFormatPlugin.java:60)
	at com.datasonnet.spi.DataFormatService.<clinit>(DataFormatService.java:30)
	at com.datasonnet.MapperBuilder.<init>(MapperBuilder.java:38)

I wonder if you plan to do a release that supports Jakarta EE spec or can find a way to make a release support both javax and jakarta ee, eg its in this code

module.addSerializer(JAXBElement.class, new JAXBElementSerializer());

Maybe you can try to detect if its javax or jakarta ee for that serializer

@davsclaus
Copy link
Author

Link to Apache Camel JIRA ticket: https://issues.apache.org/jira/browse/CAMEL-18907

@javaduke
Copy link
Contributor

Hmm, yes, this feature was added so that Datasonnet can support and map wsdl-generated objects. I'm honestly not sure what would be the best course of action here, because we need to maintain backwards compatibility.

@davsclaus
Copy link
Author

Yeah I am not sure how other projects do it, thought I have seen some use maven shade plugin to search/replace and build a -jakarta JAR ala
https://github.com/apache/shiro/pull/522/files

@javaduke
Copy link
Contributor

Yep, thanks, Claus, I guess I will have to release two separate versions, at least for the time being.
What is the deadline for this? There are several outstanding issues I would like to address in the new release, just want to know how much time can I spend on them.

@davsclaus
Copy link
Author

Camel 4.0 GA is April/May but if we are really speedy then it may be as fast as late March

@davsclaus
Copy link
Author

But camel-datasonnet can be added back to 4.x when its jakarta ready, eg in 4.1 or 4.2 etc.

@javaduke
Copy link
Contributor

Ah, good, then I guess I have time. I'll try to wrap up everything in two-three weeks from now, the goal is to have a new release by February 1st (or earlier, if I'm lucky :)

@javaduke
Copy link
Contributor

Well, I addressed all the outstanding issues I mentioned, but I still cannot figure out how to make a release. The problem is that the datasonnet Java code imports javax.xml.bind.JAXBElement so even if I add jakarta 4 as a dependency and use the shade plugin, the resulting jar won't be compatible with both versions of Camel. Seems like I need to find a way to maintain two separate submodules...

@javaduke
Copy link
Contributor

OK, the new version is out there, the version number is 2.5-jakarta4.

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

No branches or pull requests

2 participants