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

Support jakarta.servlet naming over javax.servlet #2260

Closed
Edwardiv1 opened this issue Feb 13, 2023 · 17 comments · Fixed by #2484
Closed

Support jakarta.servlet naming over javax.servlet #2260

Edwardiv1 opened this issue Feb 13, 2023 · 17 comments · Fixed by #2484
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@Edwardiv1
Copy link

I'd like to upgrade to newer versions of JakartaEE/JavaEE, but the package names have changed from javax.servlet to jakarta.servlet, so the Google Client SDK won't run (class not found errors).

This request is for the new Jakarta package names to be supported.

@JoeWang1127 JoeWang1127 added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. priority: p3 Desirable enhancement or fix. May not be included in next release. labels Feb 16, 2023
@ludoch
Copy link

ludoch commented Dec 6, 2023

By the way, Google App Engine Java21 now supports the Jakarta names. See https://twitter.com/ludoch/status/1732519005288796264

@ragnor
Copy link

ragnor commented Jan 15, 2024

When support of jakarta can be expected? It blocks migration from Spring Boot 2.x to 3.x

@Edwardiv1
Copy link
Author

Edwardiv1 commented Jan 23, 2024

Does anyone know of a workaround for this issue? Doesn't look like it's high on Google's priority list.

@suztomo
Copy link
Member

suztomo commented May 2, 2024

@Edwardiv1 I ran sample project in Jakarta 10 EE and it just worked fine to use google-api-java-client. Would you share a simple Servlet example that fails due to ClassNotFound error?

@ludoch
Copy link

ludoch commented May 2, 2024

Every where you see javax.servlet.* in https://github.com/search?q=repo%3Agoogleapis%2Fgoogle-api-java-client%20javax.servlet&type=code this library will not work on Jakarta web servers.

@ludoch
Copy link

ludoch commented May 2, 2024

For example, try to use google-api-client-servlet/src/main/java/com/google/api/client/googleapis/extensions/servlet/notifications/WebhookUtils.java with your Jarkata servlet request object and you'll see a ClassNotFound at runtime ( Java EE servers provide at runtime the servlet APIs, they should not be bundled with your app)

@suztomo
Copy link
Member

suztomo commented May 9, 2024

@Edwardiv1 @ragnor Are you using NotificationServlet or WebhookUtils that appear in the search query ludoch's comment?

@ragnor
Copy link

ragnor commented May 9, 2024 via email

@suztomo
Copy link
Member

suztomo commented May 9, 2024

@ragnor Thank you. Pardon my ignorance, but is there any document that recommends you to use the WebhookUtils class? Understanding usages helps prioritization.

@suztomo
Copy link
Member

suztomo commented May 9, 2024

@Edwardiv1 Thank you. Yes, these servlet classes are in a different repository. Follow googleapis/google-oauth-java-client#1112.

@Edwardiv1
Copy link
Author

I see. Thanks. That other link was filed just last week - I suppose that means they might get a response next year sometime.

@suztomo
Copy link
Member

suztomo commented May 10, 2024

@Edwardiv1 We released google-oauth-client-servlet 1.36.0. Would you try the new classes in the new "jakarta" package?
See https://github.com/googleapis/google-oauth-java-client/releases/tag/v1.36.0 for the class names.

@suztomo
Copy link
Member

suztomo commented May 13, 2024

@ragnor Do you use WebhookUtils for Google Drive? https://developers.google.com/drive/api/guides/push

@ragnor
Copy link

ragnor commented May 13, 2024 via email

@suztomo
Copy link
Member

suztomo commented May 13, 2024

I just wanted to confirm the use cases. Thank you. I'll get back to you soon.

@ragnor
Copy link

ragnor commented May 13, 2024 via email

suztomo added a commit that referenced this issue May 24, 2024
Fixes #2260

Copied the implementation with the jakarta.servlet namespace
using the same methology as googleapis/google-oauth-java-client#1115.

- Replaced javax with jakarta and declared the dependency with
  provided scope.
- Keeping the classes as `Beta` annotated.
- No tests exist for the classes.
- Added `@since 2.6.0` as the last release was 2.5.1.
suztomo added a commit that referenced this issue May 24, 2024
* feat: WebHookUtil classes using the jakarta namespace

Fixes #2260

Copied the implementation with the jakarta.servlet namespace
using the same methology as googleapis/google-oauth-java-client#1115.

- Replaced javax with jakarta and declared the dependency with
  provided scope.
- Keeping the classes as `Beta` annotated.
- No tests exist for the classes.
- Added `@since 2.6.0` as the last release was 2.5.1.

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants