官方例子: sofa-ark-dynamic-guides
动态加载biz,服务调用出错,报错如下:
SOFA-BOOT-01-00400: JVM Reference[interface io.sofastack.dynamic.facade.StrategyService#] can not find the corresponding JVM service. Please check if there is a SOFA deployment publish the corresponding JVM service. If this exception occurred when the application starts up, please add Require-Module to SOFA deployment's MANIFEST.MF to indicate the startup dependency of SOFA modules.
18:53:37.475 ERROR o.a.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [/] threw exception [Request processing failed; nested exception is java.lang.IllegalStateException: SOFA-BOOT-01-00400: JVM Reference[interface io.sofastack.dynamic.facade.StrategyService#annotationImpl] can not find the corresponding JVM service. Please check if there is a SOFA deployment publish the corresponding JVM service. If this exception occurred when the application starts up, please add Require-Module to SOFA deployment's MANIFEST.MF to indicate the startup dependency of SOFA modules] with root cause
java.lang.IllegalStateException: SOFA-BOOT-01-00400: JVM Reference[interface io.sofastack.dynamic.facade.StrategyService#annotationImpl] can not find the corresponding JVM service. Please check if there is a SOFA deployment publish the corresponding JVM service. If this exception occurred when the application starts up, please add Require-Module to SOFA deployment's MANIFEST.MF to indicate the startup dependency of SOFA modules
at com.alipay.sofa.runtime.service.binding.JvmBindingAdapter$JvmServiceInvoker.doInvoke(JvmBindingAdapter.java:241)
at com.alipay.sofa.runtime.spi.service.ServiceProxy.invoke(ServiceProxy.java:40)
at com.alipay.sofa.runtime.service.binding.JvmBindingAdapter$JvmServiceInvoker.invoke(JvmBindingAdapter.java:159)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy82.strategy(Unknown Source)
at io.sofastack.stockmng.controller.IndexController.index(IndexController.java:27)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
Describe the bug
官方例子: sofa-ark-dynamic-guides 动态加载biz,服务调用出错,报错如下: SOFA-BOOT-01-00400: JVM Reference[interface io.sofastack.dynamic.facade.StrategyService#] can not find the corresponding JVM service. Please check if there is a SOFA deployment publish the corresponding JVM service. If this exception occurred when the application starts up, please add Require-Module to SOFA deployment's MANIFEST.MF to indicate the startup dependency of SOFA modules.
关联Issue: sofa-ark-dynamic-guides#28
18:53:37.475 ERROR o.a.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [/] threw exception [Request processing failed; nested exception is java.lang.IllegalStateException: SOFA-BOOT-01-00400: JVM Reference[interface io.sofastack.dynamic.facade.StrategyService#annotationImpl] can not find the corresponding JVM service. Please check if there is a SOFA deployment publish the corresponding JVM service. If this exception occurred when the application starts up, please add Require-Module to SOFA deployment's MANIFEST.MF to indicate the startup dependency of SOFA modules] with root cause java.lang.IllegalStateException: SOFA-BOOT-01-00400: JVM Reference[interface io.sofastack.dynamic.facade.StrategyService#annotationImpl] can not find the corresponding JVM service. Please check if there is a SOFA deployment publish the corresponding JVM service. If this exception occurred when the application starts up, please add Require-Module to SOFA deployment's MANIFEST.MF to indicate the startup dependency of SOFA modules at com.alipay.sofa.runtime.service.binding.JvmBindingAdapter$JvmServiceInvoker.doInvoke(JvmBindingAdapter.java:241) at com.alipay.sofa.runtime.spi.service.ServiceProxy.invoke(ServiceProxy.java:40) at com.alipay.sofa.runtime.service.binding.JvmBindingAdapter$JvmServiceInvoker.invoke(JvmBindingAdapter.java:159) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) at com.sun.proxy.$Proxy82.strategy(Unknown Source) at io.sofastack.stockmng.controller.IndexController.index(IndexController.java:27) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566)
Steps to reproduce
-Dsofa.ark.embed.enable=true
启动参数,直接启动 StockMngApplication 类。Environment
java -version
): JDK11uname -a
): win11