Closed javawcy closed 1 year ago
same error with you, waiting ...
Please refer to the component version and try again. https://github.com/alibaba/spring-cloud-alibaba/wiki/%E7%89%88%E6%9C%AC%E8%AF%B4%E6%98%8E
If you are deploying nacos using docker, map port 9848 as well. Because nacos2.2.0 adds grpc communication. Otherwise, If you are deploying Nacos using Docker, map Port 9848 as well. Because Nacos2.2.0 adds GRPC communication. Otherwise, the connection cannot be initialized. See #6154
From your error report informations of below:
java.lang.NullPointerException: inStream parameter is null
at java.base@17.0.5/java.util.Objects.requireNonNull(Objects.java:233)
at java.base@17.0.5/java.util.Properties.load(Properties.java:407)
at com.alibaba.nacos.common.utils.VersionUtils.(VersionUtils.java:45)
at com.alibaba.nacos.client.utils.ParamUtil.(ParamUtil.java:100)
at com.alibaba.nacos.client.config.NacosConfigService.initNamespace(NacosConfigService.java:90)
at com.alibaba.nacos.client.config.NacosConfigService.(NacosConfigService.java:78)
at java.base@17.0.5/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base@17.0.5/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
at com.alibaba.nacos.api.config.ConfigFactory.createConfigService(ConfigFactory.java:43)
at com.alibaba.nacos.api.NacosFactory.createConfigService(NacosFactory.java:44)
at com.alibaba.cloud.nacos.NacosConfigManager.createConfigService(NacosConfigManager.java:55)
at com.alibaba.cloud.nacos.NacosConfigManager.(NacosConfigManager.java:43)
There is a high probability that it is because you did not provide a dynamic configuration file. When generating GraalVM Native Image, I suggest that you follow the Spring Boot 3.0 document process for mirroring operations and provide dynamic configuration files for relevant reflections.
This issue has been open 30 days with no activity. This will be closed in 7 days.
This issue has been automatically marked as stale because it hasn't had any recent activity.If you think this should still be open, or the problem still persists, just pop a reply in the comments and one of the maintainers will (try!) to follow up. Thank you for your interest and contribution to the Sping Cloud Alibaba Community.
我们鼓励使用英文,如果不能直接使用,可以使用翻译软件,您仍旧可以保留中文原文。另外请按照如下要求提交相关信息节省社区维护同学的理解成本,否则该讨论极有可能直接被忽视或关闭。 We recommend using English. If you are non-native English speaker, you can use the translation software. We recommend using English. If you are non-native English speaker, you can use the translation software. In addition, please submit relevant information according to the following requirements to save the understanding cost of community maintenances, otherwise the discussion is very likely to be ignored or closed directly.
Which Component Nacos config
Describe the bug Use springboot-3.0.4,spring-cloud-alibaba-2022.0.0.0-RC1,spring-cloud-2022.0.1,mse-nacos-config-server-2.1.0.2 on aliyun It's ok with nacos config get&refresh before native compile, but after native compile it goes wrong refresh config, i was ensure the port 8848&9848 is all right open. here is my demo log demo git:(master) ✗ ./mvnw -Pnative native:compile [INFO] Scanning for projects... [INFO] [INFO] --------------------------< com.example:demo >-------------------------- [INFO] Building demo 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] >>> native-maven-plugin:0.9.20:compile (default-cli) > package @ demo >>> [INFO] [INFO] --- native-maven-plugin:0.9.20:add-reachability-metadata (add-reachability-metadata) @ demo --- [INFO] [graalvm reachability metadata repository for ch.qos.logback:logback-classic:1.4.5]: Configuration directory not found. Trying latest version. [INFO] [graalvm reachability metadata repository for ch.qos.logback:logback-classic:1.4.5]: Configuration directory is ch.qos.logback/logback-classic/1.4.1 [INFO] [graalvm reachability metadata repository for org.apache.tomcat.embed:tomcat-embed-core:10.1.5]: Configuration directory not found. Trying latest version. [INFO] [graalvm reachability metadata repository for org.apache.tomcat.embed:tomcat-embed-core:10.1.5]: Configuration directory is org.apache.tomcat.embed/tomcat-embed-core/10.0.20 [INFO] [INFO] --- maven-resources-plugin:3.3.0:resources (default-resources) @ demo --- [INFO] Copying 1 resource [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) @ demo --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 1 source file to /Users/mac/Desktop/demo/target/classes [INFO] [INFO] --- maven-resources-plugin:3.3.0:testResources (default-testResources) @ demo --- [INFO] skip non existing resourceDirectory /Users/mac/Desktop/demo/src/test/resources [INFO] [INFO] --- maven-compiler-plugin:3.10.1:testCompile (default-testCompile) @ demo --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 1 source file to /Users/mac/Desktop/demo/target/test-classes [INFO] [INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ demo --- [INFO] [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running com.example.demo.DemoApplicationTests 16:13:55.427 [main] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Neither @ContextConfiguration nor @ContextHierarchy found for test class [DemoApplicationTests]: using SpringBootContextLoader 16:13:55.431 [main] DEBUG org.springframework.test.context.support.AbstractContextLoader - Could not detect default resource locations for test class [com.example.demo.DemoApplicationTests]: no resource found for suffixes {-context.xml, Context.groovy}. 16:13:55.432 [main] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils - Could not detect default configuration classes for test class [com.example.demo.DemoApplicationTests]: DemoApplicationTests does not declare any static, non-private, non-final, nested classes annotated with @Configuration. 16:13:55.464 [main] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Using ContextCustomizers for test class [DemoApplicationTests]: [ExcludeFilterContextCustomizer, DuplicateJsonObjectContextCustomizer, MockitoContextCustomizer, TestRestTemplateContextCustomizer, DisableObservabilityContextCustomizer, PropertyMappingContextCustomizer, Customizer] 16:13:55.545 [main] DEBUG org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider - Identified candidate component class: file [/Users/mac/Desktop/demo/target/classes/com/example/demo/DemoApplication.class] 16:13:55.550 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Found @SpringBootConfiguration com.example.demo.DemoApplication for test class com.example.demo.DemoApplicationTests 16:13:55.658 [main] DEBUG org.springframework.test.context.util.TestContextSpringFactoriesUtils - Skipping candidate TestExecutionListener [org.springframework.test.context.transaction.TransactionalTestExecutionListener] due to a missing dependency. Specify custom TestExecutionListener classes or make the default TestExecutionListener classes and their required dependencies available. Offending class: [org/springframework/transaction/interceptor/TransactionAttributeSource] 16:13:55.660 [main] DEBUG org.springframework.test.context.util.TestContextSpringFactoriesUtils - Skipping candidate TestExecutionListener [org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener] due to a missing dependency. Specify custom TestExecutionListener classes or make the default TestExecutionListener classes and their required dependencies available. Offending class: [org/springframework/transaction/interceptor/TransactionAttribute] 16:13:55.665 [main] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Using TestExecutionListeners for test class [DemoApplicationTests]: [ServletTestExecutionListener, DirtiesContextBeforeModesTestExecutionListener, ApplicationEventsTestExecutionListener, MockitoTestExecutionListener, DependencyInjectionTestExecutionListener, DirtiesContextTestExecutionListener, EventPublishingTestExecutionListener, ResetMocksTestExecutionListener, RestDocsTestExecutionListener, MockRestServiceServerResetTestExecutionListener, MockMvcPrintOnlyOnFailureTestExecutionListener, WebDriverTestExecutionListener, MockWebServiceServerTestExecutionListener] 16:13:55.668 [main] DEBUG org.springframework.test.context.support.AbstractDirtiesContextTestExecutionListener - Before test class: class [DemoApplicationTests], class annotated with @DirtiesContext [false] with mode [null] 2023-03-20T16:13:57.606+08:00 WARN 41832 --- [ main] c.a.nacos.client.logging.NacosLogging : Load Logback Configuration of Nacos fail, message: org/slf4j/impl/StaticLoggerBinder
. _ _ /\ / '_ () \ \ \ \ ( ( )\ | ' | '| | ' \/ ` | \ \ \ \ \/ _)| |)| | | | | || (| | ) ) ) ) ' |__| .|| ||| |\, | / / / / =========|_|==============|__/=//// :: Spring Boot :: (v3.0.4)
2023-03-20T16:13:57.667+08:00 INFO 41832 --- [ main] com.example.demo.DemoApplicationTests : Starting DemoApplicationTests using Java 17.0.5 with PID 41832 (started by mac in /Users/mac/Desktop/demo) 2023-03-20T16:13:57.668+08:00 INFO 41832 --- [ main] com.example.demo.DemoApplicationTests : No active profile set, falling back to 1 default profile: "default" 2023-03-20T16:13:57.697+08:00 INFO 41832 --- [ main] c.a.c.n.c.NacosConfigDataLoader : [Nacos Config] Load config[dataId=test-application.yml, group=DEFAULT_GROUP] success 2023-03-20T16:13:58.367+08:00 INFO 41832 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=b25ee030-3cd6-3f52-afb4-640e99edf814 2023-03-20T16:13:58.990+08:00 INFO 41832 --- [ main] com.example.demo.DemoApplicationTests : Started DemoApplicationTests in 3.226 seconds (process running for 4.259) xxxx xxxx 2023-03-20T16:13:58.998+08:00 INFO 41832 --- [ main] c.a.nacos.client.config.impl.CacheData : nacos.cache.data.init.snapshot = true 2023-03-20T16:13:58.999+08:00 INFO 41832 --- [ main] c.a.n.client.config.impl.ClientWorker : [fixed-yst-new-test-mse-a6519070-nacos-ans.mse.aliyuncs.com_8848] [subscribe] test-application.yml+DEFAULT_GROUP+yst-new-test 2023-03-20T16:13:59.010+08:00 INFO 41832 --- [ main] c.a.nacos.client.config.impl.CacheData : [fixed-yst-new-test-mse-a6519070-nacos-ans.mse.aliyuncs.com_8848] [add-listener] ok, tenant=yst-new-test, dataId=test-application.yml, group=DEFAULT_GROUP, cnt=1 2023-03-20T16:13:59.011+08:00 INFO 41832 --- [ main] c.a.c.n.refresh.NacosContextRefresher : [Nacos Config] Listening config: dataId=test-application.yml, group=DEFAULT_GROUP [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.289 s - in com.example.demo.DemoApplicationTests 2023-03-20T16:13:59.549+08:00 WARN 41832 --- [ Thread-1] c.a.n.common.http.HttpClientBeanHolder : [HttpClientBeanHolder] Start destroying common HttpClient 2023-03-20T16:13:59.549+08:00 WARN 41832 --- [ Thread-6] c.a.nacos.common.notify.NotifyCenter : [NotifyCenter] Start destroying Publisher 2023-03-20T16:13:59.549+08:00 WARN 41832 --- [ Thread-6] c.a.nacos.common.notify.NotifyCenter : [NotifyCenter] Destruction of the end 2023-03-20T16:13:59.550+08:00 WARN 41832 --- [ Thread-1] c.a.n.common.http.HttpClientBeanHolder : [HttpClientBeanHolder] Destruction of the end [INFO] [INFO] Results: [INFO] [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] [INFO] --- spring-boot-maven-plugin:3.0.4:process-aot (process-aot) @ demo --- 2023-03-20T16:14:02.321+08:00 WARN 41847 --- [ main] c.a.nacos.client.logging.NacosLogging : Load Logback Configuration of Nacos fail, message: org/slf4j/impl/StaticLoggerBinder
. _ _ /\ / '_ () \ \ \ \ ( ( )\ | ' | '| | ' \/ ` | \ \ \ \ \/ _)| |)| | | | | || (| | ) ) ) ) ' |__| .|| ||| |\, | / / / / =========|_|==============|__/=//// :: Spring Boot :: (v3.0.4)
2023-03-20T16:14:02.386+08:00 INFO 41847 --- [ main] com.example.demo.DemoApplication : Starting DemoApplication using Java 17.0.5 with PID 41847 (/Users/mac/Desktop/demo/target/classes started by mac in /Users/mac/Desktop/demo) 2023-03-20T16:14:02.387+08:00 INFO 41847 --- [ main] com.example.demo.DemoApplication : No active profile set, falling back to 1 default profile: "default" 2023-03-20T16:14:02.437+08:00 INFO 41847 --- [ main] c.a.c.n.c.NacosConfigDataLoader : [Nacos Config] Load config[dataId=test-application.yml, group=DEFAULT_GROUP] success 2023-03-20T16:14:03.076+08:00 INFO 41847 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=5dab1cab-9c62-3987-95c3-136196243588 2023-03-20T16:14:03.973+08:00 WARN 41847 --- [ Thread-1] c.a.n.common.http.HttpClientBeanHolder : [HttpClientBeanHolder] Start destroying common HttpClient 2023-03-20T16:14:03.973+08:00 WARN 41847 --- [ Thread-6] c.a.nacos.common.notify.NotifyCenter : [NotifyCenter] Start destroying Publisher 2023-03-20T16:14:03.973+08:00 WARN 41847 --- [ Thread-6] c.a.nacos.common.notify.NotifyCenter : [NotifyCenter] Destruction of the end 2023-03-20T16:14:03.974+08:00 WARN 41847 --- [ Thread-1] c.a.n.common.http.HttpClientBeanHolder : [HttpClientBeanHolder] Destruction of the end [INFO] [INFO] --- maven-jar-plugin:3.3.0:jar (default-jar) @ demo --- [INFO] Building jar: /Users/mac/Desktop/demo/target/demo-0.0.1-SNAPSHOT.jar [INFO] [INFO] --- spring-boot-maven-plugin:3.0.4:repackage (repackage) @ demo --- [INFO] Replacing main artifact with repackaged archive [INFO] [INFO] <<< native-maven-plugin:0.9.20:compile (default-cli) < package @ demo <<< [INFO] [INFO] [INFO] --- native-maven-plugin:0.9.20:compile (default-cli) @ demo --- [INFO] Found GraalVM installation from JAVA_HOME variable. [INFO] [graalvm reachability metadata repository for ch.qos.logback:logback-classic:1.4.5]: Configuration directory not found. Trying latest version. [INFO] [graalvm reachability metadata repository for ch.qos.logback:logback-classic:1.4.5]: Configuration directory is ch.qos.logback/logback-classic/1.4.1 [WARNING] Properties file at 'jar:file:///Users/mac/.m2/repository/com/alibaba/nacos/nacos-client/2.2.1-RC/nacos-client-2.2.1-RC.jar!/META-INF/native-image/io.netty/common/native-image.properties' does not match the recommended 'META-INF/native-image/com.alibaba.nacos/nacos-client/native-image.properties' layout. [WARNING] Properties file at 'jar:file:///Users/mac/.m2/repository/com/alibaba/nacos/nacos-client/2.2.1-RC/nacos-client-2.2.1-RC.jar!/META-INF/native-image/io.netty/buffer/native-image.properties' does not match the recommended 'META-INF/native-image/com.alibaba.nacos/nacos-client/native-image.properties' layout. [WARNING] Properties file at 'jar:file:///Users/mac/.m2/repository/com/alibaba/nacos/nacos-client/2.2.1-RC/nacos-client-2.2.1-RC.jar!/META-INF/native-image/io.netty/transport/native-image.properties' does not match the recommended 'META-INF/native-image/com.alibaba.nacos/nacos-client/native-image.properties' layout. [WARNING] Properties file at 'jar:file:///Users/mac/.m2/repository/com/alibaba/nacos/nacos-client/2.2.1-RC/nacos-client-2.2.1-RC.jar!/META-INF/native-image/io.netty/handler/native-image.properties' does not match the recommended 'META-INF/native-image/com.alibaba.nacos/nacos-client/native-image.properties' layout. [WARNING] Properties file at 'jar:file:///Users/mac/.m2/repository/com/alibaba/nacos/nacos-client/2.2.1-RC/nacos-client-2.2.1-RC.jar!/META-INF/native-image/io.netty/codec-http/native-image.properties' does not match the recommended 'META-INF/native-image/com.alibaba.nacos/nacos-client/native-image.properties' layout. [WARNING] Properties file at 'jar:file:///Users/mac/.m2/repository/com/alibaba/nacos/nacos-client/2.2.1-RC/nacos-client-2.2.1-RC.jar!/META-INF/native-image/io.netty/codec-http2/native-image.properties' does not match the recommended 'META-INF/native-image/com.alibaba.nacos/nacos-client/native-image.properties' layout. [INFO] [graalvm reachability metadata repository for org.apache.tomcat.embed:tomcat-embed-core:10.1.5]: Configuration directory not found. Trying latest version. [INFO] [graalvm reachability metadata repository for org.apache.tomcat.embed:tomcat-embed-core:10.1.5]: Configuration directory is org.apache.tomcat.embed/tomcat-embed-core/10.0.20 [INFO] Executing: /Users/mac/.sdkman/candidates/java/current/bin/native-image -cp /Users/mac/Desktop/demo/target/classes:/Users/mac/.m2/repository/org/springframework/boot/spring-boot/3.0.4/spring-boot-3.0.4.jar:/Users/mac/.m2/repository/org/springframework/boot/spring-boot-starter-json/3.0.4/spring-boot-starter-json-3.0.4.jar:/Users/mac/.m2/repository/org/springframework/spring-beans/6.0.6/spring-beans-6.0.6.jar:/Users/mac/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.14.2/jackson-datatype-jsr310-2.14.2.jar:/Users/mac/.m2/repository/io/micrometer/micrometer-observation/1.10.4/micrometer-observation-1.10.4.jar:/Users/mac/.m2/repository/ch/qos/logback/logback-classic/1.4.5/logback-classic-1.4.5.jar:/Users/mac/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.14.2/jackson-databind-2.14.2.jar:/Users/mac/.m2/repository/com/alibaba/nacos/nacos-auth-plugin/2.2.1-RC/nacos-auth-plugin-2.2.1-RC.jar:/Users/mac/.m2/repository/org/springframework/cloud/spring-cloud-commons/4.0.1/spring-cloud-commons-4.0.1.jar:/Users/mac/.m2/repository/commons-codec/commons-codec/1.15/commons-codec-1.15.jar:/Users/mac/.m2/repository/org/apache/logging/log4j/log4j-api/2.19.0/log4j-api-2.19.0.jar:/Users/mac/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/10.1.5/tomcat-embed-websocket-10.1.5.jar:/Users/mac/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/3.0.4/spring-boot-autoconfigure-3.0.4.jar:/Users/mac/.m2/repository/org/apache/httpcomponents/httpcore/4.4.16/httpcore-4.4.16.jar:/Users/mac/.m2/repository/org/springframework/cloud/spring-cloud-context/4.0.1/spring-cloud-context-4.0.1.jar:/Users/mac/.m2/repository/org/springframework/spring-jcl/6.0.6/spring-jcl-6.0.6.jar:/Users/mac/.m2/repository/com/alibaba/nacos/nacos-encryption-plugin/2.2.1-RC/nacos-encryption-plugin-2.2.1-RC.jar:/Users/mac/.m2/repository/org/springframework/boot/spring-boot-starter-web/3.0.4/spring-boot-starter-web-3.0.4.jar:/Users/mac/.m2/repository/com/alibaba/nacos/nacos-client/2.2.1-RC/nacos-client-2.2.1-RC.jar:/Users/mac/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/10.1.5/tomcat-embed-el-10.1.5.jar:/Users/mac/.m2/repository/org/springframework/spring-expression/6.0.6/spring-expression-6.0.6.jar:/Users/mac/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.14.2/jackson-annotations-2.14.2.jar:/Users/mac/.m2/repository/io/micrometer/micrometer-commons/1.10.4/micrometer-commons-1.10.4.jar:/Users/mac/.m2/repository/org/springframework/spring-aop/6.0.6/spring-aop-6.0.6.jar:/Users/mac/.m2/repository/org/slf4j/jul-to-slf4j/2.0.6/jul-to-slf4j-2.0.6.jar:/Users/mac/.m2/repository/org/slf4j/slf4j-api/2.0.6/slf4j-api-2.0.6.jar:/Users/mac/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/10.1.5/tomcat-embed-core-10.1.5.jar:/Users/mac/.m2/repository/io/prometheus/simpleclient_tracer_otel_agent/0.16.0/simpleclient_tracer_otel_agent-0.16.0.jar:/Users/mac/.m2/repository/io/prometheus/simpleclient_tracer_common/0.16.0/simpleclient_tracer_common-0.16.0.jar:/Users/mac/.m2/repository/io/prometheus/simpleclient/0.16.0/simpleclient-0.16.0.jar:/Users/mac/.m2/repository/io/prometheus/simpleclient_tracer_otel/0.16.0/simpleclient_tracer_otel-0.16.0.jar:/Users/mac/.m2/repository/ch/qos/logback/logback-core/1.4.5/logback-core-1.4.5.jar:/Users/mac/.m2/repository/jakarta/annotation/jakarta.annotation-api/2.1.1/jakarta.annotation-api-2.1.1.jar:/Users/mac/.m2/repository/com/alibaba/cloud/spring-cloud-alibaba-commons/2022.0.0.0-RC1/spring-cloud-alibaba-commons-2022.0.0.0-RC1.jar:/Users/mac/.m2/repository/org/apache/httpcomponents/httpcore-nio/4.4.16/httpcore-nio-4.4.16.jar:/Users/mac/.m2/repository/org/springframework/boot/spring-boot-starter-logging/3.0.4/spring-boot-starter-logging-3.0.4.jar:/Users/mac/.m2/repository/org/springframework/security/spring-security-crypto/6.0.2/spring-security-crypto-6.0.2.jar:/Users/mac/.m2/repository/org/springframework/spring-webmvc/6.0.6/spring-webmvc-6.0.6.jar:/Users/mac/.m2/repository/com/alibaba/cloud/spring-cloud-starter-alibaba-nacos-config/2022.0.0.0-RC1/spring-cloud-starter-alibaba-nacos-config-2022.0.0.0-RC1.jar:/Users/mac/.m2/repository/org/springframework/spring-context/6.0.6/spring-context-6.0.6.jar:/Users/mac/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.14.2/jackson-datatype-jdk8-2.14.2.jar:/Users/mac/.m2/repository/com/alibaba/spring/spring-context-support/1.0.11/spring-context-support-1.0.11.jar:/Users/mac/.m2/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.14.2/jackson-module-parameter-names-2.14.2.jar:/Users/mac/.m2/repository/org/springframework/spring-web/6.0.6/spring-web-6.0.6.jar:/Users/mac/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.19.0/log4j-to-slf4j-2.19.0.jar:/Users/mac/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/3.0.4/spring-boot-starter-tomcat-3.0.4.jar:/Users/mac/.m2/repository/org/apache/httpcomponents/httpclient/4.5.14/httpclient-4.5.14.jar:/Users/mac/.m2/repository/org/springframework/boot/spring-boot-starter/3.0.4/spring-boot-starter-3.0.4.jar:/Users/mac/.m2/repository/org/yaml/snakeyaml/1.33/snakeyaml-1.33.jar:/Users/mac/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.14.2/jackson-core-2.14.2.jar:/Users/mac/.m2/repository/org/apache/httpcomponents/httpasyncclient/4.1.5/httpasyncclient-4.1.5.jar:/Users/mac/.m2/repository/org/springframework/spring-core/6.0.6/spring-core-6.0.6.jar --no-fallback -H:Path=/Users/mac/Desktop/demo/target -H:Name=demo -H:ConfigurationFileDirectories=/Users/mac/Desktop/demo/target/graalvm-reachability-metadata/b365fc76a8aeac7ac69a19eb164b374e98ce11ca/ch.qos.logback/logback-classic/1.4.1,/Users/mac/Desktop/demo/target/graalvm-reachability-metadata/b365fc76a8aeac7ac69a19eb164b374e98ce11ca/org.apache.tomcat.embed/tomcat-embed-core/10.0.20
GraalVM Native Image: Generating 'demo' (executable)...
Warning: Could not resolve io.netty.channel.socket.nio.NioServerSocketChannel for reflection configuration. Reason: java.lang.ClassNotFoundException: io.netty.channel.socket.nio.NioServerSocketChannel. [1/7] Initializing... (12.5s @ 0.31GB) Version info: 'GraalVM 22.3.0 Java 17 CE' Java version info: '17.0.5+8-jvmci-22.3-b08' C compiler: cc (apple, x86_64, 14.0.0) Garbage collector: Serial GC 1 user-specific feature(s)
org.springframework.aot.nativex.feature.PreComputeFieldFeature Field org.apache.commons.logging.LogAdapter#log4jSpiPresent set to true at build time Field org.apache.commons.logging.LogAdapter#log4jSlf4jProviderPresent set to true at build time Field org.apache.commons.logging.LogAdapter#slf4jSpiPresent set to true at build time Field org.apache.commons.logging.LogAdapter#slf4jApiPresent set to true at build time Field org.springframework.core.NativeDetector#imageCode set to true at build time Field org.springframework.core.KotlinDetector#kotlinPresent set to false at build time Field org.springframework.core.KotlinDetector#kotlinReflectPresent set to false at build time Field org.springframework.format.support.DefaultFormattingConversionService#jsr354Present set to false at build time Field org.springframework.cglib.core.AbstractClassGenerator#imageCode set to true at build time Field org.springframework.cloud.bootstrap.TextEncryptorConfigBootstrapper#RSA_IS_PRESENT set to false at build time Field org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport#romePresent set to false at build time Field org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport#jaxb2Present set to false at build time Field org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport#jackson2Present set to true at build time Field org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport#jackson2XmlPresent set to false at build time Field org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport#jackson2SmilePresent set to false at build time Field org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport#jackson2CborPresent set to false at build time Field org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport#gsonPresent set to false at build time Field org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport#jsonbPresent set to false at build time Field org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport#kotlinSerializationCborPresent set to false at build time Field org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport#kotlinSerializationJsonPresent set to false at build time Field org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport#kotlinSerializationProtobufPresent set to false at build time Field org.springframework.boot.logging.log4j2.Log4J2LoggingSystem$Factory#PRESENT set to false at build time Field org.springframework.boot.logging.java.JavaLoggingSystem$Factory#PRESENT set to true at build time Field org.springframework.boot.logging.logback.LogbackLoggingSystem$Factory#PRESENT set to true at build time Field org.springframework.http.converter.json.Jackson2ObjectMapperBuilder#jackson2XmlPresent set to false at build time Field org.springframework.web.servlet.view.InternalResourceViewResolver#jstlPresent set to false at build time Field org.springframework.context.event.ApplicationListenerMethodAdapter#reactiveStreamsPresent set to false at build time Field org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter#jaxb2Present set to false at build time Field org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter#jackson2Present set to true at build time Field org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter#jackson2XmlPresent set to false at build time Field org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter#jackson2SmilePresent set to false at build time Field org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter#gsonPresent set to false at build time Field org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter#jsonbPresent set to false at build time Field org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter#kotlinSerializationCborPresent set to false at build time Field org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter#kotlinSerializationJsonPresent set to false at build time Field org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter#kotlinSerializationProtobufPresent set to false at build time Field org.springframework.web.context.support.StandardServletEnvironment#jndiPresent set to true at build time Field org.springframework.web.context.support.WebApplicationContextUtils#jsfPresent set to false at build time Field org.springframework.web.context.request.RequestContextHolder#jsfPresent set to false at build time Field org.springframework.core.ReactiveAdapterRegistry#reactorPresent set to false at build time Field org.springframework.core.ReactiveAdapterRegistry#rxjava3Present set to false at build time Field org.springframework.core.ReactiveAdapterRegistry#kotlinCoroutinesPresent set to false at build time Field org.springframework.core.ReactiveAdapterRegistry#mutinyPresent set to false at build time SLF4J: No SLF4J providers were found. SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details. Field org.springframework.web.servlet.mvc.method.annotation.ReactiveTypeHandler#isContextPropagationPresent set to false at build time Field org.springframework.boot.autoconfigure.web.format.WebConversionService#JSR_354_PRESENT set to false at build time Field org.springframework.web.client.RestTemplate#romePresent set to false at build time Field org.springframework.web.client.RestTemplate#jaxb2Present set to false at build time Field org.springframework.web.client.RestTemplate#jackson2Present set to true at build time Field org.springframework.web.client.RestTemplate#jackson2XmlPresent set to false at build time Field org.springframework.web.client.RestTemplate#jackson2SmilePresent set to false at build time Field org.springframework.web.client.RestTemplate#jackson2CborPresent set to false at build time Field org.springframework.web.client.RestTemplate#gsonPresent set to false at build time Field org.springframework.web.client.RestTemplate#jsonbPresent set to false at build time Field org.springframework.web.client.RestTemplate#kotlinSerializationCborPresent set to false at build time Field org.springframework.web.client.RestTemplate#kotlinSerializationJsonPresent set to false at build time Field org.springframework.web.client.RestTemplate#kotlinSerializationProtobufPresent set to false at build time Field org.springframework.boot.logging.logback.LogbackLoggingSystemProperties#JBOSS_LOGGING_PRESENT set to false at build time Field org.springframework.web.servlet.support.RequestContext#jstlPresent set to false at build time [2/7] Performing analysis... [****] (81.1s @ 3.82GB) 18,423 (92.76%) of 19,862 classes reachable 31,001 (68.99%) of 44,938 fields reachable 91,732 (61.32%) of 149,598 methods reachable 909 classes, 311 fields, and 4,167 methods registered for reflection 64 classes, 71 fields, and 55 methods registered for JNI access 5 native libraries: -framework CoreServices, -framework Foundation, dl, pthread, z [3/7] Building universe... (7.4s @ 3.72GB) [4/7] Parsing methods... [*] (5.6s @ 2.21GB) [5/7] Inlining methods... [**] (3.0s @ 5.16GB) [6/7] Compiling methods... [****] (61.0s @ 3.59GB) [7/7] Creating image... (12.5s @ 2.65GB) 38.62MB (52.49%) for code area: 59,538 compilation units 34.66MB (47.10%) for image heap: 401,140 objects and 124 resources 308.56KB ( 0.41%) for other data 73.58MB in total
Top 10 packages in code area: Top 10 object types in image heap: 1.64MB sun.security.ssl 8.56MB byte[] for code metadata 1.11MB com.alibaba.nacos.shaded.com.google.protobuf 4.40MB java.lang.Class 1.08MB java.util 3.91MB java.lang.String 837.59KB java.lang.invoke 3.43MB byte[] for java.lang.String 717.97KB com.sun.crypto.provider 3.15MB byte[] for general heap data 540.72KB org.apache.catalina.core 1.55MB com.oracle.svm.core.hub.DynamicHubCompanion 513.67KB java.lang 1.03MB byte[] for embedded resources 499.47KB org.apache.tomcat.util.net 1003.64KB byte[] for reflection metadata 490.32KB java.util.concurrent 766.23KB java.lang.String[] 490.27KB org.apache.coyote.http2 651.05KB c.o.svm.core.hub.DynamicHub$ReflectionMetadata 30.37MB for 763 more packages 5.86MB for 3444 more object types
Produced artifacts: /Users/mac/Desktop/demo/target/demo (executable) /Users/mac/Desktop/demo/target/demo.build_artifacts.txt (txt)
Finished generating 'demo' in 3m 13s. [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 03:31 min [INFO] Finished at: 2023-03-20T16:17:22+08:00 [INFO] ------------------------------------------------------------------------ ➜ demo git:(master) ✗ target/demo java.lang.NullPointerException: inStream parameter is null at java.base@17.0.5/java.util.Objects.requireNonNull(Objects.java:233) at java.base@17.0.5/java.util.Properties.load(Properties.java:407) at com.alibaba.nacos.common.utils.VersionUtils.(VersionUtils.java:45)
at com.alibaba.nacos.client.utils.ParamUtil.(ParamUtil.java:100)
at com.alibaba.nacos.client.config.NacosConfigService.initNamespace(NacosConfigService.java:90)
at com.alibaba.nacos.client.config.NacosConfigService.(NacosConfigService.java:78)
at java.base@17.0.5/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base@17.0.5/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
at com.alibaba.nacos.api.config.ConfigFactory.createConfigService(ConfigFactory.java:43)
at com.alibaba.nacos.api.NacosFactory.createConfigService(NacosFactory.java:44)
at com.alibaba.cloud.nacos.NacosConfigManager.createConfigService(NacosConfigManager.java:55)
at com.alibaba.cloud.nacos.NacosConfigManager.(NacosConfigManager.java:43)
at com.alibaba.cloud.nacos.configdata.NacosConfigDataLocationResolver.registerConfigManager(NacosConfigDataLocationResolver.java:198)
at com.alibaba.cloud.nacos.configdata.NacosConfigDataLocationResolver.resolveProfileSpecific(NacosConfigDataLocationResolver.java:153)
at org.springframework.boot.context.config.ConfigDataLocationResolvers.lambda$resolve$2(ConfigDataLocationResolvers.java:107)
at org.springframework.boot.context.config.ConfigDataLocationResolvers.resolve(ConfigDataLocationResolvers.java:113)
at org.springframework.boot.context.config.ConfigDataLocationResolvers.resolve(ConfigDataLocationResolvers.java:106)
at org.springframework.boot.context.config.ConfigDataLocationResolvers.resolve(ConfigDataLocationResolvers.java:94)
at org.springframework.boot.context.config.ConfigDataImporter.resolve(ConfigDataImporter.java:105)
at org.springframework.boot.context.config.ConfigDataImporter.resolve(ConfigDataImporter.java:97)
at org.springframework.boot.context.config.ConfigDataImporter.resolveAndLoad(ConfigDataImporter.java:85)
at org.springframework.boot.context.config.ConfigDataEnvironmentContributors.withProcessedImports(ConfigDataEnvironmentContributors.java:115)
at org.springframework.boot.context.config.ConfigDataEnvironment.processWithProfiles(ConfigDataEnvironment.java:313)
at org.springframework.boot.context.config.ConfigDataEnvironment.processAndApply(ConfigDataEnvironment.java:234)
at org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor.postProcessEnvironment(ConfigDataEnvironmentPostProcessor.java:96)
at org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor.postProcessEnvironment(ConfigDataEnvironmentPostProcessor.java:89)
at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.onApplicationEnvironmentPreparedEvent(EnvironmentPostProcessorApplicationListener.java:109)
at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.onApplicationEvent(EnvironmentPostProcessorApplicationListener.java:94)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131)
at org.springframework.boot.context.event.EventPublishingRunListener.multicastInitialEvent(EventPublishingRunListener.java:136)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:81)
at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:64)
at java.base@17.0.5/java.lang.Iterable.forEach(Iterable.java:75)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:118)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:112)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:63)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:354)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:305)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1304)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1293)
at com.example.demo.DemoApplication.main(DemoApplication.java:13)
2023-03-20T16:32:04.195+08:00 WARN 42905 --- [ main] c.a.nacos.client.logging.NacosLogging : Load Logback Configuration of Nacos fail, message: org.slf4j.impl.StaticLoggerBinder
. _ _ /\ / '_ () \ \ \ \ ( ( )\ | ' | '| | ' \/ ` | \ \ \ \ \/ _)| |)| | | | | || (| | ) ) ) ) ' |__| .|| ||| |\, | / / / / =========|_|==============|__/=//// :: Spring Boot :: (v3.0.4)
2023-03-20T16:32:04.198+08:00 INFO 42905 --- [ main] com.example.demo.DemoApplication : Starting AOT-processed DemoApplication using Java 17.0.5 with PID 42905 (/Users/mac/Desktop/demo/target/demo started by mac in /Users/mac/Desktop/demo) 2023-03-20T16:32:04.198+08:00 INFO 42905 --- [ main] com.example.demo.DemoApplication : No active profile set, falling back to 1 default profile: "default" 2023-03-20T16:32:04.198+08:00 INFO 42905 --- [ main] c.a.c.n.c.NacosConfigDataLoader : [Nacos Config] Load config[dataId=test-application.yml, group=DEFAULT_GROUP] success 2023-03-20T16:32:04.200+08:00 INFO 42905 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=85187eca-b553-3d7f-bec7-851e0274d50c 2023-03-20T16:32:04.220+08:00 INFO 42905 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http) 2023-03-20T16:32:04.221+08:00 INFO 42905 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2023-03-20T16:32:04.221+08:00 INFO 42905 --- [ main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.5] 2023-03-20T16:32:04.229+08:00 INFO 42905 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2023-03-20T16:32:04.229+08:00 INFO 42905 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 31 ms 2023-03-20T16:32:04.285+08:00 INFO 42905 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path '' 2023-03-20T16:32:04.288+08:00 INFO 42905 --- [ main] com.example.demo.DemoApplication : Started DemoApplication in 0.524 seconds (process running for 0.54) xxxx xxxx 2023-03-20T16:32:04.289+08:00 INFO 42905 --- [ main] c.a.nacos.client.config.impl.CacheData : nacos.cache.data.init.snapshot = true 2023-03-20T16:32:04.289+08:00 INFO 42905 --- [ main] c.a.n.client.config.impl.ClientWorker : [fixed-yst-new-test-mse-a6519070-nacos-ans.mse.aliyuncs.com_8848] [subscribe] test-application.yml+DEFAULT_GROUP+yst-new-test 2023-03-20T16:32:04.289+08:00 INFO 42905 --- [ main] c.a.nacos.client.config.impl.CacheData : [fixed-yst-new-test-mse-a6519070-nacos-ans.mse.aliyuncs.com_8848] [add-listener] ok, tenant=yst-new-test, dataId=test-application.yml, group=DEFAULT_GROUP, cnt=1 2023-03-20T16:32:04.289+08:00 INFO 42905 --- [ main] c.a.c.n.refresh.NacosContextRefresher : [Nacos Config] Listening config: dataId=test-application.yml, group=DEFAULT_GROUP 2023-03-20T16:32:04.393+08:00 ERROR 42905 --- [s.client.Worker] com.alibaba.nacos.common.remote.client : Send request fail, request = ConfigBatchListenRequest{headers={charset=UTF-8, Client-AppName=unknown, Client-RequestToken=a84da4e4ee760d2d808e460896918730, Client-RequestTS=1679301124289, exConfigInfo=true, Spas-AccessKey=LTAI5tLPg7ziZ5D7dsngZCiY, Spas-Signature=ukUr6tGeoo+EyifDRROLK6ahDls=, Timestamp=1679301124289}, requestId='null'}, retryTimes = 0, errorMessage = Client not connected, current status:STARTING 2023-03-20T16:32:04.498+08:00 ERROR 42905 --- [s.client.Worker] com.alibaba.nacos.common.remote.client : Send request fail, request = ConfigBatchListenRequest{headers={charset=UTF-8, Client-AppName=unknown, Client-RequestToken=a84da4e4ee760d2d808e460896918730, Client-RequestTS=1679301124289, exConfigInfo=true, Spas-AccessKey=LTAI5tLPg7ziZ5D7dsngZCiY, Spas-Signature=ukUr6tGeoo+EyifDRROLK6ahDls=, Timestamp=1679301124289}, requestId='null'}, retryTimes = 1, errorMessage = Client not connected, current status:STARTING 2023-03-20T16:32:04.601+08:00 ERROR 42905 --- [s.client.Worker] com.alibaba.nacos.common.remote.client : Send request fail, request = ConfigBatchListenRequest{headers={charset=UTF-8, Client-AppName=unknown, Client-RequestToken=a84da4e4ee760d2d808e460896918730, Client-RequestTS=1679301124289, exConfigInfo=true, Spas-AccessKey=LTAI5tLPg7ziZ5D7dsngZCiY, Spas-Signature=ukUr6tGeoo+EyifDRROLK6ahDls=, Timestamp=1679301124289}, requestId='null'}, retryTimes = 2, errorMessage = Client not connected, current status:STARTING 2023-03-20T16:32:04.601+08:00 ERROR 42905 --- [s.client.Worker] c.a.n.client.config.impl.ClientWorker : Async listen config change error
com.alibaba.nacos.api.exception.NacosException: Client not connected, current status:STARTING at com.alibaba.nacos.common.remote.client.RpcClient.request(RpcClient.java:639) ~[demo:na] at com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient.requestProxy(ClientWorker.java:1011) ~[na:na] at com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient.requestProxy(ClientWorker.java:992) ~[na:na] at com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient.executeConfigListen(ClientWorker.java:785) ~[na:na] at com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient.lambda$startInternal$2(ClientWorker.java:703) ~[na:na] at java.base@17.0.5/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[na:na] at java.base@17.0.5/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[demo:na] at java.base@17.0.5/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[na:na] at java.base@17.0.5/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[demo:na] at java.base@17.0.5/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na] at java.base@17.0.5/java.lang.Thread.run(Thread.java:833) ~[demo:na] at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:775) ~[demo:na] at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:203) ~[na:na]
Simplest demo https://github.com/javawcy/nacos-bug-demo
To Reproduce Steps to reproduce the behavior: 1.replace nacos config in application.yml 2.add a string config named xxx in nacos,dataId=xxx.yml 3.use mvn wrapper & native compile then you will see this error
Additional context Add any other context about the problem here. MacOS,GraalVM CE 22.3.0 (build 17.0.5+8-jvmci-22.3-b08),springboot-3.0.4,spring-cloud-alibaba-2022.0.0.0-RC1,spring-cloud-2022.0.1,mse-nacos-config-server-2.1.0.2 on aliyun