Category "java"

Deserialization of ser. files not working

I am trying to practice Deserialization with ser files, but every time I do, I get an error. here's the code: import java.io.*; public class Main { public

Hibernate keeps creating N+1 querys

I've got no idea why is this happening. I thought the "JOIN FETCH" thing and/or "EntityGraph" were meant to address this, but then the query made by Hibernate l

Java operator + & <= is undefined for the argument type(s) double, boolean [closed]

Hi I am struggling with following Task.Can someone explain me how to solve this at a beginner level Given: Initialize the variables with the s

NullPointerException: Cannot invoke "JComboBox.getSelectedIndex()" because "this.this$0.comboBox_1" is null

My combo box always returns null value. In my Project "Attendance Management System", I need to validate the selected item in the combo box, but it returns null

How do I round to the nearest ten? [duplicate]

How can I round a number to the nearest ten with no if statements? For example, 98 to 100. int num = 87; double t; double d = 1.0 * num; // d

Micro QR code Decoder Library for Android

Is there any open source micro QR code scanner for Android? Ive been going a fair bit and I only found Google's library and Zxing both of which do not support i

Null pointer exception in SFTP upload using Apache Commons VFS

I have code to use SFTP for uploading file to a remote server. I am using Kotlin/Java and Apache commons library. val manager = StandardFileSystemManager() mana

method to add objects to ArrayList using user input

Can't take my head around the following: There are 2 classes - "Item", where attributes (Name, Price) and constructors are set, and main "Store". In the last o

Spring Boot: repository does not autowire in the custom validator

I have a custom validator that validates data against DB using repository: @Constraint(validatedBy = DataValidator.class) @Target(ElementType.FIELD) @Retention(

Spring Webflux - "scanAvailable": true

I'm using a RouterFunction to define endpoints in my Spring Boot application. My service returns a Mono<Object> and I want to return the result of this wh

RxJava message on successful retry

How can I print message on successful retry while using retryWhen operator? Let's say I have Flowable.defer(() -> subscribe()) .retryWhen(error ->

what is Android app run error in Android studio [duplicate]

Execution failed for task ':app:dataBindingGenBaseClassesDebug'. > Parameter 'directory' is not a directory * Try: Run with --info or --de

Auto attached records get detached after commit

I have want to fetch a list of Relation records, and I'll use .fetchInto(RELATION); and I want to iterate over the list and commit each iteration to the databas

How to Check and Read Number of bytes present in a socket into a byte array in java?

I have a C# server that is sending a file (in bytes) to my JAVA client. Currently I am using DataInputStream to read data from socket with a buffer size of 1024

In Spring Boot what is the difference between CrudRepository and JpaRepository in extending a Java repository interface

when building respositories in spring, in my repository interface i extend it using the below extends CrudRepository<EntityName, EntityType> where EntityN

Configure CircleCI for Maven project using Nexus repo

I'm using external Nexus repository for java maven project and I trying to config circleCI config. At first I need to somehow say CircleCI to look into env vari

Is it possible to edit the properties of a single tile in JavaFX tilepane?

Is there a way in JavaFX to get/change the properties of a single tile in the tilePane layout? More specifically, I am looking to change the color of a single t

okhttpClient requset download file fail,Server is built by Netty

Now,i build nettyServer and use okHttp request download, but okhttp response not has dataiostream, could someone help me solve the problem? code Server by Netty

Docker could not find or load main class. Caused by: java.lang.ClassNotFoundException: src.com.company.Main.java

I am new to learning Docker, and followed a tutorial to make a small Hello World application to dockerize. I used Intellij template to generate a main method, w

Java web application when hosted on server, cant find resources under [/] "The requested resource [/] is not available"

I made spring boot web app that works perfectly when I run it in Localhost, but when I exported it from IntelliJ to .war ( via Maven/package ) and upload it to