Questions tagged [spring-3]
Version 3.x of the Spring Framework, use [tag:spring] for general Spring related questions.
762
questions
1
vote
0
answers
46
views
JmsPoolConnectionFactory uses wrong keystore during sslEnabled connection
When I'm using org.messaginghub.pooled.jms.JmsPoolConnectionFactory with org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory and sslEnabled=true I'm getting an error when receiving ...
0
votes
0
answers
37
views
How do you get changes made by a database trigger back to the entity
How can I refresh the entity inside a transactional method so that the properties changed by a trigger become visible?
I have a trigger that sets/updates certain columns before an insert/update. ...
0
votes
1
answer
91
views
error: cannot access MappedSuperclass on JPA
I'm making a migration from Spring boot 2.7 to Spring boot 3.0, I found an error: cannot access MappedSuperclass and i suspect that is from JPA, I already changed dependencies and all javax for ...
0
votes
1
answer
51
views
How to define two authentication mechanism for different routes in Spring Security 6?
All routing files config, except for /actuator/**, the entry point is of type "JwtAuthenticationEntryPoint" (Custom defined)
@Bean
@Order(1)
public SecurityFilterChain ...
1
vote
2
answers
39
views
Spring 3 -- can't refresh csrf token
I have a production application that will refresh a csrf token like so
private static final String CSRF_TOKEN_SETTER = "window.import.meta.env.CSRF_TOKEN=\"%s\";";
// sets ...
1
vote
0
answers
34
views
ResponseStatusException exception handler not triggered?
I'm trying to add an exception handler for ResponseStatusException in my Spring 3 project.
@ControllerAdvice
public class ErrorHandler extends ResponseEntityExceptionHandler {
@Autowired
...
0
votes
0
answers
21
views
Passing data to a repository rest api in a spring boot application
I have 2 entities -
public class Instance {
@Id
@GeneratedValue(strategy = GenerationType.UUID)
private UUID id;
private String name;
private LocalDate startDate;
@...
0
votes
0
answers
31
views
Remove type and properties from ResponseStatusException
I'm throwing the following response status exception in my Spring Boot 3.0 application.
throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "No ids have been provided");
This returns ...
0
votes
0
answers
58
views
How to check http status in springboot 3 using keycloak for token verification?
I want to create a method for token verification which will send a request to the userinfo endpoint of keycloak and send me back, true or false.
true if the response status is 200 (OK)
false if the ...
0
votes
0
answers
27
views
PLS-00306: wrong number or types of arguments in call to 'FUNCTION_NAME' ORA-06550 while migrating to Spring 3.x
I'm working on migration my existing Spring 2.x project to Spring 3.x. I'm facing the below mentioned error,
PLS-00306: wrong number or types of arguments in call to 'FUNCTION_NAME'
ORA-06550: line 1, ...
0
votes
1
answer
173
views
Liquibase 4.21 onwards not creating the changelog. DATABASECHANGELOG is empty
I have recently upgraded my application to spring boot 3 and using the latest version of liquibase i.e. 4.22
After the upgrade, liquibase has stopped executing the changelogs & the ...
0
votes
0
answers
14
views
Spring3 Validation with MongoDB: ValidatingMongoEventListener doesn't work
I want to validate @Documents in spring3 whith mongoDB, but my mongo configuration doesn't work.
this is my configuration:
@Configuration
public class MongoConfig {
// ...
@Bean
public ...
-2
votes
2
answers
198
views
java.lang.IllegalStateException: Unable to find match between the canonical context path
I am migrating some of my spring projects from Spring 2 to spring 3.0.4. Most of them are communicating within Rest calls. I see for some requests I am getting the below error .
java.lang....
0
votes
1
answer
2k
views
Spring Boot 3 - Validate JWT token using RSA256 public key
Using the new Spring-Security-Web starting with 6.0.0, I wanted to know how to validate a Bearer JWT using a RS256 public key and set the "Authentication" in the Spring Security Servlet ...
0
votes
1
answer
292
views
Spring Boot 3.0.0, @Value annotated field is not being updated with the latest value from the Cloud Config Server
Trying Spring Cloud Config to externalize my application's configuration, but not able to update @value at runtime.
@RefreshScope
@RestController
@RequestMapping("/apiService")
public class ...
0
votes
2
answers
198
views
API Basic authentication
My application has spring 3 xml based configuration.
I'm calling a REST API from Postman (Not form based login) with username-password in Authorization header.
For authentication I have created ...
1
vote
1
answer
167
views
Spring boot 3.0.4: entity populations is no working when I retrieve from database using inmutable objects
I want to retrieve a entity after saved it in the database using inmutable objects, no getters no setters
Env.
Spring boot 3.0.4.
Java 17
Postgres 15
I try to set a inmutable entity
Entity
@Entity
@...
1
vote
0
answers
103
views
What is the equivalent of TraceWebFilter with Micrometer Tracing?
Similar to ReactorNettyHttpTracing (deprecated) equivalent in Micrometer Tracing I am looking for the equivalent of org.springframework.cloud.sleuth.instrument.web.TraceWebFilter with the Micrometer ...
0
votes
0
answers
179
views
Can I create a custom exception handler for ResponseStatusException?
I'm throwing response status exceptions in my codebase that look like this:
throw new ResponseStatusException(HttpStatus.NOT_FOUND, "Resource not found!");
throw new ResponseStatusException(...
3
votes
3
answers
766
views
spring data 3.0 PagingAndSortingRepository, migrating from 2.0
This might be a stupid question to any java knowledged person, but me just looking at from logical point of it doesn't seem to be that simple.
Previously when PagingAndSortingRepository extended ...
4
votes
0
answers
463
views
Spring Boot 3 @SpringBootTest-annotated tests does not execute gateway auto-configuration
I have a very simple test:
@SpringBootTest(properties = {"instance.role=GATEWAY", "instance.name=test-instance", "debug=true"})
@TestPropertySource(locations = {"...
3
votes
0
answers
649
views
ReactorNettyHttpTracing (deprecated) equivalent in Micrometer Tracing
What would be the equivalent of ReactorNettyHttpTracing (deprecated) in Spring Boot 3 with Micrometer + Brave?
@Bean
public ReactorNettyHttpTracing reactorNettyHttpTracing(HttpTracing httpTracing) {
...
2
votes
1
answer
5k
views
Spring boot 3 multiple security filter chains doesn't work
I am using Spring Boot 3.0.1. In my WebSecurityConfig class, I want to filter 2 types of api urls.
So I have 2 SecurityFilterChains. This is what I want to achieve.
1.) Login api: This one, I want to ...
0
votes
2
answers
405
views
RestTemplate cannot deserialize a JSON array
When I try to get a list of values using RestTemplate, I get an error. I use Spring 3.0.0.
Caused by: org.springframework.web.client.RestClientException: Error while extracting response for type [...
0
votes
0
answers
149
views
Spring State Machine fails to autowire persistence Repositories after upgrading project to Spring 3.0
When creating sample project to learn Spring state machine I stumbled upon an error:
Consider defining a bean of type 'org.springframework.statemachine.data.redis.RedisStateMachineRepository' in your ...
0
votes
1
answer
185
views
Unexpected error (type=Forbidden, status=403) using csrf with Spring Security v3.0.0 and Thymeleaf
I try to configure security of my application but I get "Unexpected error (type=Forbidden, status=403)" and I don't know what is the problem. I register a user then login, do some stuff on a ...
1
vote
2
answers
413
views
Cannot access javax.servlet.Filter class file for javax.servlet.Filter not found
I'm working in a project and right now I'm migrating the project to Spring 3.0. So I made some changes in some classes. I can not share the classes because of the job rules but this class about the ...
0
votes
0
answers
50
views
Should we use binder.setAutoGrowCollectionLimit(); in every contoller?
I get this below exceptions(which is in the mentioned in this question) while submitting more than 256 rows of data from jsp.
(Recently I moved jars in my web app from spring3 to spring4.)
org....
0
votes
0
answers
137
views
How to see mybatis current session count?
in my project team environment : spring3.1 with mybatis / db : informix
using dataSource : apache commons dbcp 1.x
Recently, I am looking into the database connection mechanism.
as far as I know. ...
0
votes
0
answers
110
views
CastException: org.springframework.beans.factory.BeanDefinitionStoreException incompatible with org.springframework.web.context.WebApplicationContext
I am using open JDK11, Spring 3.1 version, with below code. Using tomcat 8.5
import org.springframework.web.context.ContextLoaderListener;
import org.springframework.web.context....
0
votes
1
answer
887
views
How to add hostname for my log file in log4j2.xml ? I am working on spring 3.0.5 and need to migrate log4j to log4j2
I have my log4j2.xml in which I need to add the hostname to the log file for the file Appender.
I have the following log4j2.xml-
<Configuration status="WARN" monitorInterval="30&...
-1
votes
1
answer
794
views
can it run spring 3 on tomcat 9 and java 8?
I have found an application that is made with spring 3.2.18.RELEASE and is running on tomcat 9 and java 8.
My knowledge of java and spring is very little, but from what I understand spring 3 should ...
0
votes
0
answers
128
views
Spring3 application tomcat7 to Tomcat8 upgrade error - context.ContextLoader - Context initialization failed
I am trying to upgrade my java spring3 web application from Tomcat7 to Tomcat 8. When I try to start the application I am getting the below error in catalina.out
I would greatly appreciate any help.
...
0
votes
0
answers
278
views
Spring beans not created as a singleton
This is an old project using Spring 3, with XML-based beans definitions, and I am new to the company/project.
I am just looking for pointers, not necessarily expecting you to find the root problem for ...
1
vote
4
answers
467
views
Upgrading Spring from 3.0.5 to 3.2.18 - Resources like images, CSS and JS are not accessible
I am new to Spring and started working on upgrade from 3.0.5 to 3.2.18, I have tried to modify the versions and change the artifact ID's to the new version (e.g org.springframework.core to spring-core,...
0
votes
1
answer
207
views
@Configuration tag in Spring 3.1.1 gives java.lang.IllegalStateException
I am trying to optimize an API that has been developed with Spring 3.1.1 long time ago. Using @Configuration tag gives me the below error.
Solutions like :
https://mkyong.com/spring3/cglib-is-...
0
votes
0
answers
16
views
Spring ws upgrade java.lang.NoSuchMethodError: org.apache.ws.security.util.WSSecurityUtil.decodeAction(Ljava/lang/String;Ljava/util/List;) [duplicate]
I am upgrading a project from spring 2.5 to spring 5. I am able to successfully run the project using spring 3.2.9 on JDK8. The spring ws being used was 2.0.4 with wss4j-1.5.8 and it was running fine ...
0
votes
2
answers
1k
views
jdbcTemplate.query(PreparedStatementCreator psc, ResultSetExtractor<T> rse) does not return any resultset
I am in the process of converting creation of connection to use JdbcTemplate class which handles the creation and release of resources.
One of the implementation shown below is not returning me a ...
0
votes
3
answers
2k
views
WebServiceTemplate performance issue with spring boot
I am consuming soap web services using WebServiceTemplate its working fine with good performance in spring3+ .
spring :- 3.2.4.RELEASE
spring-ws-core :- 2.1.4.RELEASE
spring-ws-support :- 2.1.4....
2
votes
0
answers
49
views
Multi-Language using resolveViewName()
I need to use resolveViewName() function, but the site is multiple languages. How can I do it?
getViewResolver()
.resolveViewName(velocity, Locale.getDefault())
.render(model, request, ...
2
votes
0
answers
457
views
How to manually configure OpenTracing Spring Web Instrumentation using xml
I've inherited a legacy Spring3 application, and I'm trying to add Lightstep instrumentation to it. I'm having trouble converting the instructions for manually configuration found here.
https://github....
0
votes
1
answer
549
views
Two versions of spring in the same application
What I'm trying to do is very similar to this, I just wanted to know if the answer is up to date since this problem was answered 4 years ago.
So, I have 2 maven project let's say A and B, project A ...
1
vote
1
answer
496
views
Is Java 7 compatible with Spring version 3.2.8.RELEASE? Or which version of Java works with 3.2.8.RELEASE
We are using JDK 6 with Spring 3.2.8.RELEASE. Our application uses TLS, and the version of TLS needs to be upgraded to version 1.1 or higher. Unfortunately the JDK 6 (our build is 81) does not offer ...
2
votes
1
answer
557
views
Upgraded from Spring 3 to Spring 5 - and now errors with autowiring
There's a project to upgrade Java, weblogic and as it eventually turned out spring in one of our web apps.
Used to be java 6, weblogic 10 and spring 3.
Moving to java 8, weblogic 12 and spring 5.
...
1
vote
0
answers
145
views
How can I confirm that Spring Transactions are working properly?
I working on an Spring 3.2 application running in OC4j. I have a number of methods annotated with Spring's @Transactional annotation as follows:
// in MyServiceImpl
@Transactional()
public void ...
1
vote
1
answer
851
views
Spring Framework 3.2.5 - Issue decoding the response body of a POST API output
I just spent 5 hours trying to solve this issue but I've made zero progress. I've tried all the solutions I could find but I'm stuck.
Here's my basic setup and the issue that I'm facing:
Basic Setup
...
-1
votes
1
answer
670
views
Are there any ways to initialize spring bean after the whole context was initialized or server startup was performed?
Currently I'm working on legacy Hybris project. We use Hybris 4.8 and Srping 3 with Java 7.
There is a factory class which performs some logic in order to instantiate another bean. The thing is that ...
0
votes
1
answer
78
views
Spring Boot Dependency with Spring 3
I have a Spring 3 dependent project which I am using in my latest spring boot project
I am facing issues with auto wiring
my spring 3 project has a Gateway Interface (IAccountGateway)
I am facing ...
0
votes
0
answers
2k
views
How to configure Spring 3 with SLF4J over LOG4J2 using Log4jConfigurer?
I am trying to configure my application to use SLF4J with log4j2 for logging.
The application uses Spring 3. The console logger is working but none of the Rolling appenders seems to be logging ...
0
votes
1
answer
34
views
Static resource mapping in Spring3
My project is implemented in Spring3 and configuration is almost xml.
Configuration of static resource mapping is like below:
<mvc:resources mapping="/a/**" location="file:/data/a/"/>
There is ...