Category "java"

How to find position in large JSON file

I have a very large JSON file that I am trying to parse through with Eclipse. Unfortunately, I keep getting the error of: Unexpected token LEFT BRACE({) at po

Mockito Matcher for a TypeReference

I am trying to write a Java unit test using Mockito but am having trouble to get a matcher to work. I want to test the following class CustomService.java pub

java.net.SocketException: Broken pipe (Please give me design advice.)

public class NewsServer { Socket socket; ArticleData ad; DataType dt; boolean isRecv = false; DataOutputStream dos; private static fina

Simple java questionnaire using json

I made a simple questionnaire. I need to write the responses to a JSON file. How to do it? I use IDEA Intellij and library GSON for work with JSON. This is main

Spring Data Elasticsearch: ClassCastException thrown in existsBy* repository method

I've got this trivial index in ES: { "dynamic": "strict", "properties": { "_class": { "type": "text", "fields": { "keyword": {

How to fix 'Unexpected byte range values defining scope of signed data' using pdfbox

How to fix 'Unexpected byte range values defining scope of signed data. Details: The signature byte range is invalid' while adding external signature in multipl

Generalize Specifications with joins

I'm using Spring Specifications to filter and sort through a class using multiple joins. For example, I have the class ContextData public class ContextData impl

how to Start keycloak 18 in Https mode in Kubernetes(minikube) Getting error to get the certificate

I'm running a minikube cluster on my local machine And want to deploy keycloak 18 version via Helm chart. But I'm unknown about. How to Add Generated certficate

Clicking on item of Navigation Drawer doesn’t open fragments

I want to use the default Navigation Drawer Activity of Android Studio (v. 3.5). After creating this default activity (New Project --> Navigation Drawer Acti

How can I save two strings in a single-line .txt file to their corresponding variables?

I have a .txt file that has a single line of: "abc xyz" abc is supposed to represent a prefix string and xyz is to represent forbidden characters. The code I ha

JavaParser - save modified source code file with new name

I'm using JavaParser to modify java source code. My goal is to read a single java source code file (ArithmeticClassToBeMutated) and store it in a compilation un

Autoflush on System.out of my develope environment

In my develope environment I have tomcat (9.0) with the System.out.autoflush off. How can I set it to on? EDIT: I tried to put thoose lines: private static bool

WSO2 IdendityServer throwing ThreadDeath Exception

I start the server using the ./wso2server.sh start command but after a few hours the server stops responding and throws a ThreadDeath exception. I tried modifyi

After Java update to the version 1.8.0_301 JavaFX WebView with Leaflet.Draw.Circle, Leaflet.Edit.Circle does not work as well as OSM is not draggable

I am using JavaFX Webview with Leaflet library to render OSM tiles. I am running into issues with Circles and Polygons, Marker and with some functions as Editt

How to generate curve25519 key pair for diffie hellman algorithm?

I want to implement ECDHE algorithm in my project ,for that I want to use Curve25519.But stuck how to generate key-pair for Curve25519.With other curve I am abl

Aeron Archive - extend existing recording

I have an Aeron Archive and want to extend the existing recording, i.e. that it continuse to append messages after the service restart. I wasn't able to find an

Replacement for Hibernate's deprecated Type annotation?

Upon upgrading to Hibernate 5.6.0.Final, I found that org.hibernate.annotations.Type is now deprecated. I use this annotation in many of my entities, including

Uploading files Kotlin Spring Boot

So, I am trying to make and upload file(s) functionality, from some blog posts and stackoverflow questions I got this solution: @PostMapping("/file/upload") fun

How do I reverse a string in java by creating a new temporary string?

What's the error in the following code? I am not able to identify it shows the index 0 out of bounds exception. public class stringBuilders{ public static v

Uploading files Kotlin Spring Boot

So, I am trying to make and upload file(s) functionality, from some blog posts and stackoverflow questions I got this solution: @PostMapping("/file/upload") fun