Category "java"

java.lang.IllegalArgumentException: input == null! when using ImageIO.read to load image as bufferedImage

This is a question that has been asked like 100 times on this site, but I have looked at all of them and even though they all were solved, none of the solutions

Is tagging a form of data mining?

I am implementing a small CRM system. and the concept of data mining to predict and find opportunities and trends are essential for such systems. One data minin

Could not transfer artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.7.1 from/to central (http://repo1.maven.org/maven2)

I have created a new maven project in SpringSource Tool Suite. I am getting this error in my new maven project. Failure to transfer org.apache.maven.plugi

Unknown version of Tomcat was specified with tomcat -9.0.37

I downloaded the windows service installer of version 9.0.37.But at the time of connecting tomcat with eclipse IDE which is of version 2020-06 it is showing er

Merging three threads in Java

I am trying to create few flows in java, my program must to create 3 threads and 1 main thread, and than stop. I created class with implemented Runnable class N

Update elements in a JSONObject

Lets say I gave a JSONObject { "person":{"name":"Sam", "surname":"ngonma"}, "car":{"make":"toyota", "model":"yaris"} } How do I update some of the values

spring boot doesn't shows custom error pages

I added spring-boot-starter-thymeleaf dependency to my project that using spring boot 2.3.1.RELEASE and placed error.html file inside src/main/resources/templat

How to handle "org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error" in Spring?

I'm adding an API to an existing Spring Boot project using @RestController. My Spring Boot experience is: This is my first time using it. The RestController wor

Java 8 Stream - .max() with duplicates

So I have a collection of objects that have a step variable that can be 1 - 4. public class MyClass { private Long step; //other variables, getters, s

Attach the Source in Eclipse of a jar

I added a Student.jar into my Build Path in my eclipse like this- Right click on the project->BuildPath->Configure Build Path->Libraries->Add

Sorting an array of integers in descending order and relating it to its corresponding string array

I am trying to output the names and corresponding scores in descending order. Having an array of strings and another array of integers, I am trying to relate th

Finding the middle element(s) of an array in Java

Given an array of integers, I need to return a new array containing the middle element(s) from the original array. Specifically, the result will have one elemen

org.eclipse.core.runtime.CoreException: Module named '_auto_generated_ear_' failed to deploy

I was following this tutorial. And I followed the steps. But I am getting this error: org.eclipse.core.runtime.CoreException: Module named '_auto_generated_e

Apache POI: Is it possible to use SXSSF without temporary files?

I'd like to use SXSSF (Streaming Usermodel API) from Apache POI. What I don't like is that it uses temporary files. Question: Is it possible in Apache POI to f

Check Selected Product and product which is added to cart are same or not

I have searched for a mobile product which is of type " Asus Zenfone 5 " in flipkart.com website, search display many products. I selected first product and add

Android how to make ok button on dialog not all caps

For an alert dialog in Android, how do you make the positive button not have all capital letters. The text is "OK" instead of "Ok".

deploy ear file to weblogic 10g

I have coded project in java ee. by using java ee version 6. when I try to deploy my ear file into weblogic 10g I receive the following error: How can I achiev

Where are all the javax jars?

Edit: several fellow SOers have recommended just going to Maven repos, which of course have nothing to do with using Maven as part of one's build. I understand

Append the value of argLine param in maven-surefire-plugin

I am using maven-surefire-plugin + Sonar together and I would like to add some extra value to argLine parameter of the maven-surefire-plugin. So I did it: <

Mockito verify unit test - Wanted but not invoked. Actually, there were zero interactions with this mock

At first I want to sorry for my english. I started to make some unit tests (i've never done this before, i'm a new guy in programming). I have to test simple