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

Migrate from spring boot 3.1.5 to 3.2 native image java.util.MissingResourceException #38257

Closed
Ricard-Kollcaku opened this issue Nov 7, 2023 · 5 comments
Labels
for: external-project For an external project and not something we can fix status: invalid An issue that we don't feel is valid

Comments

@Ricard-Kollcaku
Copy link

Ricard-Kollcaku commented Nov 7, 2023

We have a working application running on spring boot 3.1.5 using java 21 as a native image and everything works ok
we are trying to upgrade that application to 3.2.0-RC2 to get the benefit of project loom and get prepared for GA release but we see some issue

When we migrate to spring boot 3.2.0-RC2 and upgrade the native build tool to 0.9.28 we get the following error

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthEndpointGroupsBeanPostProcessor': BeanPostProcessor before instantiation of bean failed
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:518) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204) ~[cjs:6.1.0-RC2]
	at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:277) ~[na:na]
	at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:792) ~[cjs:6.1.0-RC2]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:600) ~[cjs:6.1.0-RC2]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[cjs:3.2.0-RC2]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:748) ~[cjs:3.2.0-RC2]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:450) ~[cjs:3.2.0-RC2]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:322) ~[cjs:3.2.0-RC2]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1336) ~[cjs:3.2.0-RC2]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1325) ~[cjs:3.2.0-RC2]
	at com.ss.c.js.Application.main(Application.java:20) ~[cjs:na]
	at java.base@21/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH) ~[na:na]
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.transaction.config.internalTransactionAdvisor': Unsatisfied dependency expressed through method 'transactionAdvisor' parameter 0: Error creating bean with name 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': null
	at org.springframework.beans.factory.aot.BeanInstanceSupplier.resolveAutowiredArgument(BeanInstanceSupplier.java:344) ~[na:na]
	at org.springframework.beans.factory.aot.BeanInstanceSupplier.resolveArguments(BeanInstanceSupplier.java:264) ~[na:na]
	at org.springframework.beans.factory.aot.BeanInstanceSupplier.get(BeanInstanceSupplier.java:204) ~[na:na]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.obtainInstanceFromSupplier(DefaultListableBeanFactory.java:947) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1218) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1162) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:563) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204) ~[cjs:6.1.0-RC2]
	at org.springframework.aop.framework.autoproxy.BeanFactoryAdvisorRetrievalHelper.findAdvisorBeans(BeanFactoryAdvisorRetrievalHelper.java:91) ~[cjs:6.1.0-RC2]
	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findCandidateAdvisors(AbstractAdvisorAutoProxyCreator.java:111) ~[cjs:6.1.0-RC2]
	at org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator.findCandidateAdvisors(AnnotationAwareAspectJAutoProxyCreator.java:92) ~[cjs:na]
	at org.springframework.aop.aspectj.autoproxy.AspectJAwareAdvisorAutoProxyCreator.shouldSkip(AspectJAwareAdvisorAutoProxyCreator.java:101) ~[cjs:6.1.0-RC2]
	at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessBeforeInstantiation(AbstractAutoProxyCreator.java:280) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:1131) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:1106) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:512) ~[cjs:6.1.0-RC2]
	... 15 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': null
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:608) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:224) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:1321) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:1282) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveBean(DefaultListableBeanFactory.java:484) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:339) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:332) ~[cjs:6.1.0-RC2]
	at org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration__BeanDefinitions.lambda$getTransactionAttributeSourceInstanceSupplier$1(ProxyTransactionManagementConfiguration__BeanDefinitions.java:52) ~[na:na]
	at org.springframework.util.function.ThrowingFunction.apply(ThrowingFunction.java:63) ~[cjs:6.1.0-RC2]
	at org.springframework.util.function.ThrowingFunction.apply(ThrowingFunction.java:51) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.aot.BeanInstanceSupplier.lambda$withGenerator$0(BeanInstanceSupplier.java:171) ~[na:na]
	at org.springframework.util.function.ThrowingBiFunction.apply(ThrowingBiFunction.java:68) ~[cjs:6.1.0-RC2]
	at org.springframework.util.function.ThrowingBiFunction.apply(ThrowingBiFunction.java:54) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.aot.BeanInstanceSupplier.lambda$get$2(BeanInstanceSupplier.java:206) ~[na:na]
	at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58) ~[cjs:6.1.0-RC2]
	at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.aot.BeanInstanceSupplier.invokeBeanSupplier(BeanInstanceSupplier.java:218) ~[na:na]
	at org.springframework.beans.factory.aot.BeanInstanceSupplier.get(BeanInstanceSupplier.java:206) ~[na:na]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.obtainInstanceFromSupplier(DefaultListableBeanFactory.java:947) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1218) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1162) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:563) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1441) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1348) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:911) ~[na:na]
	at org.springframework.beans.factory.support.RegisteredBean.resolveAutowiredArgument(RegisteredBean.java:229) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.aot.BeanInstanceSupplier.resolveAutowiredArgument(BeanInstanceSupplier.java:341) ~[na:na]
	... 34 common frames omitted
