Category "java"

intellij incorrectly saying no beans of type found for autowired repository

I have created a simple unit test but IntelliJ is incorrectly highlighting it red. marking it as an error No beans? As you can see below it passes the test?

Finding the rank of a student GPA in Binary Search Tree

I've read all the posts related to this question, yet I am still having a very hard time understanding how to implement the algorithm. I have a fully written BS

How to count JSON Objects in array filtered by attribute of the object by JSONPath

I'm writing a JSONPath expression that counts objects in an array while filtering by one of the field of the object. Input JSON taken from http://jsonpath.hero

PersistenceException occured : org.hibernate.exception.ConstraintViolationException: could not insert: [models.User]

I have got this exception!! here is my model class @Entity public class User extends Model { @OneToMany(mappedBy="email", cascade=CascadeType.ALL) pub

Problem with concatenated messages in JSMPP

I have a problem sending concatenated messages to my SMSC, here, I will do my best to describe the problem. When sending concatenated messages, my SMSC waits to

Java ZIP - how to unzip folder?

Is there any sample code, how to particaly unzip folder from ZIP into my desired directory? I have read all files from folder "FOLDER" into byte array, how do I

Regular Expression Wildcard Matching

I have a list of about 120 thousand english words (basically every word in the language). I need a regular expression that would allow searching through these

Flutter :The shrinker may have failed to optimize the Java bytecode

I'm trying to integrate cloud firestore to and android app but all I get is this error every single time Launching lib/main.dart on Android SDK built for x86 i

SDKmanager : Warning: Could not create setting. java.lang.IllegalArgumentException

Im trying to install androidSDK on my Ubuntu but when i try to run the SDK manager on the tools/bin/sdkmanager folder i get this message: My Ubuntu was install

How to improve the code to return the unpaired element

I am practising for an upcoming coding interview and here is one of my practice problems and my progress. How can I improve the program and what is your advice?

Spring Boot shutdown hook

How can I register/add a custom shutdown routine that shall fire when my Spring Boot application shuts down? Scenario: I deploy my Spring Boot application to a

{WebElement}.getAttribute("value") returns 0

I am interacting with an element within a webpage: <li class="MuiButtonBase-root MuiListItem-root MuiMenuItem-root jss524 MuiMenuItem-gutters jss525 MuiListI

Mono class in Java: what is, and when to use?

I have this following code: import org.springframework.http.MediaType; import org.springframework.stereotype.Component; import org.springframework.web.reactive

Unrecognized token error while converting JSON String to Java Object List

here is the JSON string which I want to convert as java object List. String manuallyVerificationRemarks = "[{ "logedInUserName": "forum-admin", "action

config log4j via slf4j

we have a standalone java project using log4j for logging,and we don't config log4j via the classpath configuration. we config it in my code as bellow: String

How to apply aggregate functions(like MIN, MAX, COUNT) in JCR-SQL2?

I have some records stored as Nodes in JCR and the name of the node is the primary key. eg 1,2,3. But the problem starts here, the records are as follows 1,2,6

3-Dimension List or Map

I need something like a 3-dimension (like a list or a map), which I fill with 2 Strings and an Integer within a loop. But, unfortunately I don't know which data

IntelliJ IDEA tells me "Error:java: Compilation failed: internal java compiler error idea"

When I compile a Java project using IntelliJ IDEA, it gives me the following output (and error): Information:Eclipse compiler 4.6.2 was used to compile java so

Passing a parameter versus returning it from function

As it might be clear from the title which approach should we prefer? Intention is to pass a few method parameters and get something as output. We can pass ano

Missing JUNIT Jar Exception while building project using Maven

I am in the beginning phase of Maven. I created a project and was trying to use the command. what is missing at my end? I am trying to compile and run a TestSui