sofastack / sofa-boot

SOFABoot is a framework that enhances Spring Boot and fully compatible with it, provides readiness check, class isolation, etc.
https://www.sofastack.tech/sofa-boot/docs/Home
Apache License 2.0
4.97k stars 1.27k forks source link

install biz error #1065

Closed scstc closed 1 year ago

scstc commented 1 year ago

use biz -i file:///D:/bo-cloud/spring-boot-ark-biz/target/spring-boot-ark-biz-0.0.1-SNAPSHOT-ark-biz.jar then java.lang.IllegalArgumentException: Unable to instantiate org.springframework.boot.env.EnvironmentPostProcessor [com.baomidou.mybatisplus.autoconfigure.SafetyEncryptProcessor] at org.springframework.boot.util.Instantiator.instantiate(Instantiator.java:131) ~[spring-boot-2.6.6.jar:2.6.6] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_321] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_321] at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384) ~[na:1.8.0_321] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[na:1.8.0_321] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[na:1.8.0_321] at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[na:1.8.0_321] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_321] at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[na:1.8.0_321] at org.springframework.boot.util.Instantiator.instantiate(Instantiator.java:118) ~[spring-boot-2.6.6.jar:2.6.6] at org.springframework.boot.util.Instantiator.instantiate(Instantiator.java:103) ~[spring-boot-2.6.6.jar:2.6.6] at org.springframework.boot.env.ReflectionEnvironmentPostProcessorsFactory.getEnvironmentPostProcessors(ReflectionEnvironmentPostProcessorsFactory.java:72) ~[spring-boot-2.6.6.jar:2.6.6] at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.getEnvironmentPostProcessors(EnvironmentPostProcessorApplicationListener.java:122) ~[spring-boot-2.6.6.jar:2.6.6] at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.onApplicationEnvironmentPreparedEvent(EnvironmentPostProcessorApplicationListener.java:100) ~[spring-boot-2.6.6.jar:2.6.6] at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.onApplicationEvent(EnvironmentPostProcessorApplicationListener.java:87) ~[spring-boot-2.6.6.jar:2.6.6] at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176) ~[spring-context-5.3.18.jar:5.3.18] at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169) ~[spring-context-5.3.18.jar:5.3.18] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143) ~[spring-context-5.3.18.jar:5.3.18] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131) ~[spring-context-5.3.18.jar:5.3.18] at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:85) ~[spring-boot-2.6.6.jar:2.6.6] at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:66) ~[spring-boot-2.6.6.jar:2.6.6] at java.util.ArrayList.forEach(ArrayList.java:1259) ~[na:1.8.0_321] at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:120) ~[spring-boot-2.6.6.jar:2.6.6] at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:114) ~[spring-boot-2.6.6.jar:2.6.6] at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:65) ~[spring-boot-2.6.6.jar:2.6.6] at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:339) ~[spring-boot-2.6.6.jar:2.6.6] at org.springframework.boot.SpringApplication.run(SpringApplication.java:297) ~[spring-boot-2.6.6.jar:2.6.6] at com.alipay.sofa.springbootarkbiz.SpringBootArkBizApplication.main(SpringBootArkBizApplication.java:16) [null-null-20230202173045143-unpack/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_321] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_321] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_321] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_321] at com.alipay.sofa.ark.bootstrap.MainMethodRunner.run(MainMethodRunner.java:48) [sofa-ark-archive-2.0.6.jar!/:na] at com.alipay.sofa.ark.container.model.BizModel.start(BizModel.java:288) [sofa-ark-container-2.0.6.jar!/:na] at com.alipay.sofa.ark.api.ArkClient.installBiz(ArkClient.java:172) [sofa-ark-api-2.0.6.jar:na] at com.alipay.sofa.ark.api.ArkClient.installOperation(ArkClient.java:347) [sofa-ark-api-2.0.6.jar:na] at com.alipay.sofa.ark.api.ArkClient.installOperation(ArkClient.java:332) [sofa-ark-api-2.0.6.jar:na] at com.alipay.sofa.ark.container.service.biz.BizCommandProvider$BizCommand$1.run(BizCommandProvider.java:249) [sofa-ark-container-2.0.6.jar!/:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_321] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_321] at java.lang.Thread.run(Thread.java:750) [na:1.8.0_321] Caused by: com.alipay.sofa.ark.exception.ArkLoaderException: [ArkBiz Loader] spring-boot-ark-biz:0.0.1-SNAPSHOT : can not load class: com.baomidou.mybatisplus.autoconfigure.SafetyEncryptProcessor

ps: base app include mybatis-plus-boot-starter

Ask your question here

gaosaroma commented 1 year ago

sofa-ark v2.1.0 运行 demo 有一些问题;建议使用最新的 sofa-ark 运行 demo。

yuanChina commented 1 year ago

具体逻辑是啥 我2.1.1运行也会有这个问题 我在ark biz里并没有这个依赖 而是master biz有这个依赖 但是安装插件的时候bizClassloader也会进行加载还提示找不到这个类 @gaosaroma

gaosaroma commented 1 year ago

出现这个报错的具体执行流程是啥?有改动demo的代码么?demo代码没有改动的话,v2.1.1执行是不会出现这个报错的。如果有改动,请说明一下改动。@yuanChina

HzjNeverStop commented 1 year ago

SOFAARK 相关的问题请到 https://github.com/sofastack/sofa-ark 下提 issue吧