Category "java"

Streams Processor key-value types

I'm trying to implement a custom topology processing step implementing the Processor interface and then adding an instance of my custom processor to the topolog

Accessing application property in Spring boot application from MapStruct mapper

I want to access basic-info.expiration from application.yml a Spring boot application. application.yml basic-info: expiration: 6 UserMapper.java @Mapper(comp

How can I change JDK 1.8 to JDK 11 in Heroku?

I created pipelines for bitbucket to deploy app to Heroku. I use java 11 but Heroku installs 1.8. How to fix it? I also created system.properties in main/resou

Android Studio - Trying to Read MP3 FIles from the Music Directory on Android Device

I have a function below that I got from a post on here, where I am trying to read the music files from the device. public List<AudioModel> getAllAudioF

Tomcat catalina logging

I am using SpringMVC framework and Java 8 for development. In the Tomcat catalina.out file, the date timestamp and threadid are not added along with my applicat

SQL error coming while trying to access SQLite.db

I am trying to access my SQLite database which is in a Java package. When I am giving it's absolute path then it's OK, but when I am putting my db file inside j

Can't get a Java heapdump from a docker container

My Java process is stuck and hogging a lot of CPU on the VM. I am trying to get to the root of the issue by getting a heapdump. This process is running in a doc

Problem with Obsolete file handle running Java Webapp with Log4j2 in Tomcat server farm

We have a Java Spring web application with Log4j2 configured with RollingFile active running on a Tomcat server farm with NFS storage configured. Catalina out l

File downloads but while extracting it gives "invalid zip file"

I am working on a jsp zip file download ,I am able to download the file but while extracing I get Invalid zip file error. In the java controller I have added @

Getting this error while calling a hardcoded insert query in myBatis

10:59:35,454 ERROR [stderr] (pool-6-thread-1) org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:

Copy large regions with Spigot

I'm currently working on a training plugin, where every player would get his own region, to learn bridge for example. So when a player joins, the plugin should

gradle wrapper reports x86-64 architecture instead of arm-v8 architecture on Mac m1

Hello when working from a Mac m1, Gradle wrapper task reports incorrect architecture compared to gradle : Here is the result of ./gradlew clean : operating syst

How do I capture inputs from a system.out.println to compare if they match? [duplicate]

I am a first year studying app development and I have a login and registration assignment. But Im struggling to make a method where it checks

How to write a unit test for spring specification?

I created a builder class which construct Specifications object. It is used for creating queries for JpaSpecificationExecutor. The builder is used, because I ha

How to specify CryptoComply algorithm provider in new Spring SAML2?

Our identity provider uses keys and certificates in the BCFKS format. To use that format in key tool we specify the CryptoComply algorithm (not service) provid

Breaking on unhandled exceptions in other people's code

Note: this entire discussion is exclusively about unchecked exceptions. Checked exceptions have nothing to do with what I am talking about here. So, I have my I

Axon Aggregate Identifier Type Converter

PROBLEM: In an aggregate-state Axon SpringBoot application @AggregateIdentifier is of type UUID and PostgreSQL database column is of type UUID. When persisted o

Unable to register MBean

I am writing integration tests for a spring-boot application, and I am using a base test class for common methods and all the other common stuff. Something like

Avoid ConcurrentModificationException on java stream using cache

I'm getting occasionally ConcurrentModificationException with the following code: public Set<MyObject> getTypes(Set<Type> names) { Set<My

Annotation processor @autoservice

Need help with annotation processor . I have created a simple annotation processor which uses @autoservice annotation that checks whether the field which is ann