killme2008 / aviatorscript

A high performance scripting language hosted on the JVM.
http://fnil.net/aviator/
4.51k stars 839 forks source link

SpringBoot3.0 native打包后,启动项目报错 #506

Open dudiao opened 1 year ago

dudiao commented 1 year ago
Caused by: java.lang.ExceptionInInitializerError: null
        at com.googlecode.aviator.AviatorEvaluator.getInstance(AviatorEvaluator.java:112) ~[na:na]
        at com.googlecode.aviator.AviatorEvaluator.<clinit>(AviatorEvaluator.java:61) ~[na:na]
        at com.github.dudiao.cli.sia.ExtractExcelAutoConfiguration.cliAviator(ExtractExcelAutoConfiguration.java:23) ~[nboot-cli:na]
        at com.github.dudiao.cli.sia.ExtractExcelAutoConfiguration$$SpringCGLIB$$0.CGLIB$cliAviator$0(<generated>) ~[nboot-cli:na]
        at com.github.dudiao.cli.sia.ExtractExcelAutoConfiguration$$SpringCGLIB$$2.invoke(<generated>) ~[nboot-cli:na]
        at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:257) ~[nboot-cli:6.0.2]
        at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) ~[na:na]
        at com.github.dudiao.cli.sia.ExtractExcelAutoConfiguration$$SpringCGLIB$$0.cliAviator(<generated>) ~[nboot-cli:na]
        at com.github.dudiao.cli.sia.ExtractExcelAutoConfiguration__BeanDefinitions.lambda$getCliAviatorInstanceSupplier$0(ExtractExcelAutoConfiguration__BeanDefinitions.java:30) ~[na:na]
        at org.springframework.util.function.ThrowingFunction.apply(ThrowingFunction.java:63) ~[nboot-cli:6.0.2]
        at org.springframework.util.function.ThrowingFunction.apply(ThrowingFunction.java:51) ~[nboot-cli:6.0.2]
        at org.springframework.beans.factory.aot.BeanInstanceSupplier.lambda$withGenerator$0(BeanInstanceSupplier.java:173) ~[na:na]
        at org.springframework.util.function.ThrowingBiFunction.apply(ThrowingBiFunction.java:68) ~[nboot-cli:6.0.2]
        at org.springframework.util.function.ThrowingBiFunction.apply(ThrowingBiFunction.java:54) ~[nboot-cli:6.0.2]
        at org.springframework.beans.factory.aot.BeanInstanceSupplier.lambda$get$2(BeanInstanceSupplier.java:208) ~[na:na]
        at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:59) ~[nboot-cli:6.0.2]
        at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:47) ~[nboot-cli:6.0.2]
        at org.springframework.beans.factory.aot.BeanInstanceSupplier.invokeBeanSupplier(BeanInstanceSupplier.java:220) ~[na:na]
        at org.springframework.beans.factory.aot.BeanInstanceSupplier.get(BeanInstanceSupplier.java:208) ~[na:na]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainInstanceFromSupplier(AbstractAutowireCapableBeanFactory.java:1225) ~[nboot-cli:6.0.2]
        ... 33 common frames omitted
Caused by: java.lang.IllegalStateException: Fail to load internal lib: aviator.av
        at com.googlecode.aviator.AviatorEvaluatorInstance.loadInternalFunctions(AviatorEvaluatorInstance.java:1095) ~[nboot-cli:na]
        at com.googlecode.aviator.AviatorEvaluatorInstance.loadInternalLibs(AviatorEvaluatorInstance.java:1061) ~[nboot-cli:na]
        at com.googlecode.aviator.AviatorEvaluatorInstance.loadLib(AviatorEvaluatorInstance.java:933) ~[nboot-cli:na]
        at com.googlecode.aviator.AviatorEvaluatorInstance.<init>(AviatorEvaluatorInstance.java:1123) ~[nboot-cli:na]
        at com.googlecode.aviator.AviatorEvaluator$StaticHolder.<clinit>(AviatorEvaluator.java:102) ~[na:na]
        ... 53 common frames omitted
Caused by: java.io.IOException: Stream closed
        at java.base@17.0.5/java.io.BufferedInputStream.getInIfOpen(BufferedInputStream.java:157) ~[nboot-cli:na]
        at java.base@17.0.5/java.io.BufferedInputStream.read1(BufferedInputStream.java:282) ~[nboot-cli:na]
        at java.base@17.0.5/java.io.BufferedInputStream.read(BufferedInputStream.java:343) ~[nboot-cli:na]
        at java.base@17.0.5/sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:270) ~[na:na]
        at java.base@17.0.5/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:313) ~[na:na]
        at java.base@17.0.5/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:188) ~[na:na]
        at java.base@17.0.5/java.io.InputStreamReader.read(InputStreamReader.java:177) ~[nboot-cli:na]
        at com.googlecode.aviator.utils.Utils.readFully(Utils.java:70) ~[na:na]
        at com.googlecode.aviator.AviatorEvaluatorInstance.loadInternalFunctions(AviatorEvaluatorInstance.java:1085) ~[nboot-cli:na]
        ... 57 common frames omitted
jisongxi commented 3 months ago

@dudiao 楼主解决了吗?需要怎么配置支持native二进制