Caused by: java.lang.ExceptionInInitializerError: null
	at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.verifyIsAnnotationType(ExactAnnotationTypePattern.java:354) ~[cjs:na]
	at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.resolveBindings(ExactAnnotationTypePattern.java:318) ~[cjs:na]
	at org.aspectj.weaver.patterns.ThisOrTargetAnnotationPointcut.resolveBindings(ThisOrTargetAnnotationPointcut.java:151) ~[na:na]
	at org.aspectj.weaver.patterns.Pointcut.resolve(Pointcut.java:189) ~[cjs:na]
	at org.aspectj.weaver.tools.PointcutParser.resolvePointcutExpression(PointcutParser.java:331) ~[cjs:na]
	at org.aspectj.weaver.reflect.InternalUseOnlyPointcutParser.resolvePointcutExpression(InternalUseOnlyPointcutParser.java:36) ~[na:na]
	at org.aspectj.weaver.reflect.Java15ReflectionBasedReferenceTypeDelegate.getDeclaredPointcuts(Java15ReflectionBasedReferenceTypeDelegate.java:307) ~[na:na]
	at org.aspectj.weaver.ReferenceType.getDeclaredPointcuts(ReferenceType.java:890) ~[cjs:1.9.20]
	at org.aspectj.weaver.ResolvedType$PointcutGetter.get(ResolvedType.java:261) ~[na:na]
	at org.aspectj.weaver.ResolvedType$PointcutGetter.get(ResolvedType.java:258) ~[na:na]
	at org.aspectj.weaver.Iterators$4$1.hasNext(Iterators.java:213) ~[na:na]
	at org.aspectj.weaver.Iterators$4.hasNext(Iterators.java:230) ~[na:na]
	at org.aspectj.weaver.ResolvedType.findPointcut(ResolvedType.java:767) ~[cjs:1.9.20]
	at org.aspectj.weaver.patterns.ReferencePointcut.resolveBindings(ReferencePointcut.java:148) ~[na:na]
	at org.aspectj.weaver.patterns.AndPointcut.resolveBindings(AndPointcut.java:83) ~[na:na]
	at org.aspectj.weaver.patterns.Pointcut.resolve(Pointcut.java:189) ~[cjs:na]
	at org.aspectj.weaver.tools.PointcutParser.resolvePointcutExpression(PointcutParser.java:331) ~[cjs:na]
	at org.aspectj.weaver.tools.PointcutParser.parsePointcutExpression(PointcutParser.java:312) ~[cjs:na]
	at org.springframework.aop.aspectj.AspectJExpressionPointcut.buildPointcutExpression(AspectJExpressionPointcut.java:222) ~[na:na]
	at org.springframework.aop.aspectj.AspectJExpressionPointcut.obtainPointcutExpression(AspectJExpressionPointcut.java:193) ~[na:na]
	at org.springframework.aop.aspectj.AspectJExpressionPointcut.getClassFilter(AspectJExpressionPointcut.java:172) ~[na:na]
	at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:234) ~[na:na]
	at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:296) ~[na:na]
	at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.java:328) ~[na:na]
	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findAdvisorsThatCanApply(AbstractAdvisorAutoProxyCreator.java:128) ~[cjs:6.1.0-RC2]
	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:97) ~[cjs:6.1.0-RC2]
	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:78) ~[cjs:6.1.0-RC2]
	at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:366) ~[cjs:6.1.0-RC2]
	at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:318) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:437) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1778) ~[cjs:6.1.0-RC2]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601) ~[cjs:6.1.0-RC2]
	... 70 common frames omitted
