Questions tagged [spring5]
94 questions
0
votes
0 answers
Apache Velocity 1.7 cannot find templates, but only when deployed on linux
We are in the process of upgrading our Spring Application from Spring 4 to Spring 5, and so far everything is working well, except that we use Apache Velocity to build emails from templates that get sent to users based on certain activities within…

Paul
- 23
- 5
0
votes
0 answers
How to implement this logic
Implement Before advice ONLY for addMoneyToWallet() method of Service Impl class. Log the current date and time in the console at INFO level using logger variable. Add annotations to make bean for Aspect class and write pointcut expression.…
0
votes
0 answers
Resolve Custom Protocol Prefix in spring configuration
I am trying to create a property in my application.properties file
application.required.host.endpoint=db:feature-flag?old-value-label:new-value-label
I need to load feature-flag,old-value-label and new-value-label from database and evaluate this as…

prajitgandhi
- 483
- 1
- 5
- 20
0
votes
0 answers
NoSuchBeanDefinitionException: No qualifying bean of type 'java.lang.String' available: expected at least 1 bean which qualifies as autowire candidate
After Upgrading Spring packages from 4.3 to 5.3 I am seeing below error in my service. It was working fine before upgrade
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'java.lang.String'…

tahsin raza
- 3
- 3
0
votes
0 answers
java.lang.AssertionError: at org.springframework.test.util.AssertionErrors.fail at AssertionErrors.java:59
I have upgraded java8 to java 17 and spring 4 to spring 5 , I am getting this error.
java.lang.AssertionError: Status
Expected :400
Actual :401
at org.springframework.test.util.AssertionErrors.fail(AssertionErrors.java:59)
at…

Aditi Mogha
- 13
- 3
0
votes
0 answers
java.lang.NoClassDefFoundError: Could not initialize class com.jayway.restassured.RestAssured
I am getting this error, test cases are getting failed, while upgrading the application to Java 17.
I am using dependencies…

Aditi Mogha
- 13
- 3
0
votes
0 answers
Upgrading spring from 3.0.5.RELEASE to 5.1.8.RELEASE and hibernate from 3.3.1.GA to 5.6.12.Final, getting error "no transaction is in progress""
I am using two dataSource x and y in my project.
and using 2 transactionManager tmx and tmy respectively for that.
Enable synchronization for tmy with SYNCHRONIZATION_ALWAYS and not enable for tmx with
SYNCHRONIZATION_NEVER.
while starting up the…
0
votes
0 answers
Controllers assert to be null when doing SpringBootTest
When I run the below test, the controllers are always null. Not sure how to fix it or missing anything.
@ExtendWith(SpringExtension.class)
@SpringBootTest
@ActiveProfiles("tests")
class ApplicationTests {
@Autowired
PatientController…

FattyK
- 13
- 2
0
votes
1 answer
java.lang.NoClassDefFoundError: org/springframework/core/metrics/ApplicationStartup on startup using Spring5
I am getting below error on server startup when trying to have a REST API with spring 5.
Maven build is generating the war, but when I am running the application using Smart Tomcat, I am getting below error.
20-Sep-2022 17:16:59.737 INFO [main]…

Abhinash Jha
- 165
- 1
- 3
- 17
0
votes
1 answer
WebClient To Retrieve From jsonplaceholder URL Using POST Giving UnknownHostException (Unable To Resolve )
I am using the new Spring 5 WebClient to retrieve the JSON response from the JSON Placeholder tester website (https://jsonplaceholder.typicode.com/) using a POST request sent to the URI https://jsonplaceholder.typicode.com/posts placed in my request…

Ezani
- 535
- 3
- 18
0
votes
1 answer
spring-flex 1.0.3.RELEASE issue in integrating spring 5.3.20
Currently using spring-flex 1.0.0.M2, As part of spring upgrade to 5.3.20, upgraded spring-flex to 1.5.2.RELEASE.
I'm getting the following error:
ERROR [org.springframework.web.servlet.DispatcherServlet] [localhost-startStop-1] Context…
0
votes
1 answer
Spring integration 4 to 5 migration - Issue with integrationGlobalProperties
We have been using Spring integration 4.3.1.RELEASE along with Spring core 4.3.2.RELEASE. Recently we had to upgrade the stack with 5.5.11 and 5.3.19 versions resp. This is not a Spring boot app.
After the migration, we are getting below error on…

Jacob
- 426
- 3
- 19
0
votes
1 answer
Spring 5: use RestTemplate to POST multiple files with POJO; MediaType.MULTIPART_FORM_DATA with LinkedMultiValueMap
Versions:
Java 11
Spring 5.3.9
Jackson 2.13
org.apache.httpcomponents:httpclient: 4.5.13
I believe the issue here is that out-of-the-box, RestTemplate cannot deal with an HttpEntity for which the value is itself a MultiValueMap with (String,…

Kode Charlie
- 1,297
- 16
- 32
0
votes
2 answers
How to find which method is called when going to route?
I am getting too many redirects error I and want to find in which method this happens. The url I am going is
https://localhost:8443/OpenELIS-Global/
I tried searching codebase for OpenELIS-Global but I could not find something related with…

Darius.V
- 737
- 1
- 13
- 29
0
votes
1 answer
Spring 5: can ChainFileListFilter process files in specified sorted order?
Versions:
Spring: 5.2.16.RELEASE
Spring Integrations: 5.3.9.RELEASE
Ubuntu: focal [20.04.3 LTS]
Java (build and runtime): 11
I am using ChainFileListFilter as follows:

Kode Charlie
- 1,297
- 16
- 32