Skip to content
New issue

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

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

Already on GitHub? # to your account

BugsnagImportSelector incorrectly selects "javax" classes in certain Java 21 scenarios #211

Closed
marco-tresch opened this issue Jan 14, 2024 · 4 comments
Labels
released This feature/bug fix has been released

Comments

@marco-tresch
Copy link

Describe the bug

We run our Spring MVC application in a Docker container based openjdk:21-slim. The Java runtime self-reports its version as 21, rather than e.g. 21.0, causing the BugsnagImportSelector to not recognise the Java version correctly.

Steps to reproduce

  1. Follow the basic Spring getting started guide in a Java 21 environment where java.version is set to a major version string only (e.g. 21 rather than 21.0)
  2. The applications fails to start with java.lang.ClassNotFoundException: javax.servlet.ServletRequestListener

Environment

Additional Details

It appears that BugsnagImportSelector#isJava17Compatible is unable to cope with major-only version strings, and instead falls back to the default version in such scenarios.

@clr182 clr182 added bug Confirmed bug backlog We hope to fix this feature/bug in the future labels Jan 25, 2024
@clr182
Copy link
Contributor

clr182 commented Jan 25, 2024

Hi @marco-tresch

Thank you for reaching out to us with this bug report. We now have an item on our backlog aimed at investigating this issue further. Once we have more information to share we will be sure to update you here via this ticket thread.

@mservidio
Copy link

I'm also running into the same issue, it's blocking from evaluating the product.

@TimotheeVille
Copy link

We're facing same issue as well with java 21 corretto. But providing the minor version does not solve the problem

@lemnik lemnik mentioned this issue Aug 29, 2024
@clr182 clr182 added released This feature/bug fix has been released and removed bug Confirmed bug backlog We hope to fix this feature/bug in the future labels Aug 29, 2024
@clr182
Copy link
Contributor

clr182 commented Aug 29, 2024

Hi 👋

We've just release a new version of the BugSnag Java notifier. The latest version should have a fix for your issues with the BugSnagImportSelector.

After updating to the latest, please let us know whether you are receiving any issues and we can investigate further.

@clr182 clr182 closed this as completed Aug 29, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
released This feature/bug fix has been released
Projects
None yet
Development

No branches or pull requests

4 participants