Caused by: java.util.MissingResourceException: Can't find bundle for base name org.aspectj.weaver.weaver-messages, locale en_DE
	at java.base@21/java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:2059) ~[cjs:na]
	at java.base@21/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1697) ~[cjs:na]
	at java.base@21/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1600) ~[cjs:na]
	at java.base@21/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1555) ~[cjs:na]
	at java.base@21/java.util.ResourceBundle.getBundle(ResourceBundle.java:861) ~[cjs:na]
	at org.aspectj.weaver.WeaverMessages.<clinit>(WeaverMessages.java:19) ~[na:na]
	... 102 common frames omitted


@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 7, 2023
@wilkinsona
Copy link
Member

Thanks for trying to RC.

Spring Boot itself doesn't do anything to make AspectJ's resource bundle available in a native image. That's the responsibility of AspectJ itself (if they choose to support Graal directly) or of the reachability metadata. I would guess that something in your application or its dependencies was providing the necessary hints to Graal to make the resource bundle available and is now no longer doing so. I can't tell what that may have been from the stack trace of the failure. It may be possible from a minimal sample that works with 3.1.5 and fails with 3.2.0-RC2. In the meantime you could add such a hint yourself.

@wilkinsona wilkinsona added the status: waiting-for-feedback We need additional information before we can continue label Nov 7, 2023
@Ricard-Kollcaku
Copy link
Author

Ricard-Kollcaku commented Nov 8, 2023

it looks like it happens when i add annotation of @EnableJpaAuditing in the main class,
but if jpa is using that should not jpa declare for resources for native ?
I will create a simple project and push

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Nov 8, 2023
@Ricard-Kollcaku
Copy link
Author

Simple project to reproduce the problem,
github project
compile it as native using ./gradlew nativeCompile with graalvm for java 21.0.1

@wilkinsona
Copy link
Member

but if jpa is using that should not jpa declare for reflection?

Spring Data JPA could do that but we don't think it's the best approach, certainly not in the long run.

In terms of maintainability and benefit to the GraalVM ecosystem as a whole, we think it's better for a project to manage its own GraalVM-related hints. In this case, it's AspectJ that requires access to its message bundle so, ideally, AspectJ would provide the necessary hints. When that hasn't been done, the reachability metadata repository is the next-best option as it allows anyone who is using AspectJ with GraalVM to benefit.

compile it as native using ./gradlew nativeCompile with graalvm for java 21.0.1

Thanks for the sample. I've reproduced the failure described above. Interestingly, if I change build.gradle to set sourceCompatibility to 17 and use GraalVM 22.3.3 (build 17.0.8+7-LTS) the failure changes:

Caused by: java.lang.IllegalArgumentException: Pointcut is not well-formed: expecting 'identifier' at character position 0

