java-11

LogManager.getLogger() is unable to determine class name on Java 11

点点圈 提交于 2020-05-11 03:58:09
问题 I'm using log4j2 (2.11.1) with Java 11 and attempting to get a Logger object using: private static final Logger LOG = LogManager.getLogger(); (Imported from log4j-api in org.apache.logging.log4j ) At runtime, I receive the following error: WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance. Exception in thread "main" java.lang.ExceptionInInitializerError Caused by: java.lang.UnsupportedOperationException: No class provided, and an appropriate one

LogManager.getLogger() is unable to determine class name on Java 11

生来就可爱ヽ(ⅴ<●) 提交于 2020-05-11 03:57:03
问题 I'm using log4j2 (2.11.1) with Java 11 and attempting to get a Logger object using: private static final Logger LOG = LogManager.getLogger(); (Imported from log4j-api in org.apache.logging.log4j ) At runtime, I receive the following error: WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance. Exception in thread "main" java.lang.ExceptionInInitializerError Caused by: java.lang.UnsupportedOperationException: No class provided, and an appropriate one

Connections leaking with state CLOSE_WAIT with HttpClient

ⅰ亾dé卋堺 提交于 2020-05-10 20:56:42
问题 We are using JDK11 java.net.http HTTP client to get data from an API. After we receive the response the connections remain opened in our server with TCP state CLOSE_WAIT , which means the client must close the connection. From RFC 793 terminology: CLOSE-WAIT - represents waiting for a connection termination request from the local user. This is our client code which runs on WildFly 16 running on Java 12 as a stateless REST API. We don't understand why this is happening. import java.io

Connections leaking with state CLOSE_WAIT with HttpClient

淺唱寂寞╮ 提交于 2020-05-10 20:52:32
问题 We are using JDK11 java.net.http HTTP client to get data from an API. After we receive the response the connections remain opened in our server with TCP state CLOSE_WAIT , which means the client must close the connection. From RFC 793 terminology: CLOSE-WAIT - represents waiting for a connection termination request from the local user. This is our client code which runs on WildFly 16 running on Java 12 as a stateless REST API. We don't understand why this is happening. import java.io

Load library in a java shebang script

二次信任 提交于 2020-04-29 10:08:26
问题 Since JDK-11 we have ability to run java source code directly. This code import org.apache.commons.codec.digest.Md5Crypt; public class Oneliner { public static void main(String[] args){ System.out.println(Md5Crypt.md5Crypt("ok".getBytes(), "$1$saltsalt")); } } can be run with $ /usr/lib/jvm/jdk-11/bin/java --source 8 -cp /home/imaskar/.m2/repository/commons-codec/commons-codec/1.11/commons-codec-1.11.jar jscript.java But in a shell script form (shebang) #!/usr/lib/jvm/jdk-11/bin/java --source

Getting errors when runing javafx11 on raspberry pi using gradle

不打扰是莪最后的温柔 提交于 2020-04-18 12:35:07
问题 I am able to build my javafx11 application, but I get errors when running it using ./gradlew run The error I get says something about unable to open DISPLAY I have tried on both a terminal only install of raspbian and a full desktop install as well. So far I have done these things: 1) Install bellsoft full jdk 2) git clone gradle project 3) ./gradlew run What am I doing wrong? 回答1: Nevermind, I figured it out after much, much more googling. I ended up using nodm . 来源: https://stackoverflow

Getting errors when runing javafx11 on raspberry pi using gradle

孤者浪人 提交于 2020-04-18 12:33:35
问题 I am able to build my javafx11 application, but I get errors when running it using ./gradlew run The error I get says something about unable to open DISPLAY I have tried on both a terminal only install of raspbian and a full desktop install as well. So far I have done these things: 1) Install bellsoft full jdk 2) git clone gradle project 3) ./gradlew run What am I doing wrong? 回答1: Nevermind, I figured it out after much, much more googling. I ended up using nodm . 来源: https://stackoverflow

Getting errors when runing javafx11 on raspberry pi using gradle

安稳与你 提交于 2020-04-18 12:33:07
问题 I am able to build my javafx11 application, but I get errors when running it using ./gradlew run The error I get says something about unable to open DISPLAY I have tried on both a terminal only install of raspbian and a full desktop install as well. So far I have done these things: 1) Install bellsoft full jdk 2) git clone gradle project 3) ./gradlew run What am I doing wrong? 回答1: Nevermind, I figured it out after much, much more googling. I ended up using nodm . 来源: https://stackoverflow

Jacoco code coverage dropped with migration to Java 11

青春壹個敷衍的年華 提交于 2020-04-16 15:02:09
问题 I have several Gradle projects that were built using Java 8, and after converting them recently to use Java 11, Jacoco code coverage reports have been reporting much lower percentages than before. On one project, immediately after the transition, my coverage dropped from 81% to 16%. I tried updating the Jacoco plugin to 0.8.3 (which has official JDK 11 support), Gradle to 5.4, and TestNG to 6.14.3 (not sure if this has any effect; thought it couldn't hurt to be on the latest version). Even

generating classes from wsdl in java 11

微笑、不失礼 提交于 2020-04-16 02:57:05
问题 How to generate classes from WSDL in java 11 using gradle 5? I was using wsimport seeber plugin, but it looks like it doesn't work in java 11 dependencies { classpath "gradle.plugin.me.seeber.gradle:gradle-wsimport-plugin:1.1.1" } In Intelij Idea I'm getting: What went wrong: A problem occurred configuring project ':ReturnRedirectWorker-api'. Exception thrown while executing model rule: WsimportPlugin.PluginRules#createWsdlSourceSets(ModelMap, FileOperations) > create(wsdlMain) > create(wsdl)