October 21, 2024
Chicago 12, Melborne City, USA
java

ParallelStrams with hibernate entity with lazy load with exception JdbcValuesSourceProcessingState

I have the entity PROJECT with the Child OUTPUS (relational @OneToMany). In my app, i need get more tha 50000 projects by database and after get the OUTPUT information. After get the 50000 projects, for performance, i try user the parallelStream, but when run the code, the exception is throwed: Illegal pop() with non-matching JdbcValuesSourceProcessingState

Read More
java

ANTLR grammar creation for a custom file structure

Can somebody help in creating a grammar for following structure to generate a parse tree? kinds name test_val_1 length ten test_val_2 uses use1 testcase_1 use2 testcase_2 kinds should be the root node under which the child nodes are name, length and uses name should have another child node having the value separated by a space

Read More
java

Cannot resolve symbol 'embedding' in flutter

I have an Android Project Studio, with MainActivity.java class on which I want to add a flutter screen. I generated and built my flutter-module, included the dependencies. Sync works, but when I import io.flutter.embedding.engine.FlutterEngine, it keeps saying "Cannot resolve symbol ’embedding’." I unzipped the jar files and looked into the jar to see if the

Read More
java

Java WebFlux r2dbc might not have been inizialized repository interface

I m building a Java SpringBoot Application with WebFlux. So in this application I need to make some APIs to get data from database TSQL using r2dbc. So I create this code, this is my interface Repository: import it.silver.data.pojo.Percorsi; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.reactive.ReactiveCrudRepository; import reactor.core.publisher.Flux; public interface PercorsiRepository extends ReactiveCrudRepository<Percorsi, Integer> { @Query("SELECT * FROM

Read More
java

Problem with making a .jar with JavaFX and maven

newbie here, I´m creating an App in IntelliJ with Maven, JDK 22, non-modular and using JavaFX 17.0.10, the problem is that when I generate my .jar with dependencies, it doesn’t open by double clicking it, instead I have to use java --module-path "C:\path\to\javafx-sdk-17.0.10\lib" --add-modules javafx.controls,javafx.fxml -jar BO-1.0-SNAPSHOT-jar-with-dependencies.jar in cmd. When i run mvn clean package

Read More
java

Spring Boot App throwing a strange exception

I am following a tutorial and everything seems to work for the author but not for me. The purpose of the use case is to add a new category (id, name, image and a boolean value). Category entity: @Entity @AllArgsConstructor @NoArgsConstructor @Getter @Setter public class Category { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private int id; private

Read More
java

Spring 6 OAuth 2.0 – No Refresh Token

I got stuck with the OAuth 2.0 Server in Spring 6 Spring Boot 3. I build an AuthServer and an ResourceServer. With my JS-Client I can Log in, get an auth-code, then I can exchange this code for the access-token and here begins the dilema. I get an json-obj with: access_token scope id_token token_type expires_in

Read More
java

Postgres drop type XX000 “cache lookup failed for type”

I’m using Quarkus and Hibernate to work with PostgreSQL/PostGIS. I have an entity Geofence that contains a Polygon field. The issue occurs when running tests with Cucumber. The problem: When running the tests, I get the following error on the second and subsequent examples within the test scenarios: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not execute statement ...

Read More
java

Why one to many data not go to backend?

I currently creating supplier form that we can add supplier and assign him to different brand and categories.that mean supplier related with one to many relation with supplier_has_brand_category. but i face this issue. frontend supplier obj pass correctly without any other issue. but backend supplier_has_brand_category is null. Supplier Entity import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue;

Read More
java

the request was rejected because no multipart boundary was found (java/angular)

i’m trying to build a project in Angular and Java where i upload a file from the frontend interface to a mysql database through the backend built in spring boot. When i upload the file from postman it works. When i upload it from the frontend i get the following error: org.apache.tomcat.util.http.fileupload.FileUploadException: the request was

Read More