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

Switch from javax.jms.* to jakarta.jms.* to support Spring Boot 3 #155

Closed
simonDeHero opened this issue Dec 23, 2022 · 18 comments
Closed

Switch from javax.jms.* to jakarta.jms.* to support Spring Boot 3 #155

simonDeHero opened this issue Dec 23, 2022 · 18 comments

Comments

@simonDeHero
Copy link

Hi there,
i just tried to upgrade our app from Spring Boot 2.5.13 to 3.0.1. It turned out, that spring-jms:6.0.3 expects some classes to be in jakarta.jms package, not in javax.jms anymore. E.g. ConnectionFactory, JMSException, Message or Session. This basically prevents me from upgrading to Spring Boot 3 now.

Those classes are provided transitively by amazon-sqs-java-messaging-lib:1.1.0, via the geronimo-jms dependency.

Do you have any plans to switch to jakarta package any time soon?

thx a lot!

@lena-pattern
Copy link

Hi,
we have exact same issue.

We use the amazon-sqs-java-messaging-lib in almost of our microservices. We tried to upgrade to Spring Boot 3, but even the latest versions of amazon-sqs-java-messaging-lib do not support Jakarta EE 9 APIs (that Spring Boot 3 uses in JMS implementation). Meaning current amazon-sqs-java-messaging-lib depends on javax.jms.* and not jakarta.jms.*, preventing us from upgrading to Spring Boot 3 (just like the OP).

Is there a roadmap for producing Spring Boot 3 compatible version?

Thanks a lot!

@mauriciosolla
Copy link

I got the same issue here. Any expectation for the switch to jakarta.jms?

@okohub
Copy link

okohub commented Jan 9, 2023

Up!

+1

@volkanto
Copy link
Contributor

volkanto commented Jan 9, 2023

maybe @ziyanli-amazon again can help us here?

@ziyanli-amazon
Copy link
Contributor

Yes, i will work on to either go back to geronimo-jms or jakarta.jms

@AlexRosier
Copy link

Same issue here

@ziyanli-amazon
Copy link
Contributor

Both v1 and v2 have been updated:
https://github.com/awslabs/amazon-sqs-java-messaging-lib/releases/tag/1.1.3
https://github.com/awslabs/amazon-sqs-java-messaging-lib/releases/tag/2.0.3

@armogur
Copy link
Contributor

armogur commented Jan 13, 2023

@ziyanli-amazon Hi, this isn't solved the mentioned issue, namely it is still in the javax.jms namespace, and not in the jakarta.jms.
I have a much more bigger patch, which updates not just to jakarta namespace but updates testing libraries, JDK to 17 (which is the minimum java version for SpringBoot 3).
If you think it worth to take a look at it let me know how can I share it.

@vghero
Copy link

vghero commented Jan 13, 2023

@ziyanli-amazon Hi, this isn't solved the mentioned issue, namely it is still in the javax.jms namespace, and not in the jakarta.jms.

Exactly :). So what some projects do, is provide a version with jakarta deps and a 2nd one with still javax - for the projects that don't want or can't move yet. Question is if one wants to maintain two versions....

To give more background: there has been a general shift from javax to jakarta since some time. That requires at least replacing all javax references from code to jakarta namespaces. The recent change on this lib here from geronimo to jms-api was perfectly fine - it introduced no breakage or so but just fixed the security issue warning. It's just that projects are more and more moving to jakarta and that requires that all dependent jars also move to jakarta namespace. Since Spring Boot did that with the recent 3 version and it's widely spread, a lot of projects moving to 3 will now require jakarta versions of their used dependencies.

@AlexRosier
Copy link

@ziyanli-amazon Hi, this isn't solved the mentioned issue, namely it is still in the javax.jms namespace, and not in the jakarta.jms. I have a much more bigger patch, which updates not just to jakarta namespace but updates testing libraries, JDK to 17 (which is the minimum java version for SpringBoot 3). If you think it worth to take a look at it let me know how can I share it.

This would be awesome I was working on the same thing myself since indeed the 2.0.3 version does not address the problem

@AlexRosier
Copy link

@armogur
Can you perhaps create a pull request with the code you have ?

@armogur
Copy link
Contributor

armogur commented Jan 16, 2023

@armogur Can you perhaps create a pull request with the code you have ?

It looks like many PRs are in waiting state, some are several years old, I think the AWS lab not really cares about to improve this library, but if someone at amazon asks me I will be happy to publish it.

@Trebuac
Copy link

Trebuac commented Jan 22, 2023

I'm interested by this one. It shouldn't have been closed as it doesn't fix the issue with old javax packages.
@armogur : is it possible to at least push your branch and create the PR ?

@okohub
Copy link

okohub commented Jan 22, 2023

@ziyanli-amazon can you check that package transformation process please?

Unfortunately, problem is not solved with changing only dependency. Import statements must be changed as well.

@armogur
Copy link
Contributor

armogur commented Jan 24, 2023

@Trebuac, @AlexRosier :
Here is my PR: #177

@lena-pattern
Copy link

@ziyanli-amazon Hello, is there any possibility to check that PR#177 mentioned in the comment above and merge in the library to make it publicly available? This will help many of us a lot. Thanks!!

@ziyanli-amazon
Copy link
Contributor

Yea, sorry for the late response. Will take a look

@ziyanli-amazon
Copy link
Contributor

#182

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

10 participants