org.springframework.beans.BeanInstantiationException

Failed to instantiate [javax.sql.DataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalAccessError: tried to access field sun.security.ssl.Handshaker.algorithmConstraints from class sun.security.ssl.ClientHandshaker

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web1883

  • Failed to instantiate [javax.sql.DataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalAccessError: tried to access field sun.security.ssl.Handshaker.algorithmConstraints from class sun.security.ssl.ClientHandshaker
  • Failed to instantiate [javax.management.MBeanServer]: Factory method 'mbeanServer' threw exception; nested exception is java.lang.IllegalAccessError: tried to access class org.springframework.context.annotation.MBeanExportConfiguration$SpecificPlatform from class org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration
  • via GitHub by cristian658
    , 2 months ago
    [com.fasterxml.jackson.datatype.jsr310.JavaTimeModule]: Constructor threw exception; nested exception is java.lang.IllegalAccessError: tried to access method com.fasterxml.jackson.databind.ser.std.StdSerializer.<init>(Ljava/lang/Class;)V from class com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
  • Stack trace

    • org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalAccessError: tried to access field sun.security.ssl.Handshaker.algorithmConstraints from class sun.security.ssl.ClientHandshaker at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) Caused by: java.lang.IllegalAccessError: tried to access field sun.security.ssl.Handshaker.algorithmConstraints from class sun.security.ssl.ClientHandshaker at sun.security.ssl.ClientHandshaker.serverKeyExchange(ClientHandshaker.java:778) at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:285) at sun.security.ssl.Handshaker.processLoop(Handshaker.java:969) at sun.security.ssl.Handshaker.process_record(Handshaker.java:904) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1050) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1363) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1391) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1375) at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1618) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1323) at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827) at com.microsoft.sqlserver.jdbc.SQLServerDataSource.getConnectionInternal(SQLServerDataSource.java:621) at com.microsoft.sqlserver.jdbc.SQLServerDataSource.getConnection(SQLServerDataSource.java:57) at com.zaxxer.hikari.pool.BaseHikariPool.addConnection(BaseHikariPool.java:373) at com.zaxxer.hikari.pool.BaseHikariPool.initializeConnections(BaseHikariPool.java:469) at com.zaxxer.hikari.pool.BaseHikariPool.<init>(BaseHikariPool.java:162) at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:61) at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:49) at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:78)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 11 months ago