我正在尝试使用 jdk17 运行 java 8 批处理,该项目是使用 jre1.8.0_192 构建的,我在 VM 中放置了以下选项:
--add-modules=ALL-SYSTEM --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.math=ALL-UNNAMED --add-opens=java .base/java.net=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=jdk.attach/sun.tools.attach=ALL-UNNAMED -Djava.locale .providers=JRE,SPI
我在运行时收到以下错误:
java.lang.NullPointerException:无法调用“Object.getClass()”,因为“obj”在 java.lang.reflect.Method.invoke(Method.java:561) ~[?:?] at org.springframework.aop 处为空.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) ~[spring-aop-4.3.25.RELEASE.jar:4.3.25.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java: 190)~[spring-aop-4.3.25.RELEASE.jar:4.3.25.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)~[spring-aop-4.3.25 .RELEASE.jar:4.3.25.RELEASE] 在 org.springframework.batch.core.configuration.annotation.SimpleBatchConfiguration$PassthruAdvice.invoke(SimpleBatchConfiguration.java:127) ~[spring-batch-core-3.0.10.RELEASE. jar:3.0.10.RELEASE] 在 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.25.RELEASE.jar:4.3.25.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy .java:213) ~[spring-aop-4.3.25.RELEASE.jar:4.3.25.RELEASE]
有任何想法吗 ?谢谢