^

        at org.aspectj.weaver.tools.PointcutParser.resolvePointcutExpression(PointcutParser.java:334) ~[demo:na]
        at org.aspectj.weaver.reflect.InternalUseOnlyPointcutParser.resolvePointcutExpression(InternalUseOnlyPointcutParser.java:36) ~[na:na]
        at org.aspectj.weaver.reflect.Java15ReflectionBasedReferenceTypeDelegate.getDeclaredPointcuts(Java15ReflectionBasedReferenceTypeDelegate.java:307) ~[na:na]
        at org.aspectj.weaver.ReferenceType.getDeclaredPointcuts(ReferenceType.java:890) ~[demo:1.9.20]
        at org.aspectj.weaver.ResolvedType$PointcutGetter.get(ResolvedType.java:261) ~[na:na]
        at org.aspectj.weaver.ResolvedType$PointcutGetter.get(ResolvedType.java:258) ~[na:na]
        at org.aspectj.weaver.Iterators$4$1.hasNext(Iterators.java:213) ~[na:na]
        at org.aspectj.weaver.Iterators$6.hasNext(Iterators.java:288) ~[na:na]
        at org.aspectj.weaver.Iterators$4.hasNext(Iterators.java:230) ~[na:na]
        at org.aspectj.weaver.ResolvedType.findPointcut(ResolvedType.java:767) ~[demo:1.9.20]
        at org.aspectj.weaver.patterns.ReferencePointcut.resolveBindings(ReferencePointcut.java:148) ~[na:na]
        at org.aspectj.weaver.patterns.Pointcut.resolve(Pointcut.java:189) ~[demo:na]
        at org.aspectj.weaver.tools.PointcutParser.resolvePointcutExpression(PointcutParser.java:331) ~[demo:na]
        at org.aspectj.weaver.reflect.InternalUseOnlyPointcutParser.resolvePointcutExpression(InternalUseOnlyPointcutParser.java:36) ~[na:na]
        at org.aspectj.weaver.reflect.Java15ReflectionBasedReferenceTypeDelegate.getDeclaredPointcuts(Java15ReflectionBasedReferenceTypeDelegate.java:307) ~[na:na]
        at org.aspectj.weaver.ReferenceType.getDeclaredPointcuts(ReferenceType.java:890) ~[demo:1.9.20]
        at org.aspectj.weaver.ResolvedType$PointcutGetter.get(ResolvedType.java:261) ~[na:na]
        at org.aspectj.weaver.ResolvedType$PointcutGetter.get(ResolvedType.java:258) ~[na:na]
        at org.aspectj.weaver.Iterators$4$1.hasNext(Iterators.java:213) ~[na:na]
        at org.aspectj.weaver.Iterators$4.hasNext(Iterators.java:230) ~[na:na]
        at org.aspectj.weaver.ResolvedType.findPointcut(ResolvedType.java:767) ~[demo:1.9.20]
        at org.aspectj.weaver.patterns.ReferencePointcut.resolveBindings(ReferencePointcut.java:148) ~[na:na]
        at org.aspectj.weaver.patterns.AndPointcut.resolveBindings(AndPointcut.java:83) ~[na:na]
        at org.aspectj.weaver.patterns.Pointcut.resolve(Pointcut.java:189) ~[demo:na]
        at org.aspectj.weaver.tools.PointcutParser.resolvePointcutExpression(PointcutParser.java:331) ~[demo:na]
        at org.aspectj.weaver.tools.PointcutParser.parsePointcutExpression(PointcutParser.java:312) ~[demo:na]
        at org.springframework.aop.aspectj.AspectJExpressionPointcut.buildPointcutExpression(AspectJExpressionPointcut.java:222) ~[na:na]
        at org.springframework.aop.aspectj.AspectJExpressionPointcut.obtainPointcutExpression(AspectJExpressionPointcut.java:193) ~[na:na]
        at org.springframework.aop.aspectj.AspectJExpressionPointcut.getClassFilter(AspectJExpressionPointcut.java:172) ~[na:na]
        at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:234) ~[na:na]
        at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:296) ~[na:na]
        at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.java:328) ~[na:na]
        at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findAdvisorsThatCanApply(AbstractAdvisorAutoProxyCreator.java:128) ~[demo:6.1.0-RC2]
        at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:97) ~[demo:6.1.0-RC2]
        at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:78) ~[demo:6.1.0-RC2]
        at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:366) ~[demo:6.1.0-RC2]
        at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:318) ~[demo:6.1.0-RC2]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:437) ~[demo:6.1.0-RC2]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1778) ~[demo:6.1.0-RC2]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601) ~[demo:6.1.0-RC2]
        ... 69 common frames omitted

The cause of this error isn't clear to me. It looks like it may be due to AspectJ being unable to extract some information about a pointcut but that's not much more than a slightly educated guess. Given that the problem only occurs with @EnableJpaAuditing I think the Spring Data JPA team are best-placed to continue the investigation. To that end, please open a Spring Data JPA issue and comment here with a link to it.

@wilkinsona wilkinsona closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2023
@wilkinsona wilkinsona added status: invalid An issue that we don't feel is valid for: external-project For an external project and not something we can fix and removed status: waiting-for-triage An issue we've not yet triaged status: feedback-provided Feedback has been provided labels Nov 8, 2023
@mp911de
Copy link
Member

mp911de commented Nov 8, 2023

FWIW, here's the related ticket to add native runtime hints for AspectJ: eclipse-aspectj/aspectj#227

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: external-project For an external project and not something we can fix status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

4 participants