简体   繁体   English

java.lang.IllegalAccessError:尝试从类sun.security.ssl.ClientHandshaker访问字段sun.security.ssl.Handshaker.localSupportedSignAlgs

[英]java.lang.IllegalAccessError: tried to access field sun.security.ssl.Handshaker.localSupportedSignAlgs from class sun.security.ssl.ClientHandshaker

Still trying to deploy and get my server running .. As my Cloud SQL database is getting initialized I am getting the following exception: 仍在尝试部署并让我的服务器运行..在初始化Cloud SQL数据库时,出现以下异常:

[main] ERROR com.mz.server.BootstrappingServerConfig - Error trying to migrate SQL scripts ..
at org.flywaydb.core.internal.util.jdbc.JdbcUtils.openConnection(JdbcUtils.java:56)
    at org.flywaydb.core.Flyway.migrate(Flyway.java:1006)
    at com.mz.database.SqlDatabaseBootstrapper.executeMigration(SqlDatabaseBootstrapper.java:60)
    at com.mz.server.BootstrappingServerConfig.contextInitialized(BootstrappingServerConfig.java:46)
    ...
Caused by: java.sql.SQLException: java.lang.IllegalAccessError: tried to access field sun.security.ssl.Handshaker.localSupportedSignAlgs from class sun.security.ssl.ClientHandshaker
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:963)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:896)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:885)
    ...
Caused by: java.lang.IllegalAccessError: tried to access field sun.security.ssl.Handshaker.localSupportedSignAlgs from class sun.security.ssl.ClientHandshaker
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:285)
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
    at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
    ...

I am not sure what information I should deliver here - this would be my app.yaml : 我不确定应该在此处提供哪些信息-这将是我的app.yaml

runtime: java
vm: true

runtime_config:
  jdk: openjdk8
  server: jetty9

env_variables:
  'ALPN_ENABLE': 'true'   # OPTIONAL

beta_settings:
  cloud_sql_instances: mahlzeit-test:us-central1:mahlzeit-life-cloudsql-prod

health_check:
  enable_health_check: false

This is how I am configuring my DataSource in my Spring Application Context: 这就是我在Spring Application Context中配置DataSource

<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
    <property name="driverClassName" value="com.mysql.jdbc.Driver" />
    <property name="url" value="jdbc:mysql://google/mz_db?cloudSqlInstance=mz-test:us-central1:mz-life-cloudsql-prod&amp;socketFactory=com.google.cloud.sql.mysql.SocketFactory" />
    <property name="username" value="root" />
    <property name="password" value="" />
</bean>

The compute instances which are accessing the Cloud SQL instances are in the same project. 访问Cloud SQL实例的计算实例在同一项目中。

Why am I getting 我为什么要

java.lang.IllegalAccessError: tried to access field sun.security.ssl.Handshaker.localSupportedSignAlgs from class sun.security.ssl.ClientHandshaker java.lang.IllegalAccessError:尝试从类sun.security.ssl.ClientHandshaker访问字段sun.security.ssl.Handshaker.localSupportedSignAlgs

and how can I fix this? 我该如何解决?


Running mvn dependency:list 运行mvn dependency:list

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building mz-web-server 0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:list (default-cli) @ mz-web-server ---
[INFO] 
[INFO] The following files have been resolved:
[INFO]    org.springframework:spring-test:jar:4.0.3.RELEASE:compile
[INFO]    mysql:mysql-connector-java:jar:5.1.39:compile
[INFO]    org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6:compile
[INFO]    org.springframework.security:spring-security-core:jar:4.0.3.RELEASE:compile
[INFO]    log4j:log4j:jar:1.2.17:compile
[INFO]    org.apache.maven:maven-settings:jar:2.2.1:compile
[INFO]    org.springframework:spring-tx:jar:4.2.3.RELEASE:compile
[INFO]    com.google.oauth-client:google-oauth-client:jar:1.21.0:compile
[INFO]    org.apache.commons:commons-dbcp2:jar:2.0:compile
[INFO]    com.google.http-client:google-http-client-jackson2:jar:1.21.0:compile
[INFO]    aopalliance:aopalliance:jar:1.0:compile
[INFO]    com.paypal.sdk:rest-api-sdk:jar:1.6.0:compile
[INFO]    org.springframework:spring-webmvc:jar:4.2.3.RELEASE:compile
[INFO]    org.apache.httpcomponents:httpmime:jar:4.3.4:compile
[INFO]    org.apache.maven:maven-artifact-manager:jar:2.2.1:compile
[INFO]    org.mindrot:jbcrypt:jar:0.3m:compile
[INFO]    com.squareup.okio:okio:jar:1.6.0:compile
[INFO]    com.fasterxml.jackson.core:jackson-annotations:jar:2.3.0:compile
[INFO]    com.fasterxml.jackson.core:jackson-databind:jar:2.3.0:compile
[INFO]    org.apache.maven:maven-plugin-api:jar:2.2.1:compile
[INFO]    org.apache.maven:maven-project:jar:2.2.1:compile
[INFO]    org.jooq:jooq-meta:jar:3.7.2:compile
[INFO]    commons-pool:commons-pool:jar:1.5.4:compile
[INFO]    org.jooq:jooq-codegen-maven:jar:3.7.2:compile
[INFO]    org.apache.httpcomponents:httpcore:jar:4.3.2:compile
[INFO]    org.apache.httpcomponents:httpclient:jar:4.3.4:compile
[INFO]    org.hamcrest:hamcrest-core:jar:1.3:test
[INFO]    commons-dbcp:commons-dbcp:jar:1.4:compile
[INFO]    javax.servlet:javax.servlet-api:jar:3.0.1:provided
[INFO]    org.json:json:jar:20140107:compile
[INFO]    com.google.gwt:gwt-servlet:jar:2.8.0-beta1:compile
[INFO]    org.springframework.security:spring-security-web:jar:4.0.3.RELEASE:compile
[INFO]    org.springframework:spring-core:jar:4.2.3.RELEASE:compile
[INFO]    com.mz:mz-data-model:jar:0.1-SNAPSHOT:compile
[INFO]    com.google.guava:guava-jdk5:jar:17.0:compile
[INFO]    commons-logging:commons-logging:jar:1.2:compile
[INFO]    com.google.cloud.sql:mysql-socket-factory:jar:1.0.0:compile
[INFO]    org.codehaus.plexus:plexus-utils:jar:1.5.15:compile
[INFO]    com.mz:mz-web-client:war:0.1-SNAPSHOT:runtime
[INFO]    org.codehaus.plexus:plexus-interpolation:jar:1.11:compile
[INFO]    org.springframework:spring-beans:jar:4.2.3.RELEASE:compile
[INFO]    org.apache.commons:commons-pool2:jar:2.2:compile
[INFO]    com.fasterxml.jackson.core:jackson-core:jar:2.3.0:compile
[INFO]    com.google.maps:google-maps-services:jar:0.1.14:compile
[INFO]    com.mz:mz-web-shared:jar:0.1-SNAPSHOT:compile
[INFO]    com.google.appengine:appengine-testing:jar:1.9.38:test
[INFO]    org.springframework:spring-web:jar:4.2.3.RELEASE:compile
[INFO]    org.springframework:spring-orm:jar:4.2.3.RELEASE:compile
[INFO]    joda-time:joda-time:jar:2.9.1:compile
[INFO]    commons-codec:commons-codec:jar:1.6:compile
[INFO]    org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
[INFO]    com.google.appengine:appengine-api-stubs:jar:1.9.38:test
[INFO]    org.springframework:spring-expression:jar:4.2.3.RELEASE:compile
[INFO]    com.google.api-client:google-api-client:jar:1.21.0:compile
[INFO]    com.google.appengine:appengine-api-1.0-sdk:jar:1.9.38:compile
[INFO]    com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO]    com.google.guava:guava:jar:19.0:compile
[INFO]    org.springframework.security:spring-security-acl:jar:4.0.3.RELEASE:compile
[INFO]    org.jooq:jooq:jar:3.7.2:compile
[INFO]    junit:junit:jar:4.11:test
[INFO]    classworlds:classworlds:jar:1.1-alpha-2:compile
[INFO]    org.springframework:spring-jdbc:jar:4.2.3.RELEASE:compile
[INFO]    com.google.apis:google-api-services-sqladmin:jar:v1beta4-rev19-1.21.0:compile
[INFO]    org.springframework:spring-aop:jar:4.2.3.RELEASE:compile
[INFO]    org.apache.maven:maven-repository-metadata:jar:2.2.1:compile
[INFO]    com.maxmind.geoip:geoip-api:jar:1.3.1:compile
[INFO]    org.apache.maven:maven-artifact:jar:2.2.1:compile
[INFO]    com.google.code.gson:gson:jar:2.2.2:compile
[INFO]    net.sf.ehcache:ehcache:jar:2.10.1:compile
[INFO]    org.springframework:spring-context-support:jar:4.0.3.RELEASE:compile
[INFO]    org.apache.maven:maven-profile:jar:2.2.1:compile
[INFO]    org.jooq:jooq-codegen:jar:3.7.2:compile
[INFO]    org.springframework:spring-context:jar:4.2.3.RELEASE:compile
[INFO]    com.squareup.okhttp:okhttp:jar:2.7.5:compile
[INFO]    org.apache.maven:maven-model:jar:2.2.1:compile
[INFO]    org.flywaydb:flyway-core:jar:3.2.1:compile
[INFO]    com.sendgrid:smtpapi-java:jar:1.2.0:compile
[INFO]    com.google.http-client:google-http-client:jar:1.21.0:compile
[INFO]    org.apache.maven:maven-plugin-registry:jar:2.2.1:compile
[INFO]    backport-util-concurrent:backport-util-concurrent:jar:3.1:compile
[INFO]    org.slf4j:slf4j-api:jar:1.7.7:compile
[INFO]    org.springframework.security:spring-security-config:jar:4.0.3.RELEASE:compile
[INFO]    com.sendgrid:sendgrid-java:jar:2.2.2:compile
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.730 s
[INFO] Finished at: 2016-06-06T09:27:35+02:00
[INFO] Final Memory: 16M/226M
[INFO] ------------------------------------------------------------------------

