JPS incremental annotation processing is disabled与Failed to read candidate component class

报错:JPS incremental annotation processing is disabled

Executing pre-compile tasks...
Cleaning output directories…
Running 'before' tasks
Checking sources
Copying resources... [aifeng-service-product]
Copying resources... [aifeng-service-common]
Parsing java… [aifeng-service-common]
java: JPS incremental annotation processing is disabled. Compilation results on partial recompilation may be inaccurate. Use build process "jps.track.ap.dependencies" VM flag to enable/disable incremental annotation processing environment.
java: 由于在类路径中发现了一个或多个处理程序,因此启用了
  批注处理。未来发行版的 javac 可能会禁用批注处理,
  除非至少按名称指定了一个处理程序 (-processor),
  或指定了搜索路径 (--processor-path, --processor-module-path),
  或显式启用了批注处理 (-proc:only, -proc:full)。
  可使用 -Xlint:-options 隐藏此消息。
  可使用 -proc:none 禁用批注处理。
java: java.lang.NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field 'com.sun.tools.javac.tree.JCTree qualid'
java: java.lang.NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field 'com.sun.tools.javac.tree.JCTree qualid'
Checking dependencies… [aifeng-service-common]
Dependency analysis found 0 affected files
Errors occurred while compiling module 'aifeng-service-common'
javac 21.0.1 was used to compile java sources
Finished, saving caches…
Executing post-compile tasks...
Finished, saving caches…
Synchronizing output directories...
2024/1/16 22:12 - Build completed with 2 errors and 1 warning in 2 sec, 697 ms
java: JPS incremental annotation processing is disabled. Compilation results on partial recompilation may be inaccurate. Use build process "jps.track.ap.dependencies" VM flag to enable/disable incremental annotation processing environment.

java: java.lang.NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field 'com.sun.tools.javac.tree.JCTree qualid'

java: java.lang.NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field 'com.sun.tools.javac.tree.JCTree qualid'


解决方法:提升lombok 版本为:1.18.30

JPS incremental annotation processing is disabled与Failed to read candidate component class_第1张图片

报错: Failed to read candidate component class

有提示信息:Failure to find org.springframework.boot:spring-boot-starter-parent:pom:3.2.1.RELEASE in http://mave

Failure to find org.springframework.boot:spring-boot-starter-parent:pom:3.2.1.RELEASE in http://mave

2024-01-16 22:20:54.607 ERROR 3772 --- [  restartedMain] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [D:\workspace\springclouddemo\aifeng-parent\aifeng-service-product\target\classes\com\aifeng\product\ProductApplication.class]; nested exception is org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet: file [D:\workspace\springclouddemo\aifeng-parent\aifeng-service-product\target\classes\com\aifeng\product\ProductApplication.class]; nested exception is java.lang.IllegalArgumentException: Unsupported class file major version 65
	at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.scanCandidateComponents(ClassPathScanningCandidateComponentProvider.java:454) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:316) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:275) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.context.annotation.ComponentScanAnnotationParser.parse(ComponentScanAnnotationParser.java:132) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:287) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:242) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:199) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:167) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:315) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:232) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:705) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:531) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:742) ~[spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:389) ~[spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:311) ~[spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1213) ~[spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1202) ~[spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]
	at com.aifeng.product.ProductApplication.main(ProductApplication.java:13) ~[classes/:na]
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[na:na]
	at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) ~[spring-boot-devtools-2.1.6.RELEASE.jar:2.1.6.RELEASE]
Caused by: org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet: file [D:\workspace\springclouddemo\aifeng-parent\aifeng-service-product\target\classes\com\aifeng\product\ProductApplication.class]; nested exception is java.lang.IllegalArgumentException: Unsupported class file major version 65
	at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:57) ~[spring-core-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:103) ~[spring-core-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:123) ~[spring-core-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.scanCandidateComponents(ClassPathScanningCandidateComponentProvider.java:430) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	... 23 common frames omitted
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 65
	at org.springframework.asm.ClassReader.<init>(ClassReader.java:184) ~[spring-core-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.asm.ClassReader.<init>(ClassReader.java:166) ~[spring-core-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.asm.ClassReader.<init>(ClassReader.java:152) ~[spring-core-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.asm.ClassReader.<init>(ClassReader.java:273) ~[spring-core-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:54) ~[spring-core-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	... 26 common frames omitted


Process finished with exit code 0

**解决方法:**去掉release ,而且maven仓库官网也没有在版本之后 加release ,仔细看了下 maven仓库的官网,发现从 2.4 版本之后就没有加 release 了。

JPS incremental annotation processing is disabled与Failed to read candidate component class_第2张图片

JPS incremental annotation processing is disabled与Failed to read candidate component class_第3张图片

JPS incremental annotation processing is disabled与Failed to read candidate component class_第4张图片

与其他springboot的pom文件进行了对比,也是没有release的

er/202401172126143.png" alt=“image-20240117205855776” style=“zoom:50%;” />

与其他springboot的pom文件进行了对比,也是没有release的

你可能感兴趣的:(spring,Cloud,java)