Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated fallback warning with Spring 6.0.5 #2630

Closed
nils-christian opened this issue Mar 4, 2023 · 5 comments
Closed

Deprecated fallback warning with Spring 6.0.5 #2630

nils-christian opened this issue Mar 4, 2023 · 5 comments
Assignees
Labels
Priority 2: Should High priority. Ideally, these issues are part of the release they’re assigned to. Status: Obsolete Use to signal this issue is no longer necessary. Type: Bug Use to signal issues that describe a bug within the system.
Milestone

Comments

@nils-christian
Copy link
Contributor

Hi,

When using Axon with Spring Boot 3.0.3 (and thus Spring 6.0.5), a warning occurs. It should be checked whether this is a false positive or whether someone has to do something.

Basic information

  • Axon Framework version: 4.7.2
  • JDK version: JDK 17

Steps to reproduce

Create a project based on the 3.0.3 Spring Boot starter and include Axon. Create a minimal Axon Aggregate.

Expected behaviour

No warning should occur.

Actual behaviour

A warning occurs:

LocalVariableTableParameterNameDiscoverer : Using deprecated '-debug' fallback for parameter name resolution. Compile the affected code with '-parameters' instead or avoid its introspection: org.axonframework.spring.eventsourcing.SpringPrototypeAggregateFactory

I am aware that there has been a bug in Spring 6 (see here), but this has been fixed in 6.0.3 and the issue occurs in 6.0.5 for the SpringPrototypeAggregateFactory.

@nils-christian nils-christian added the Type: Bug Use to signal issues that describe a bug within the system. label Mar 4, 2023
@smcvb smcvb added Priority 2: Should High priority. Ideally, these issues are part of the release they’re assigned to. Status: In Progress Use to signal this issue is actively worked on. labels Mar 6, 2023
@smcvb smcvb added this to the Release 4.7.3 milestone Mar 6, 2023
@smcvb smcvb self-assigned this Mar 6, 2023
@smcvb
Copy link
Member

smcvb commented Mar 6, 2023

Thanks for drafting this, @nils-christian. I'll do some investigation into the matter today/tomorrow. I'll keep you posted.

@gklijs
Copy link
Contributor

gklijs commented Mar 8, 2023

I haven't looked into it myself yet but I did notice with 3.0.3 (Spring 6.0.6), the warning is also there.

smcvb added a commit that referenced this issue Mar 9, 2023
For some reason, Spring Framework logs the following message open usages
 of the static factory method of the SpringPrototypeAggregateFactory:

LocalVariableTableParameterNameDiscoverer : Using deprecated '-debug'
fallback for parameter name resolution. Compile the affected code with
'-parameters' instead or avoid its introspection: org.axonframework.
spring.eventsourcing.SpringPrototypeAggregateFactory

Although none of the methods are marked deprecated on the BeanDefinition
 API, apparently this is undesired behavior. Regardless, we can easily
 use a Supplier<SpringPrototypeAggregateFactory> in this case, since the
 required properties for the factory are known upfront.

#2630
@smcvb
Copy link
Member

smcvb commented Mar 9, 2023

After some digging, I spotted that the warning is introduced by the SpringAggregateLookup component of the framework, which manually constructs a BeanDefinition of a SpringPrototypeAggregateFactory by pointing towards a factory method.
However, none of the Spring APIs we use here are deprecated, so I am somewhat in the dark on why the warn message is logged.
Nonetheless, we can easily mitigate the message by constructing the BeanDefinition differently, as I've done in this pull request.

But, to answer your question, @nils-christian, I am honestly uncertain whether the warn message is warranted at all.
The fact we can solve it easily does put me more at ease, though.
The PR points to axon-4.7.x and, as such, will be part of the 4.7.3 release scheduled for this week.

@smcvb
Copy link
Member

smcvb commented Mar 9, 2023

I am closing this issue since it's resolved through pull request #2637.

@smcvb smcvb closed this as completed Mar 9, 2023
@smcvb smcvb added Status: Resolved Use to signal that work on this issue is done. and removed Status: In Progress Use to signal this issue is actively worked on. labels Mar 9, 2023
@smcvb smcvb added Status: Obsolete Use to signal this issue is no longer necessary. and removed Status: Resolved Use to signal that work on this issue is done. labels Mar 10, 2023
@abuijze
Copy link
Member

abuijze commented Mar 10, 2023

This will be resolved in Spring: spring-projects/spring-framework#30103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority 2: Should High priority. Ideally, these issues are part of the release they’re assigned to. Status: Obsolete Use to signal this issue is no longer necessary. Type: Bug Use to signal issues that describe a bug within the system.
Projects
None yet
Development

No branches or pull requests

4 participants