Category "java"

How to convert csv To nested Json in java?

i have a csv file in following format A_aa,A_ab,A_ac,A_ad,B_BB_ba,B_BB_BBB_bb 1,2,3,4,5,6 and i want to convert it into following Nested json { 'A':{

Sap Hybris advanced search label configuration

I wonder if is it possible change label of an field (Time created)in advanced search and how I do it. Thanks

Invalid mime type in spring rest template?

I am just trying to make a simple REST request like below String url = "some url"; MultiValueMap<String, String> headers = new LinkedMultiValueMap<>

Glassfish won't start version 3 and 4

I still having the same problem with glassfish !! I've changed the port and executed the command as admin but it doesn't work.. I also tried the command : asad

Error: not found: java Usage: selenium-standalone action [options]

trying to install selenium-standalone but getting this error, any idea? $ ./node_modules/.bin/selenium-standalone install not found: java Usage: selenium-stan

Illegal base64url character: ' ' when getting claims/decode from token Java JWT Spring Boot

When I get some claims from a JWT Token to validate user authentication I get the following error: Illegal base64url character: ' ' Creating a JWT goes complet

Eclipse search opens up Java file that has no syntax highlight or source code link when the project is nested?

Situation:: Trying to search and open up a Java file. In a nest project. And so, we have the file here, these 2 files the exactly same file, but, when the pro

How to fix scaling of a java-based application on a high dpi display in linux?

I just switched to java 11 (AdaptOpenJDK) so that my java Swing application looks ok on high dpi displays at different system scaling settings. It works ok on

Intellij Error:(3, 4) java: modules are not supported in -source 8 (use -source 9 or higher to enable modules)

Edit - this is solved - the issue was solved by setting: "Settings -> Build, Execution, Deployment - Java Compiler -> Project Bytecode Version : 9" I'm f

@ConfigurationProperties vs @PropertySource vs @Value

I am new to Spring/Spring Boot. I want to use the key-value pair data of application.properties / application.yml in Java file. I know that we can use @Value in

How to save a cookie in an Android webview forever?

With my code below, I have been able to save a cookie, but as soon as I close the application the cookie disappears. How is this caused and how can I solve it?

How to obtain json schema from jsonpaths of all the required fields using java

Say the input is: [{keyname: firstname, path:person.name.firstname,type:string}, {keyname:age, path:person.age,type:number}] Then jsonschema should be generate

Disable @CreationTimestamp in testing class

So I'm using Hibernate's annotations @CreationTimestamp and @UpdateTimestamp. It works fine, but I have this case when unit testing where I need to create objec

Add embedded image in emails in AWS SES service

I am trying to write a Java app which can send emails to specify emails. In the email i also want to attach some pic. Please find my code below :- public clas

Is there a way to read information from a saved file to check if there is an already exisiting doctorID saved?

So I am trying to create a Medical Clinic System Management program for a school project. This is my first project using NetBeans to create a GUI and unfortunat

Override a property for a single Spring Boot test

Consider the following example: @RunWith(SpringRunner.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, properties = {

What is the Text Blocks (or Multiline Strings) feature in Java?

Java SE 13 introduced Text Blocks (or Multiline Strings) feature. What are its differences and the similarities with the existing string repre

Expecting compile time error in try/catch statement

Why does this code compile an run fine? public static void main(String[] args) { try { throw new NullPointerException(); } catch (ClassCastExcep

Keycloak: how to delete and edit a Group

I already tried a bunch of different ways and none of them work. (First of all im using this, and works with other methods, like create/delete user, create grou

Running into an error after upgrading springboot from 2.3.9 to 2.6.3

After upgrading from springboot 2.3.9 to 2.6.6 I have a failing tests with the following error, java.lang.AssertionError: Expecting: <Unstarted application