java-11

JAXB ClassNotFoundException Building Spring Boot App 2.2.0 with Java 11

孤街浪徒 提交于 2019-12-12 09:45:23
问题 I've created a Spring Boot application using version 2.2.0.BUILD-SNAPSHOT with Java 11 (POM below): <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.2

JavaFX Integer Spinner (IntegerSpinnerValueFactory) does not wrap around the value to minimum

ぐ巨炮叔叔 提交于 2019-12-12 09:45:23
问题 I have created an Integer Spinner with values min (5), max (15) and initialValue (12) and wrapAround (true) . Once the spinner reaches the max (15) value during increment, instead of resetting the value to min (5) as it says in the documentation, it is being reset to value 10 (max (15) - min (5)) public final void setWrapAround​(boolean value) Sets the value of the property wrapAround. Property description: The wrapAround property is used to specify whether the value factory should be

Java 11 on AWS beanstalk for Spring boot project

丶灬走出姿态 提交于 2019-12-12 08:29:23
问题 I'm new to Spring Boot and I'm trying to develop an application to later deploy it on AWS beanstalk. I started the project using java 11 but later I discovered that AWS only support java 8. Is it possible to set 'maven.compiler.target' in pom.xml to 1.8 to make it running correctly? Should I have to use Java 1.8 for both development and compile? I would like to use new Java features and library. I would like to have some opinion if someone have same problems. Thanks. Cd 回答1: You can install

NodeList.getLength() returning 0 in Java 11

自古美人都是妖i 提交于 2019-12-12 06:39:36
问题 I am migrating my application from Java 8 to Java 11. In Java 8, my input xml file was parsing correctly, but in Java 11 the nodeList.getLength() is returning 0 . Please refer the code as per which I am always getting the error: Cannot find signature . I have tried using document.getElementsByTagName("Signature") instead of getElementsByTagNameNS() , which returns correct length . However the unmarshalXMLSignature() method then gives an error that Document implementation must support DOM

Read file from resource folder, InputStream is null [duplicate]

拟墨画扇 提交于 2019-12-11 17:51:10
问题 This question already has answers here : How do I load a file from resource folder? (17 answers) Closed 9 months ago . Windows 7 , x64, Java 11 How to read a file in resources folder in main. ClassLoader classloader = Thread.currentThread().getContextClassLoader(); // Input stream is null. InputStream is = App.class.getResourceAsStream(filename); BufferedReader br = new BufferedReader(new InputStreamReader(is)); return br.lines().collect(Collectors.toList()); I had a similar problem with test

Using Java 11 HttpClient to read chunked data

拈花ヽ惹草 提交于 2019-12-11 13:04:40
问题 I'm trying to read chunked data from an Http Response using Java 11's java.net.http.HttpClient, but I'm only getting one line at a time. I need to get an entire chunk at a time. Here's my code: final InputStream eventStream; try { HttpResponse<InputStream> httpResponse = httpClient.send(HttpRequest .newBuilder( new URI(this.config.getEnvironmentAccess().getUrl() + ":<port>/status/?pretty=true")) .GET().build(), BodyHandlers.ofInputStream()); LOGGER.info("event stream HttpResponse received");

Pentaho/POI throws InvocationTargetException

℡╲_俬逩灬. 提交于 2019-12-11 10:59:54
问题 I am trying to upgrade all my java application to openJDK11 ( from Oracle 8 ). and I notice one problem in my reporting server which use Pentaho. It seems that the Excel autosize feature requires libfontconfig.so in openJDK11, however I can find the module at /usr/lib64/libfontconfig.so. Any way to solve this? 2019/04/18 19:22:38 - GetReportJSon.0 - Finished reading query, closing connection. 2019/04/18 19:22:38 - GetReportJSon.0 - Finished processing (I=1, O=0, R=0, W=2, U=0, E=0) java.lang

Spring boot multi module project with java 11 throws cannot access class org.springframework.cglib.core.ReflectUtils

早过忘川 提交于 2019-12-11 09:04:59
问题 I am creating a java 11 spring boot (2.1.3 version) multi module project but I am getting a following exception while running the child module. Everything was working fine when I was running it as a single project ( no multi module). java.lang.IllegalStateException: Cannot load configuration class: f etch.App at spring.context@5.1.5.RELEASE/org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:413) ~[spring

JavaBeanProperties in JavaFX without pulling in java.desktop (Swing, AWT)

梦想的初衷 提交于 2019-12-11 07:51:37
问题 I have some model classes that are instantiated many times and have many fields. While I could initialize all fields as Simple*Property s, this significantly slows performance due to the allocations (and lazy-creating the properties is not an option). Thus, I would prefer to use JavaBeanProperties to create on-demand bindings where needed in the application like so (see this answer for a full example JavaBean wrapping with JavaFX Properties): Entity bean = ... StringProperty nameProperty =

IllegalStateException: No language and polyglot implementation was found on the classpath. Make sure the truffle-api.jar is on the classpath

旧街凉风 提交于 2019-12-11 07:45:45
问题 IllegalStateException: No language and polyglot implementation was found on the classpath. Make sure the truffle-api.jar is on the classpath. I wanted to use GraalVM in my Java project. I added this dependency to my pom.xml <dependency> <groupId>org.graalvm.js</groupId> <artifactId>js-scriptengine</artifactId> <version>1.0.0-rc10</version> </dependency> but apparently that's not enough. What else do I have to do to fix this error? 回答1: Had to add all these dependencies: <dependency> <groupId