java-11

JDK 11 SSL Error on valid certificate (working in previous versions)

六月ゝ 毕业季﹏ 提交于 2019-11-30 07:05:00
The following code throws an error in JDK 11: HttpURLConnection con = (HttpURLConnection) new URL("https://sis.redsys.es/sis/realizarPago").openConnection(); con.setRequestMethod("GET"); con.getResponseCode(); The error is: javax.net.ssl.SSLHandshakeException: extension (10) should not be presented in server_hello at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:128) at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117) at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:312) at java.base/sun.security.ssl.TransportContext.fatal

Allow insecure HTTPS connection for Java JDK 11 HttpClient

依然范特西╮ 提交于 2019-11-30 06:57:22
Sometimes it is needed to allow insecure HTTPS connections, e.g. in some web-crawling applications which should work with any site. I used one such solution with old HttpsURLConnection API which was recently superseded by the new HttpClient API in JDK 11. What is the way to allow insecure HTTPS connections (self-signed or expired certificate) with this new API? UPD: The code I tried (in Kotlin but maps directly to Java): val trustAllCerts = arrayOf<TrustManager>(object: X509TrustManager { override fun getAcceptedIssuers(): Array<X509Certificate>? = null override fun checkClientTrusted(certs:

Springboot: org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister

和自甴很熟 提交于 2019-11-30 06:03:52
I know, it is duplicate question,but problem is new, Please do not mark duplicate question. This program runs in Window 10 it's run fine and create a database, but when same program runs in Debian 9 it throws exception. after that i checked this problem on google. some people said, create a all user class state setter and getter method. I created a setter and getter method but same exception is thrown. User Class @Entity public class User { @Id private Long id; private String firstName; private String lastName; private String professional; private int age; public User() {} public User(Long id,

Java 11 JShell inside Intellij IDEA

人走茶凉 提交于 2019-11-30 02:52:09
问题 I have Java 11 JDK and IntelliJ IDEA 2018.2.4 (64-bit). When I was using Java 10.0.2, the JShell console in IntelliJ IDEA worked fine. Now that I've upgraded to Java 11, the JShell console has stopped working. Nothing at all happens when I click on the Run button or when I hit Ctrl+Enter (see screenshot). My projects compile and run just fine using Java 11 - it's only the JShell console that doesn't work. (Also, JShell works fine from the Command Prompt, it's only inside IDEA that it doesn't

Spring Boot fails due to a Hibernate error after migrating to JDK 11 [duplicate]

瘦欲@ 提交于 2019-11-30 02:25:35
问题 This question already has answers here : Minimum Spring version compatible with Java 11 (2 answers) Closed last year . I have just migrated to JDK 11 in order to use the latest Java LTS version. If I change the execution JRE in Eclipse from 10 to 11 (and only then), when I try to run my tests, I get the following exception stacktrace (I removed some parts to facilitate reading). Please note that everything works as expected if I switch back to jdk-10. Obviously I use Spring boot and Hibernate

Java11 / JavaFX and Maven will not run outside of NetBeans IDE 9

拟墨画扇 提交于 2019-11-30 01:53:32
问题 As per JavaFX deployment library not found in active JDK I used José Pereda Maven approach and it works well in NetBeans but as soon as I try and run it outside with "java -jar mavenproject1-1.0-SNAPSHOT-jar-with-dependencies.jar" I get the following error "Error: JavaFX runtime components are missing, and are required to run this application" The "md.mavenproject1.MainApp" is just a temp name while I try and figure this out. My pom file looks like: <?xml version="1.0" encoding="UTF-8"?>

Unable to use Lombok with Java 11

狂风中的少年 提交于 2019-11-30 00:17:46
问题 We upgraded the Java version from 8 to 11 but I got compile errors of getter/setter methods where I implemented the POJO classes with Lombok's Getter and Setter Annotations. Is there a way to use Lombok's @Data annotation which provides getter and setter without implementing them at Java 11? Currently, I am facing the error: unable to find getStoreName() where storeName was declared as a global variable in the class with @Data Lombok annotation above the class. 回答1: TL;DR Upgrade Lombok as a

Java 11 application as lightweight docker image

試著忘記壹切 提交于 2019-11-29 19:26:46
Inspired by question Why is the Java 11 base Docker image so large? (openjdk:11-jre-slim) I found that this topic in Java world is still not settled. As for 07 Dec 2018 there are common issues/pitfalls (discussed in the ticket above): JRE is not distributed as a separate "package". Modules from JDK should be used instead Oracle OpenJDK 11 doesn't support Linux Alpine , so lightweight images can't be easily created In the same time current stable Debian versions still doesn't have Java 11 packages ( Ubuntu has Java 10 installed under openjdk-11 packages), that's why unstable sid versions are

How to install OpenJDK 11 on Windows?

谁都会走 提交于 2019-11-29 19:01:14
In the past, Oracle used to publish an executable installers for Windows that would: Unpack files Add registry keys indicating the installed version and path Add the JRE to the system PATH Register an uninstaller with Windows. As of Java 11, the Oracle's free version of Java ( Oracle OpenJDK ) doesn't seem to include an installer. It is just a zip file containing the binaries. How are we supposed to install OpenJDK 11 on Windows seeing as the aforementioned integrations are no longer there? Aren't they necessary? Lior Bar-On Extract the zip file into a folder, e.g. C:\Program Files\Java\ and

Eclipse 2018-09 won't compile Java 11 source; thinks it is below 1.7

允我心安 提交于 2019-11-29 17:05:41
问题 I'm running Eclipse 2018-09 (4.9.0) on Windows 10. I'm using Open JDK 11 GA. I have a Maven project that was specified as using Java 8 source code. <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> </properties> That compiles fine using Maven 3.5.3 on the command line. That also compiles fine using Eclipse Eclipse 2018-09 (4.9.0). I changed the compile Java