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

Java 17 reports illegal access to module #28293

Closed
ghost opened this issue Oct 11, 2021 · 2 comments
Closed

Java 17 reports illegal access to module #28293

ghost opened this issue Oct 11, 2021 · 2 comments
Labels
status: invalid An issue that we don't feel is valid

Comments

@ghost
Copy link

ghost commented Oct 11, 2021

When upgrading to Java 17 and running a spring application that works in Java 8, I get the following exception: (Spring boot 2.2.4.RELEASE)

aused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.servlet.Filter]: Factory method 'springSecurityFilterChain' threw exception; nested exception is java.lang.IllegalAccessError: class org.springframework.ldap.core.support.AbstractContextSource (in unnamed module @0x4abdb505) cannot access class com.sun.jndi.ldap.LdapCtxFactory (in module java.naming) because module java.naming does not export com.sun.jndi.ldap to unnamed module @0x4abdb505

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 11, 2021
@wilkinsona
Copy link
Member

Thanks for the report. Spring Boot 2.2.x does not support Java 17. It has also reached the end of its support period. If you want to use Spring Boot with Java 17, you should upgrade to Spring Boot 2.5.x.

@wilkinsona wilkinsona added status: invalid An issue that we don't feel is valid and removed status: waiting-for-triage An issue we've not yet triaged labels Oct 12, 2021
@bclozel
Copy link
Member

bclozel commented Oct 12, 2021

@geoffritchey this particular issue has been fixed in spring-projects/spring-ldap#579 (Spring LDAP 2.3.4) - as mentioned by Andy, please upgrade to 2.5.x (see #26394).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

3 participants