The problem was 问题是

env_variables:
  'ALPN_ENABLE': 'true'   # OPTIONAL

which I simply used from a tutorial without thinking about what that is/means. 我只是从教程中简单地使用了它,而没有考虑那是什么/意味着什么。

ALPN is a library which appears to optimize HTTPS requests. ALPN是一个似乎可以优化HTTPS请求的库。 I tried to add the library to my dependencies which did not work . 我试图将库添加到我的依赖项中,但该类无效 Maybe I got the wrong version or something like that. 也许我得到了错误的版本或类似的东西。 However, at the moment this is no requirement for me. 但是,目前这对我来说不是必需的。

To solve the issue I simply removed this variable. 为了解决这个问题,我只是删除了这个变量。 Setting it to 'false' should also do it. 将其设置为'false'也应该这样做。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何修复 java.lang.NoSuchMethodError: sun.security.ssl.Handshaker.setApplicationProtocols([Ljava/lang/String;) - How to fix java.lang.NoSuchMethodError: sun.security.ssl.Handshaker.setApplicationProtocols([Ljava/lang/String;) Java Glassfish java.lang.IllegalAccessError:尝试访问glassfish 3.1.2.2上的方法com.sun.jna.Pointer - Java Glassfish java.lang.IllegalAccessError: tried to access method com.sun.jna.Pointer on glassfish 3.1.2.2 java.lang.IllegalAccessError:尝试从类Entity访问字段ConcreteEntity.instance - java.lang.IllegalAccessError: tried to access field ConcreteEntity.instance from class Entity java.lang.NoSuchMethodError:sun.security.ssl.SupportedEllipticCurvesExtension - java.lang.NoSuchMethodError: sun.security.ssl.SupportedEllipticCurvesExtension java.lang.NoClassDefFoundError: sun/security/ssl/HandshakeStateManager - java.lang.NoClassDefFoundError: sun/security/ssl/HandshakeStateManager JavaWeb java.lang.NoClassDefFoundError: sun/security/ssl/HelloExtension - JavaWeb java.lang.NoClassDefFoundError: sun/security/ssl/HelloExtension 黄瓜java.lang.IllegalAccessError中的Spring错误:尝试访问类 - Spring error in Cucumber java.lang.IllegalAccessError: tried to access class java.lang.IllegalAccessError: 试图访问方法 - java.lang.IllegalAccessError: tried to access method sun.security.ssl.allowUnsafeRenegotiation - sun.security.ssl.allowUnsafeRenegotiation java.lang.IllegalAccessError: class org.gradle.internal.compiler.java.ClassNameCollector cannot access class com.sun.tools.javac.code.Symbol$ - java.lang.IllegalAccessError: class org.gradle.internal.compiler.java.ClassNameCollector cannot access class com.sun.tools.javac.code.Symbol$
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM