You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check with actuator health endpoint. The application works normally, but with native image giving error:
Caused by: javax.naming.CommunicationException: localhost:636
at [email protected]/com.sun.jndi.ldap.Connection.(Connection.java:253) ~[na:na]
at [email protected]/com.sun.jndi.ldap.LdapClient.(LdapClient.java:137) ~[na:na]
at [email protected]/com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1616) ~[na:na]
at [email protected]/com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2848) ~[na:na]
at [email protected]/com.sun.jndi.ldap.LdapCtx.(LdapCtx.java:348) ~[na:na]
at [email protected]/com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxFromUrl(LdapCtxFactory.java:225) ~[spring-ldaps:na]
at [email protected]/com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:189) ~[spring-ldaps:na]
at [email protected]/com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:243) ~[spring-ldaps:na]
at [email protected]/com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:154) ~[spring-ldaps:na]
at [email protected]/com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:84) ~[spring-ldaps:na]
at [email protected]/javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:732) ~[spring-ldaps:na]
at [email protected]/javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305) ~[spring-ldaps:na]
at [email protected]/javax.naming.InitialContext.init(InitialContext.java:236) ~[spring-ldaps:na]
at [email protected]/javax.naming.ldap.InitialLdapContext.(InitialLdapContext.java:154) ~[na:na]
at org.springframework.ldap.core.support.LdapContextSource.getDirContextInstance(LdapContextSource.java:42) ~[spring-ldaps:3.0.0]
at org.springframework.ldap.core.support.AbstractContextSource.createContext(AbstractContextSource.java:351) ~[spring-ldaps:3.0.0]
... 75 common frames omitted
Caused by: java.lang.NoSuchMethodException: javax.net.ssl.SSLSocketFactory.getDefault()
at [email protected]/java.lang.Class.getMethod(DynamicHub.java:2227) ~[spring-ldaps:na]
at [email protected]/com.sun.jndi.ldap.Connection.createSocket(Connection.java:293) ~[na:na]
at [email protected]/com.sun.jndi.ldap.Connection.(Connection.java:232) ~[na:na]
... 90 common frames omitted
Kindly help in resolution of the same. If not supported, is there any alternative or work around for now?
The text was updated successfully, but these errors were encountered:
Describe the bug
Spring Boot 3 native image not working with spring-ldap over ssl
Sample
Via the Spring Initializer, create any project with:
spring-boot-starter-parent:3.0.2
spring-boot-starter-data-ldap
spring-boot-starter-actuator
Application.properties
spring.ldap.urls=ldaps://localhost:636
spring.ldap.base=ou=people,dc=admin,dc=com
spring.ldap.username=cn=admin,ou=service_accounts,dc=com
spring.ldap.password=password
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
Check with actuator health endpoint. The application works normally, but with native image giving error:
Caused by: javax.naming.CommunicationException: localhost:636
at [email protected]/com.sun.jndi.ldap.Connection.(Connection.java:253) ~[na:na]
at [email protected]/com.sun.jndi.ldap.LdapClient.(LdapClient.java:137) ~[na:na]
at [email protected]/com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1616) ~[na:na]
at [email protected]/com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2848) ~[na:na]
at [email protected]/com.sun.jndi.ldap.LdapCtx.(LdapCtx.java:348) ~[na:na]
at [email protected]/com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxFromUrl(LdapCtxFactory.java:225) ~[spring-ldaps:na]
at [email protected]/com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:189) ~[spring-ldaps:na]
at [email protected]/com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:243) ~[spring-ldaps:na]
at [email protected]/com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:154) ~[spring-ldaps:na]
at [email protected]/com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:84) ~[spring-ldaps:na]
at [email protected]/javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:732) ~[spring-ldaps:na]
at [email protected]/javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305) ~[spring-ldaps:na]
at [email protected]/javax.naming.InitialContext.init(InitialContext.java:236) ~[spring-ldaps:na]
at [email protected]/javax.naming.ldap.InitialLdapContext.(InitialLdapContext.java:154) ~[na:na]
at org.springframework.ldap.core.support.LdapContextSource.getDirContextInstance(LdapContextSource.java:42) ~[spring-ldaps:3.0.0]
at org.springframework.ldap.core.support.AbstractContextSource.createContext(AbstractContextSource.java:351) ~[spring-ldaps:3.0.0]
... 75 common frames omitted
Caused by: java.lang.NoSuchMethodException: javax.net.ssl.SSLSocketFactory.getDefault()
at [email protected]/java.lang.Class.getMethod(DynamicHub.java:2227) ~[spring-ldaps:na]
at [email protected]/com.sun.jndi.ldap.Connection.createSocket(Connection.java:293) ~[na:na]
at [email protected]/com.sun.jndi.ldap.Connection.(Connection.java:232) ~[na:na]
... 90 common frames omitted
Kindly help in resolution of the same. If not supported, is there any alternative or work around for now?
The text was updated successfully, but these errors were encountered: