You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
We are using spring-cloud-config-server (4.1.1) to load environment configuration from s3 repository. We are getting intermittent failure with 403 error during a refresh call (http://:port/service-name/profile). The exception getting logged is as follows
exception.message:
"Name for argument of type [java.lang.String] not specified, and parameter name information not available via reflection. Ensure that the compiler uses the '-parameters' flag."
exception.stacktrace:
"java.lang.IllegalArgumentException: Name for argument of type [java.lang.String] not specified, and parameter name information not available via reflection. Ensure that the compiler uses the '-parameters' flag.
at org.springframework.web.method.annotati…ctor.lambda$createCacheFilter$3(HandlerMappingIntrospector.java:195)
at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:"
exception.type:
"java.lang.IllegalArgumentException"
The error occurs due to invocation of following method (EnvironmentController.defaultLabelIncludeOrigin)).
It seems the parameter names are not retained which causes the above failure. As per spring 6.1 release notes it has been mentioned to pass following parameter in maven compiler plugin "true". We are adding spring cloud config server jar as dependency. Is the spring cloud config server jar compiled in such a way to retain parameter names. I see the error is not consistent. It occurs intermittently
LocalVariableTableParameterNameDiscoverer has been removed in 6.1. Consequently, code within the Spring Framework and Spring portfolio frameworks no longer attempts to deduce parameter names by parsing bytecode. If you experience issues with dependency injection, property binding, SpEL expressions, or other use cases that depend on the names of parameters, you should compile your Java sources with the common Java 8+ -parameters flag for parameter name retention (instead of relying on the -debug compiler flag) in order to be compatible with StandardReflectionParameterNameDiscoverer
The text was updated successfully, but these errors were encountered:
Describe the bug
We are using spring-cloud-config-server (4.1.1) to load environment configuration from s3 repository. We are getting intermittent failure with 403 error during a refresh call (http://:port/service-name/profile). The exception getting logged is as follows
exception.message:
"Name for argument of type [java.lang.String] not specified, and parameter name information not available via reflection. Ensure that the compiler uses the '-parameters' flag."
exception.stacktrace:
"java.lang.IllegalArgumentException: Name for argument of type [java.lang.String] not specified, and parameter name information not available via reflection. Ensure that the compiler uses the '-parameters' flag.
at org.springframework.web.method.annotati…ctor.lambda$createCacheFilter$3(HandlerMappingIntrospector.java:195)
at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:"
exception.type:
"java.lang.IllegalArgumentException"
The error occurs due to invocation of following method (EnvironmentController.defaultLabelIncludeOrigin)).
It seems the parameter names are not retained which causes the above failure. As per spring 6.1 release notes it has been mentioned to pass following parameter in maven compiler plugin "true". We are adding spring cloud config server jar as dependency. Is the spring cloud config server jar compiled in such a way to retain parameter names. I see the error is not consistent. It occurs intermittently
@GetMapping(path = "/{name}/{profiles:(?!.\b\.(?:ya?ml|properties|json)\b).}",
produces = EnvironmentMediaType.V2_JSON)
public Environment defaultLabelIncludeOrigin(@PathVariable String name, @PathVariable String profiles) {
return getEnvironment(name, profiles, null, true);
}
Spring 6.1 release notes reference
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-6.1-Release-Notes
LocalVariableTableParameterNameDiscoverer has been removed in 6.1. Consequently, code within the Spring Framework and Spring portfolio frameworks no longer attempts to deduce parameter names by parsing bytecode. If you experience issues with dependency injection, property binding, SpEL expressions, or other use cases that depend on the names of parameters, you should compile your Java sources with the common Java 8+ -parameters flag for parameter name retention (instead of relying on the -debug compiler flag) in order to be compatible with StandardReflectionParameterNameDiscoverer
The text was updated successfully, but these errors were encountered: