core-lib / xjar

Spring Boot JAR 安全加密运行工具,支持的原生JAR。
Apache License 2.0
1.65k stars 472 forks source link

Xjar启动异常:尚不支持新的Java类文件版本 #133

Open choubuzhaole opened 9 months ago

choubuzhaole commented 9 months ago

springboot 升级到 3.2.0 后 xjar 启动失败,原jar 包能正常运行。

错误信息如下:

Dec 14 02:22:17 bogon xjar[21625]: 2023-12-14T02:22:17.881Z  WARN 21631 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [jar:[file:/opt/nezha/nz-web/nz-admin.xjar!/BOOT-INF/classes!/com/nis/setup/controller/SetupController.class](http://file/opt/nezha/nz-web/nz-admin.xjar!/BOOT-INF/classes!/com/nis/setup/controller/SetupController.class)]
Dec 14 02:22:21 bogon xjar[21625]: 2023-12-14T02:22:21.144Z ERROR 21631 --- [           main] o.s.boot.SpringApplication               : Application run failed
Dec 14 02:22:21 bogon xjar[21625]: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [jar:[file:/opt/nezha/nz-web/nz-admin.xjar!/BOOT-INF/classes!/com/nis/setup/controller/SetupController.class](http://file/opt/nezha/nz-web/nz-admin.xjar!/BOOT-INF/classes!/com/nis/setup/controller/SetupController.class)]
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.scanCandidateComponents(ClassPathScanningCandidateComponentProvider.java:484)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:337)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:277)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.annotation.ComponentScanAnnotationParser.parse(ComponentScanAnnotationParser.java:128)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:296)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:245)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:196)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:164)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:416)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:289)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:349)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:118)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:775)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:597)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:753)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:455)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.boot.SpringApplication.run(SpringApplication.java:323)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.boot.SpringApplication.run(SpringApplication.java:1342)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.boot.SpringApplication.run(SpringApplication.java:1331)
Dec 14 02:22:21 bogon xjar[21625]: at com.nis.AdminApplication.main(AdminApplication.java:30)
Dec 14 02:22:21 bogon xjar[21625]: at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
Dec 14 02:22:21 bogon xjar[21625]: at java.base/java.lang.reflect.Method.invoke(Method.java:580)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.boot.loader.Launcher.launch(Launcher.java:95)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
Dec 14 02:22:21 bogon xjar[21625]: at io.xjar.boot.XJarLauncher.launch(XJarLauncher.java:26)
Dec 14 02:22:21 bogon xjar[21625]: at io.xjar.boot.XJarLauncher.main(XJarLauncher.java:22)
Dec 14 02:22:21 bogon xjar[21625]: Caused by: [java.io](http://java.io/).IOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet: URL [jar:[file:/opt/nezha/nz-web/nz-admin.xjar!/BOOT-INF/classes!/com/nis/setup/controller/SetupController.class](http://file/opt/nezha/nz-web/nz-admin.xjar!/BOOT-INF/classes!/com/nis/setup/controller/SetupController.class)]
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.core.type.classreading.SimpleMetadataReader.getClassReader(SimpleMetadataReader.java:59)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:48)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:103)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:122)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.scanCandidateComponents(ClassPathScanningCandidateComponentProvider.java:456)
Dec 14 02:22:21 bogon xjar[21625]: ... 27 common frames omitted
Dec 14 02:22:21 bogon xjar[21625]: Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 10864
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.asm.ClassReader.<init>(ClassReader.java:199)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.asm.ClassReader.<init>(ClassReader.java:180)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.asm.ClassReader.<init>(ClassReader.java:166)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.asm.ClassReader.<init>(ClassReader.java:287)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.core.type.classreading.SimpleMetadataReader.getClassReader(SimpleMetadataReader.java:56)
Dec 14 02:22:21 bogon xjar[21625]: ... 31 common frames omitted
Dec 14 02:22:21 bogon xjar[21625]: panic: exit status 1
Dec 14 02:22:21 bogon xjar[21625]: goroutine 1 [running]:
Dec 14 02:22:21 bogon xjar[21625]: main.main()
Dec 14 02:22:21 bogon xjar[21625]: /opt/nezha/nz-web/xjar.go:86 +0x710
Dec 14 02:22:21 bogon systemd[1]: nz-web.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Dec 14 02:22:21 bogon systemd[1]: Unit nz-web.service entered failed state.
Dec 14 02:22:21 bogon systemd[1]: nz-web.service failed.
sirolei commented 9 months ago

@choubuzhaole 遇到和你一样的问题,你有解决这个吗?

choubuzhaole commented 9 months ago

@choubuzhaole 遇到和你一样的问题,你有解决这个吗?

没有,准备转移到 graalvm 了,看着这个项目都没有人维护了

jlynet commented 8 months ago

@choubuzhaole 遇到和你一样的问题,你有解决这个吗?

没有,准备转移到 graalvm 了,看着这个项目都没有人维护了 你们搞graalvm了吗?这个好像也很多问题。编译了运行不起来。有时间一起交流下吗?

choubuzhaole commented 7 months ago

@choubuzhaole遇到和你一样的问题,你解决了吗?

没有,准备转移到graalvm了,看着这个项目都没有人维护了 你们搞graalvm了吗?这个愿望也很多问题。编译了运行不起来。有时间一起交流下吗? 没问题,找个同行者

leewi9 commented 7 months ago

有没有更好的还在维护的项目,老外有没有开发过类似的,github搜了一圈居然没有...

qcz-left commented 7 months ago

这是因为SpringBoot启动时要扫描组件, Spring升级到6之后,没有使用到自定义的 URLStreamHandler,即:XBootURLHandler.java,在看 spring-core 里面有个 UrlResource,里面的 createRelativeURL 方法有调整,这个方法最后一行return 那里由 new URL(this.url, relativePath) 调整为了 ResourceUtils.toRelativeURL(this.url, relativePath),就是这一段导致加载class时没有找到自定义 URLStreamHandler 处理器,所以也就没法解密class,然后就报错:Caused by: java.lang.IllegalArgumentException: Unsupported class file major version xxx。

有兴趣可以点到 URL 这个类的源码里面看看,有一段代码是这样写的,context 相当于这个class的父级,SpringBoot3.2.0版本 中,由于这个context为null,导致handle没有进行赋值,在SpringBoot2.x的版本中是有值的,且这个handle就是自定义 URLStreamHandler 处理器,context将自身的handle传递给到了所需要加载的class,所以能成功解密。

if ((context != null) && ((newProtocol == null) ||
                            newProtocol.equalsIgnoreCase(context.protocol))) {
    // inherit the protocol handler from the context
    // if not specified to the constructor
    if (handler == null) {
        handler = context.handler;
    }
}

有一个方法可以解决,那就是修改 spring-core的源码,将UrlResource.createRelativeURL 方法中的 ResourceUtils.toRelativeURL(this.url, relativePath) 改为 new URL(this.url, relativePath) ,重新编译安装spring-core 到本地仓库即可

Hwatu commented 6 months ago

这是因为SpringBoot启动时要扫描组件, Spring升级到6之后,没有使用到自定义的 URLStreamHandler,即:XBootURLHandler.java,在看 spring-core 里面有个 UrlResource,里面的 createRelativeURL 方法有调整,这个方法最后一行return 那里由 new URL(this.url, relativePath) 调整为了 ResourceUtils.toRelativeURL(this.url, relativePath),就是这一段导致加载class时没有找到自定义 URLStreamHandler 处理器,所以也就没法解密class,然后就报错:Caused by: java.lang.IllegalArgumentException: Unsupported class file major version xxx。

有兴趣可以点到 URL 这个类的源码里面看看,有一段代码是这样写的,context 相当于这个class的父级,SpringBoot3.2.0版本 中,由于这个context为null,导致handle没有进行赋值,在SpringBoot2.x的版本中是有值的,且这个handle就是自定义 URLStreamHandler 处理器,context将自身的handle传递给到了所需要加载的class,所以能成功解密。

if ((context != null) && ((newProtocol == null) ||
                            newProtocol.equalsIgnoreCase(context.protocol))) {
    // inherit the protocol handler from the context
    // if not specified to the constructor
    if (handler == null) {
        handler = context.handler;
    }
}

有一个方法可以解决,那就是修改 spring-core的源码,将UrlResource.createRelativeURL 方法中的 ResourceUtils.toRelativeURL(this.url, relativePath) 改为 new URL(this.url, relativePath) ,重新编译安装spring-core 到本地仓库即可

大佬,有编译好的吗?我也遇到这个问题了

qcz-left commented 6 months ago

这是因为SpringBoot启动时要扫描组件, Spring升级到6之后,没有使用到自定义的 URLStreamHandler,即:XBootURLHandler.java,在看 spring-core 里面有个 UrlResource,里面的 createRelativeURL 方法有调整,这个方法最后一行return 那里由 new URL(this.url, relativePath) 调整为了 ResourceUtils.toRelativeURL(this.url, relativePath),就是这一段导致加载class时没有找到自定义 URLStreamHandler 处理器,所以也就没法解密class,然后就报错:Caused by: java.lang.IllegalArgumentException: Unsupported class file major version xxx。 有兴趣可以点到 URL 这个类的源码里面看看,有一段代码是这样写的,context 相当于这个class的父级,SpringBoot3.2.0版本 中,由于这个context为null,导致handle没有进行赋值,在SpringBoot2.x的版本中是有值的,且这个handle就是自定义 URLStreamHandler 处理器,context将自身的handle传递给到了所需要加载的class,所以能成功解密。

if ((context != null) && ((newProtocol == null) ||
                            newProtocol.equalsIgnoreCase(context.protocol))) {
    // inherit the protocol handler from the context
    // if not specified to the constructor
    if (handler == null) {
        handler = context.handler;
    }
}

有一个方法可以解决,那就是修改 spring-core的源码,将UrlResource.createRelativeURL 方法中的 ResourceUtils.toRelativeURL(this.url, relativePath) 改为 new URL(this.url, relativePath) ,重新编译安装spring-core 到本地仓库即可

大佬,有编译好的吗?我也遇到这个问题了

spring-core-6.1.1a.zip

改.zip为.jar,自己用一下就行了,毕竟没有测试过,不清楚会不会有其他未知的问题

qcz-left commented 6 months ago

这是因为SpringBoot启动时要扫描组件, Spring升级到6之后,没有使用到自定义的 URLStreamHandler,即:XBootURLHandler.java,在看 spring-core 里面有个 UrlResource,里面的 createRelativeURL 方法有调整,这个方法最后一行return 那里由 new URL(this.url, relativePath) 调整为了 ResourceUtils.toRelativeURL(this.url, relativePath),就是这一段导致加载class时没有找到自定义 URLStreamHandler 处理器,所以也就没法解密class,然后就报错:Caused by: java.lang.IllegalArgumentException: Unsupported class file major version xxx。 有兴趣可以点到 URL 这个类的源码里面看看,有一段代码是这样写的,context 相当于这个class的父级,SpringBoot3.2.0版本 中,由于这个context为null,导致handle没有进行赋值,在SpringBoot2.x的版本中是有值的,且这个handle就是自定义 URLStreamHandler 处理器,context将自身的handle传递给到了所需要加载的class,所以能成功解密。

if ((context != null) && ((newProtocol == null) ||
                            newProtocol.equalsIgnoreCase(context.protocol))) {
    // inherit the protocol handler from the context
    // if not specified to the constructor
    if (handler == null) {
        handler = context.handler;
    }
}

有一个方法可以解决,那就是修改 spring-core的源码,将UrlResource.createRelativeURL 方法中的 ResourceUtils.toRelativeURL(this.url, relativePath) 改为 new URL(this.url, relativePath) ,重新编译安装spring-core 到本地仓库即可

大佬,有编译好的吗?我也遇到这个问题了

spring-core-6.1.1a.zip

改.zip为.jar,自己用一下就行了,毕竟没有测试过,不清楚会不会有其他未知的问题

@Hwatu

zhaoyuan-72 commented 2 months ago

有没有更好的还在维护的项目,老外有没有开发过类似的,github搜了一圈居然没有...

请问有找到什么替代方案吗

fendo8888 commented 1 month ago

官方找到了一个修复方法:https://github.com/spring-projects/spring-framework/issues/33561

zzqo commented 1 month ago

ResourceUtils.toURL(root.tostring()).equals(root)会一直返回true,并不能解决

MisterChangRay commented 1 month ago

看老大一直不解决。 于是拉取了新分支支持springboot3 目前在springboot3.2.3+jdk17中验证通过 项目地址 https://github.com/MisterChangRay/xjar4springboot3

MisterChangRay commented 1 month ago

springboot 升级到 3.2.0 后 xjar 启动失败,原jar 包能正常运行。

错误信息如下:

Dec 14 02:22:17 bogon xjar[21625]: 2023-12-14T02:22:17.881Z  WARN 21631 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [jar:[file:/opt/nezha/nz-web/nz-admin.xjar!/BOOT-INF/classes!/com/nis/setup/controller/SetupController.class](http://file/opt/nezha/nz-web/nz-admin.xjar!/BOOT-INF/classes!/com/nis/setup/controller/SetupController.class)]
Dec 14 02:22:21 bogon xjar[21625]: 2023-12-14T02:22:21.144Z ERROR 21631 --- [           main] o.s.boot.SpringApplication               : Application run failed
Dec 14 02:22:21 bogon xjar[21625]: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [jar:[file:/opt/nezha/nz-web/nz-admin.xjar!/BOOT-INF/classes!/com/nis/setup/controller/SetupController.class](http://file/opt/nezha/nz-web/nz-admin.xjar!/BOOT-INF/classes!/com/nis/setup/controller/SetupController.class)]
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.scanCandidateComponents(ClassPathScanningCandidateComponentProvider.java:484)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:337)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:277)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.annotation.ComponentScanAnnotationParser.parse(ComponentScanAnnotationParser.java:128)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:296)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:245)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:196)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:164)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:416)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:289)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:349)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:118)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:775)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:597)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:753)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:455)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.boot.SpringApplication.run(SpringApplication.java:323)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.boot.SpringApplication.run(SpringApplication.java:1342)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.boot.SpringApplication.run(SpringApplication.java:1331)
Dec 14 02:22:21 bogon xjar[21625]: at com.nis.AdminApplication.main(AdminApplication.java:30)
Dec 14 02:22:21 bogon xjar[21625]: at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
Dec 14 02:22:21 bogon xjar[21625]: at java.base/java.lang.reflect.Method.invoke(Method.java:580)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.boot.loader.Launcher.launch(Launcher.java:95)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
Dec 14 02:22:21 bogon xjar[21625]: at io.xjar.boot.XJarLauncher.launch(XJarLauncher.java:26)
Dec 14 02:22:21 bogon xjar[21625]: at io.xjar.boot.XJarLauncher.main(XJarLauncher.java:22)
Dec 14 02:22:21 bogon xjar[21625]: Caused by: [java.io](http://java.io/).IOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet: URL [jar:[file:/opt/nezha/nz-web/nz-admin.xjar!/BOOT-INF/classes!/com/nis/setup/controller/SetupController.class](http://file/opt/nezha/nz-web/nz-admin.xjar!/BOOT-INF/classes!/com/nis/setup/controller/SetupController.class)]
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.core.type.classreading.SimpleMetadataReader.getClassReader(SimpleMetadataReader.java:59)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:48)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:103)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:122)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.scanCandidateComponents(ClassPathScanningCandidateComponentProvider.java:456)
Dec 14 02:22:21 bogon xjar[21625]: ... 27 common frames omitted
Dec 14 02:22:21 bogon xjar[21625]: Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 10864
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.asm.ClassReader.<init>(ClassReader.java:199)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.asm.ClassReader.<init>(ClassReader.java:180)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.asm.ClassReader.<init>(ClassReader.java:166)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.asm.ClassReader.<init>(ClassReader.java:287)
Dec 14 02:22:21 bogon xjar[21625]: at org.springframework.core.type.classreading.SimpleMetadataReader.getClassReader(SimpleMetadataReader.java:56)
Dec 14 02:22:21 bogon xjar[21625]: ... 31 common frames omitted
Dec 14 02:22:21 bogon xjar[21625]: panic: exit status 1
Dec 14 02:22:21 bogon xjar[21625]: goroutine 1 [running]:
Dec 14 02:22:21 bogon xjar[21625]: main.main()
Dec 14 02:22:21 bogon xjar[21625]: /opt/nezha/nz-web/xjar.go:86 +0x710
Dec 14 02:22:21 bogon systemd[1]: nz-web.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Dec 14 02:22:21 bogon systemd[1]: Unit nz-web.service entered failed state.
Dec 14 02:22:21 bogon systemd[1]: nz-web.service failed.

拉取了新分支,支持springboot3 目前在springboot3.2.3+jdk17中验证通过 需要的道友请移步 https://github.com/MisterChangRay/xjar4springboot3

IOTWord commented 1 month ago

graalvm

找到其他的工具了吗?推荐推荐啊

qcz-left commented 1 week ago

spring-core:6.1.14 官方已修复,可以解密了