Category "java"

page size in spring boot to get total size

the default size of page is 20, I want to be able to get all elements from endpoint url. to get 30 elements I set size like below : http://localhost:8080/api/in

Unexpected lock protocol found in lock file. Expected 3 found 0

In android studio I keep getting this error message when building. I've tried deleting the .gradle file multiple times and restarting the IDE but the error do

Returning ResultSet without close?

I would like to have a database connection managing class which I can use for simple SQL commands like SELECT, INSERT etc. by simple calling something like this

Intellij IDEA - Maven not working

I cannot see the list of maven archetypes ("Loading archetype list...") or import an existing maven project in Intellij IDEA 2016.3.4. I tried several things:

Execute a JAR file in a specific JRE

I have been looking at this question and although it shows how you can execute a jar in Windows, it does not show how this can be done in Linux (preferably Cent

How to do CopyMerge in Hadoop 3.0?

I know hadoop version 2.7's FileUtil has the copyMerge function that merges multiple files into a new one. But the copyMerge function is no longer supported pe

Eclipse TestNG java.lang.AssertionError

My code works, TestNG works, I got results as expected, but this error appears at the end of TestNG results: Error code: java.lang.AssertionError: Couldn't fin

How to check which Quartz Scheduler job is not running

I have below code which i have used to check which quartz scheduler job is running. And it also send me an email the list of running scheduler job. But i dont k

Get domain name from the email list

Get domain name from the email list Hi, I have a list of email id from which i have to get the domain name. For simple email like [email protected], I have

IBM software architect, Eclipse error: "Java was started but returned exit code=-1"

I'm trying to install IBM rational software architect 9.7, but i get the following error all time. It appeared during installation and does the same every time

Creating strict mock when using @MockBean of spring boot?

I use @MockBean of spring boot (with @RunWith(SpringRunner.class)) and everything was ok so far. However the mock provides default implementation for every meth

spring boot logback-spring.xml maxFileSize not working with SizeAndTimeBasedRollingPolicy

I want to configure logging in spring boot application. I have configure logback-spring.xml. The sample of logback-spring.xml is located on here and sample of a

How to modify values of JsonObject

I want to add a new field to jsonObject and this new field's name will be based on a value of another field. To be clear, this an examples of what I want to ach

The method getCurrentSession() is undefined for the type SessionFactory

I'm doing a web based project using Maven,Spring and Hibernate.I just have faced a problem. The problem is whenever I'm using sessionFactory.getCurrentSession()

printing the largest number from a while loop, when 10 numbers are inputted from the keyboard

Every time my output prints out the last number given through the Scanner as the largest number. This program needs to be modified in a way, that it scans throu

How to modify values of JsonObject

I want to add a new field to jsonObject and this new field's name will be based on a value of another field. To be clear, this an examples of what I want to ach

Set image as wallpaper from url (Glide + json)

app app Hi, thanks in advance to those who guide me. I have a problem with the Set Wallpaper, that when I clicked on the button, I get the following error: 2

Spring Boot: Use ThreadLocal-variable or pass parameters

I´m wondering what is best practice with spring-boot and the already provided helper-classes that use ThreadLocal for saving values suche as LocaleContext

How do I fix "Could not connect to remote process" while trying to debug the application?

I am making a android studio project and I try to debug my application. Running the application works fine, but when I try to debug it I get this error: Coul

Spring Batch how to process list of data before write in a Step

I am trying to read client data from database and write processed data to a flat file. But I need to process whole result of the ItemReader before write data.