Have developed a springboot project and Using H2 database in writing testcases, if we run individual controllerTest class , All testcases are passing. but we run all the test classes together few test classes are failing with below error: Using following annotations for each controllertest class: H2 database …
Tag: spring-boot
Azure spring boot function-how to pass trigger and input binding both to handleRequest method at same time?
getting below exception when I create tuple of Http trigger and blobinput and send it to handleRequest.. [2021-08-20T09:53:12.816Z] java.lang.UnsupportedOperationException: At the moment only Tuple-based function are supporting multiple arguments [2021-08-20T09:53:12.818Z] at I need to send both inputs to han…
I get empty list from findAll Spring data and h2 data base while the database is not empty
I have a spring boot API project with h2 database. I added some data in the data.sql but the data wasn’t inserted into the database however tables are created successfully when I call the findAll API I get an empty list due to the database tables are empty. Application.properties data.sql Pom.xml Main C…
GenerationTarget encountered exception accepting Error executing DDL
I am trying to create create a table using jpa entity in SQL Server but when i run the application I am receiving error in creating the table by hibernate. I saw some other solutions as well but they were for mysql as the problem was with the hibernate dialect. I tried different dialect but none of them worke…
Ways to implement Google Pub Sub
I found these 3 ways for implementing messaging with Google Pub Sub: with client libraries https://cloud.google.com/pubsub/docs/publisher with spring integration message channels and PubSubTemplate API https://dzone.com/articles/spring-boot-and-gcp-cloud-pubsub without message channels but with PubSubTemplate…
Some doubts about this Spring Batch @Scheduled() annotation and how to manually start a Spring Batch job?
I am pretty new in Spring Batch and I have the following doubts about how to schedule the job start at a specific time. Into my project I have this SpringBatchExampleJobLauncher class: As you can see it contains the runSpringBatchExampleJob() method running the job at a specific time set by the cron expressio…
Can’t start Spring Boot because of the class mapping
I was trying to start an Spring Boot application, with a simple class JPA mapping and H2 database, but every time I try to start the application, I have the same class error at the same column. Class with error: Error logged: The column that is with error is a table and already mapped: My H2 configurations: I…
AWS – Ubuntu User Session Stops Spring Boot App
this is my first deploy on AWS. I have a Spring Boot API on an EC2 AWS instance. To run my API I run the command ‘java -jar app.jar’, this works for a while, but when the session for the ubuntu user is logged out my API stops. Then I have to run the command ‘java -jar app.jar’ and so
How to call class from another module in SpringBoot, Java
I have a Spring Boot multi-module gradle project, and I am trying to call class from another module. I have a HttpDataClient.java class that I would like to call in DataResolver.java class in another module. HttpDataClient.java So, this class should return some response data from Data service. After I would l…
How to pass an a single parameter in JSON body and why am I having an exception doing that?
Here is the code I have: Here is the JSON body I pass to this method Here is the exception: If I change value to String like this: I have this error: The question is how can I pass a single parameter in JSON body and why do I have these exceptions? I do appreciate your answers a lot! Answer