Category "java"

How to configure jackson with spring globally?

To serialize deserialize object I am useing Jackson as flow @JsonSerialize(using = LocalDateSerializer.class) @JsonDeserialize(using = LocalDateDeserializer.cl

JavaFX - Making a post request using org.apache.httpcomponents fails

When making a post request to my backend, I get the following error. I can't really find a fix online and am very new to Java. Here is the error: Caused by: jav

Visual Studio Code, Java Extension, how to add a JAR to classpath?

In Eclipse IDE, I add a JAR library using Project > Build Path > Configure Build Path... What is the equivalent in VisualStudioCode? I had a look into l

How to remove controller list from Swagger UI

I'm using springfox-swagger-ui 2.8.0 which ships with Swagger UI 3.7.0. I want to get rid of the controller list in front of the api documentation page, pretty

Primefaces 5.1 start ajaxStatus during preRenderView

In primefaces is possible start "ajax status" from a method of a backing beans? I have the following view: <ui:composition xmlns="http://www.w3.org/1999/xhtm

Why log4j stop running MDC logic if Java version is 11, 11.1x, etc

I use MDC for helping log4j loging more information. Everything works well until I updated java version to 11. This is my log4j config (pseodo code) log4j.appen

Portable Eclipse : impossible to add software

I installed Eclipse on my office pc, using this procedure (64 bit): https://portableapps.com/node/53284 But when i want to create a new project, it does not pro

Enable xinclude processing for Ants `schemavalidate` task

I'm using the schemavalidate task of Ant to validate XML documents. <schemavalidate noNamespaceFile="${user.input.xsd}" file="${user.input.xml}"> <

Spring Boot : execute a job at a particular Date entered by the user

Im trying to manage scheduled tasks using spring boot. I want to execute my job only one time at a particular date ( specified by the user ). Here is my Job :

Check that each Color field has a color value (format string "#FFFFFF")

I have task: "Check that each Color field has a color value (format string "#FFFFFF")". I have a solution: @Test public void sixTest() { Specification.insta

Tune DocLint to allow new tags in javadocs

Is there a way to tune the DocLint (-Xdoclint) to allow new tags in javadocs? Right now i get errors like: error: unknown tag: checkstyle * @checkstyle Pa

How to create Java mixins: @Slf4j

I'm trying to create a Java mixin and use the @Slf4j annotation. However intellij shows an error @Slf4j is only legal for classes and enums. import lombok.exter

Daemon is stopping immediately JVM garbage collector thrashing and after running out of JVM memory

When I build multi module java project using gradle 6.0,when I add >30 modules.Throw this error: Gradle Daemon started in 2 s 267 ms > Configure project

Split Packages: Java Modules vs Sealed Jars

Both Sealed Packages/Jars and the Java Module System disallow spliting packages across several jars. Does that mean that all packages contained within a Module

UML modelling enumeration with attributes

I would like to create an UML diagram with Java enumerations (enum), that have one or more attributes, but I am confused about how to do it. For example an enum

Getting java.lang.NoSuchMethodError: org.springframework.cglib.core.ReflectUtils.defineClass while inserting data in mongo using Spring MongoTemplate

I am trying to insert some data (List of Objects) into mongoDB using Spring MongoTemplate and I am getting an exception: 14:08:04.430 [main] DEBUG org.springfr

GraalVM Java on truffle - NullPointerException from NFIContext.getBackend when executing Java code

I'm trying to run Java code dynamically inside a Java application using Truffle from GraalVM, without success. Settings I'm working on MacOs 11.5.2. I've follow

CteInsertStrategy can only be used with Dialects that support CTE that can take UPDATE or DELETE statements as well

Hibernate 6.0.1 with PostgreSQL JDBC driver 42.3.5 causes the following exception: java.lang.UnsupportedOperationException: CteInsertStrategy can only be used w

Spring boot ignores "ignoreUnresolvablePlaceholders" = true

I'm having a problem with my Spring Boot application ignoring my ignoreUnresolvablePlaceHolders set to true in my config.xml file. I have these options explici

Hide Java application to System Tray

I want to hide my Java application from the taskbar and for it to be visible only at the system tray. Here is a picture in case this is unclear. I tried to i