lars
lars
JCHJava Community | Help. Code. Learn.
Created by lars on 11/27/2024 in #java-help
Using singleton pattern at a request level basis
I am fetching a response twice in an api flow. So how can I use singleton pattern here to return the same response again without making the second call.
34 replies
JCHJava Community | Help. Code. Learn.
Created by lars on 9/17/2024 in #java-help
Handling Race condition
My db is getting from two flows - updateByWebhook - can make the status to success and try another registation - can make status to created, now I have to handle the case where the registration flow begins and then the webhook updates the record to success and after this in the registration flow we try to save the record again. condition is record should not update if it is already in success state.
4 replies
JCHJava Community | Help. Code. Learn.
Created by lars on 6/1/2023 in #java-help
Getting Slf4J error in SpringBoot
Error is
Exception in thread "main" java.lang.AbstractMethodError: Receiver class org.springframework.boot.logging.logback.RootLogLevelConfigurator does not define or inherit an implementation of the resolved method 'abstract void configure(ch.qos.logback.classic.LoggerContext)' of interface ch.qos.logback.classic.spi.Configurator.
at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:156)
at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:417)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:388)
at com.pchf.avkashservice.AvkashServiceApplication.<clinit>(AvkashServiceApplication.java:17)

Process finished with exit code 1
Exception in thread "main" java.lang.AbstractMethodError: Receiver class org.springframework.boot.logging.logback.RootLogLevelConfigurator does not define or inherit an implementation of the resolved method 'abstract void configure(ch.qos.logback.classic.LoggerContext)' of interface ch.qos.logback.classic.spi.Configurator.
at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:156)
at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:417)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:388)
at com.pchf.avkashservice.AvkashServiceApplication.<clinit>(AvkashServiceApplication.java:17)

Process finished with exit code 1
attached my pom.xml
25 replies