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

What causes the PropertyReferenceException

I’m getting below error and couldn’t figure it what causes the issue. 2024-10-19T11:26:28.546+05:30 WARN 9455 --- [rentsysapi] [nio-8080-exec-2] .m.m.a.ExceptionHandlerExceptionResolver : Resolved [org.springframework.data.mapping.PropertyReferenceException: No property 'asset' found for type 'AssetVehicle'] Asset Vehicle entity: @NoArgsConstructor @AllArgsConstructor @Getter @Setter @Entity @Table(name = "asset_vehicle", schema = "public") @EntityListeners(AuditingEntityListener.class) @Audited public class AssetVehicle extends BaseExpireEntity { @Id @GeneratedValue(strategy = GenerationType.UUID)

Read More
java

Mobile Application Using Hotspot as Access Point

We are currently developing an android mobile application for attendance. We are planning to make the mobile hotspot as an access point is it possible? This should be the step by step process Students must connect to the teacher’s hotspot. App verifies if the student is connected to the correct BSSID by comparing it with

Read More
java

Tcs codevita presentaion errors

I’m currently participating in TCS CodeVita and facing a recurring issue with presentation errors, despite submitting what I believe to be the correct code. This has been a frustrating experience, as I’ve carefully reviewed my code multiple times to ensure it meets the problem requirements and follows the specified input-output format. However, each submission still

Read More
java

Number of threads for CPU bound tasks in multithreading

Assume n is the number of available cores, where n is more than 1 (ie. we have a multi-core processor). I think most places that I read say that we should set the number of threads to be n, if the task is CPU bound, and, of course, parallelisable. In the case of web applications,

Read More
java

Getting Null pointer exception at OidcAuthorizationCodeAuthenticationProvider inspite of getting id/access tokens in Rest Template interceptor

I am trying to integrate Spring Security in my Spring Boot project using below dependency Please not Sprint boot starter version is 3.2.0 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-oauth2-client</artifactId> </dependency> I have a SecurityConfig class with RestTemplate configurations for getting the access token. I am able to see the id_token and access_token in the log file which is

Read More
java

PSQLException relation error Keycloak relationship spring boot

I recently migrated my Spring Boot application along with Keycloak from MariaDB to PostgreSQL. After migration, I started encountering the following error: Caused by: org.postgresql.util.PSQLException: ERROR: relation "keycloak.user_entity" does not exist Position: 51 The table definitely exists, and my application can connect to the database. However, I suspect this issue might be related to how

Read More
java

how to find where my Junit4 dependency was brought in at a Maven project?

I’ve migrated my Maven project from Junit4 to Junit5, and removed this line: <junitVersion>4.9</junitVersion> from my pom.xml file. But somehow, I’m still able to use this import org.junit.Test; in my code, I’d like to know which one of my libs brought Junit4 in as transitive dependency. I used mvn dependency:tree, here’s what I have and

Read More
java

Android application doesn't save data on firebase firestore console site

I tried putting firestore using the option in Android Studio which is in "Tools" and I also tried putting it directly (putting the dependencies and everything else). Also I connected my project on the firebase console and I checked it and it is connected, but when I run the app and try to save data

Read More
java

Kafka ProducerFencedException When Using Transactions with Spring Kafka and Database Synchronization

I’m encountering a ProducerFencedException while trying to synchronize events between Kafka and a PostgreSQL database using Spring Kafka. The events are sent to Kafka and the database updates successfully, and I can see the events in the Kafka topic when I use the read_uncommitted isolation level. However, the consumer doesn’t seem to consume messages with

Read More
java

making one annotation out of severals

I’m using JPA and in almost every entity class, I have the same 3 annotations for my id: @Entity public class Club { private static final String SEQ = "Club_Seq"; @Id @GeneratedValue(generator=SEQ, strategy=GenerationType.SEQUENCE) @SequenceGenerator(name=SEQ, sequenceName=SEQ, allocationSize=1) protected long id; } what I’d really love is shortening it and make my own annotation that will be

Read More