Skip to main content



      Home
Home » Language IDEs » AspectJ » aspectJ runtime error for openJDK 17
aspectJ runtime error for openJDK 17 [message #1859444] Thu, 08 June 2023 01:33 Go to next message
Eclipse UserFriend
I am getting the below error related to aspectJ (version used: 1.9.8.RC3) for open JDK 17. The spring version used is 4.1.2. Is jdk 17 compatible with aspectJ ? What could be done to resolve this issue ? Thanks in advance

	org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validationAnnotationBeanPostProcessor' defined in ServletContext resource [/WEB-INF/spring-configuration/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: error the @annotation pointcut expression is only supported at Java 5 compliance level or above
		at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:529)
		at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
		at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
		at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
		at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
		at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
		at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:753)
		at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
		at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
		at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
		at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
		at org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized_aroundBody0(SafeContextLoaderListener.java:75)
		at org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized_aroundBody1$advice(SafeContextLoaderListener.java:54)
		at org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized(SafeContextLoaderListener.java:1)
		at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4759)
		at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5229)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
		at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:727)
		at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695)
		at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1177)
		at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1925)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
		at java.base/java.lang.Thread.run(Thread.java:833)
	Caused by: java.lang.IllegalArgumentException: error the @annotation pointcut expression is only supported at Java 5 compliance level or above
		at org.aspectj.weaver.tools.PointcutParser.parsePointcutExpression(PointcutParser.java:301)
		at org.springframework.aop.aspectj.AspectJExpressionPointcut.buildPointcutExpression(AspectJExpressionPointcut.java:208)
		at org.springframework.aop.aspectj.AspectJExpressionPointcut.buildPointcutExpression(AspectJExpressionPointcut.java:194)
		at org.springframework.aop.aspectj.AspectJExpressionPointcut.checkReadyToMatch(AspectJExpressionPointcut.java:183)
		at org.springframework.aop.aspectj.AspectJExpressionPointcut.getClassFilter(AspectJExpressionPointcut.java:164)
		at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:208)
		at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:262)
		at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.java:294)
		at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findAdvisorsThatCanApply(Abstr

Re: aspectJ runtime error for openJDK 17 [message #1859500 is a reply to message #1859444] Mon, 12 June 2023 15:41 Go to previous message
Eclipse UserFriend
Firstly, JDK 17 is indeed compatible with AspectJ, but the issue here appears to be stemming from the fact that the compliance level of your application is not correctly set. The error message indicates that the @annotation pointcut expression requires Java 5 compliance level or above.
If you are using Eclipse or a similar IDE, you can ensure that your project's Java compiler compliance level is set to at least 1.5 or higher. You can typically find this setting under Project > Properties > Java Compiler.
Also, keep in mind that Spring 4.1.2 is quite old, and may not work well with OpenJDK 17. It would be good to consider updating your Spring framework to a newer version that is known to work well with JDK 17.
Finally, AspectJ version 1.9.8.RC3 is a release candidate and may contain bugs or incompatibilities. I would recommend upgrading to a stable release version.
Previous Topic:AJDT failure in Eclipse 2022-12
Next Topic:New version of Eclipse
Goto Forum:
  


Current Time: Mon May 12 21:53:49 EDT 2025

Powered by FUDForum. Page generated in 0.04964 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top