You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "noear (via GitHub)" <gi...@apache.org> on 2025/09/07 01:07:25 UTC
[I] [Bug] (非 spring 环境)java 项目使用 dubbo-native 出现 spring 缺类异常 [dubbo]
noear opened a new issue, #15674:
URL: https://github.com/apache/dubbo/issues/15674
### Pre-check
- [x] I am sure that all the content I provide is in English.
### Search before asking
- [x] I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar issues.
### Apache Dubbo Component
Java SDK (apache/dubbo)
### Dubbo Version
dubbo 3.3.5,java 17,mac 15.6
### Steps to reproduce this issue
在非 spring 环境,项目在 jvm 运行时下是正常的。。。使用 dubbo-native + dubbo-maven-plugin (原生编译时)出现以下异常。
* 异常
```
Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContext
at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3373)
at java.base/java.lang.Class.getConstructors(Class.java:2060)
at org.apache.dubbo.aot.generate.ReflectConfigMetadataRepository.buildTypeDescriberWithConstructor(ReflectConfigMetadataRepository.java:74)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
at org.apache.dubbo.aot.generate.ReflectConfigMetadataRepository.registerSpiExtensionType(ReflectConfigMetadataRepository.java:45)
at org.apache.dubbo.aot.generate.AotProcessor.main(AotProcessor.java:62)
Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContext
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
... 14 more
```
* 截图
<img width="2038" height="1232" alt="Image" src="https://github.com/user-attachments/assets/cf730c0f-cf54-405f-a97a-8365523064cc" />
### What you expected to happen
希望 dubbo-native java 原生编译,不要硬性依赖 spring 相关接口。。。希望去除依赖,或者通过适配
### Anything else
_No response_
### Are you willing to submit a pull request to fix on your own?
- [ ] Yes I am willing to submit a pull request on my own!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug] ClassNotFoundException was thrown when compile with dubbo-native and dubbo-maven-plugin [dubbo]
Posted by "zrlw (via GitHub)" <gi...@apache.org>.
zrlw closed issue #15674: [Bug] ClassNotFoundException was thrown when compile with dubbo-native and dubbo-maven-plugin
URL: https://github.com/apache/dubbo/issues/15674
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug] (非 spring 环境)java 项目使用 dubbo-native 出现 spring 缺类异常 [dubbo]
Posted by "zrlw (via GitHub)" <gi...@apache.org>.
zrlw commented on issue #15674:
URL: https://github.com/apache/dubbo/issues/15674#issuecomment-3264398916
refer to https://blog.csdn.net/alisystemsoftware/article/details/131624000
maybe the API mode meet your requirement. BTW, ```dubbo-samples-native-image``` was moved to ```2-advanced```.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug] ClassNotFoundException was thrown when compile with dubbo-native and dubbo-maven-plugin [dubbo]
Posted by "zrlw (via GitHub)" <gi...@apache.org>.
zrlw commented on issue #15674:
URL: https://github.com/apache/dubbo/issues/15674#issuecomment-3264455658
> 是的,同样的问题。不使用spring,单纯手动引入dubbo的场景下,直接运行是没有问题的,但是一旦执行native编译就会出现提示spring类缺失,我认为dubbo-native不应该强引用spring的相关类。或者换句话是,it should be a standalone component,for normal java project
could you provide a pr to fix it?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug] ClassNotFoundException was thrown when compile with dubbo-native and dubbo-maven-plugin [dubbo]
Posted by "noear (via GitHub)" <gi...@apache.org>.
noear commented on issue #15674:
URL: https://github.com/apache/dubbo/issues/15674#issuecomment-3268645656
@zrlw
示例项目用的是:dubbo-spring-boot-starter,所以肯定不会缺 spring 相关的类。。。对“非 spring”项目的这个异常,没啥参考意义。
<img width="1992" height="1244" alt="Image" src="https://github.com/user-attachments/assets/e9acb853-a564-4416-9c54-a05294b78828" />
---
你们可以提供一个纯 java main + dubbo 运行的原生编译示例。这样就有参考意义了。。。而且 dubbo3 本意也是去 spring 的大重构。。。也是需要这种示例做验证(是否去 spring 干净了?)。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug] ClassNotFoundException was thrown when compile with dubbo-native and dubbo-maven-plugin [dubbo]
Posted by "noear (via GitHub)" <gi...@apache.org>.
noear commented on issue #15674:
URL: https://github.com/apache/dubbo/issues/15674#issuecomment-3268843090
问题还没解决呢。怎么就关啦?
//ps: 我不会英文啊。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug] ClassNotFoundException was thrown when compile with dubbo-native and dubbo-maven-plugin [dubbo]
Posted by "zrlw (via GitHub)" <gi...@apache.org>.
zrlw commented on issue #15674:
URL: https://github.com/apache/dubbo/issues/15674#issuecomment-3268625146
```
org.apache.dubbo:dubbo:jar:3.3.5:compile
```
you should not depend on it directly, you'd better refer to ```dubbo-samples-native-image``` of dubbo-samples to depend each dubbo sub modules which you need.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug] ClassNotFoundException was thrown when compile with dubbo-native and dubbo-maven-plugin [dubbo]
Posted by "zrlw (via GitHub)" <gi...@apache.org>.
zrlw commented on issue #15674:
URL: https://github.com/apache/dubbo/issues/15674#issuecomment-3268584795
i could not determine the cause as you example project lacks of parent pom.
```dubbo-native``` does not depend on any spring components, but i found some components or plugins in pom.xml of ```solon-parent``` actually depends on spring context, you'd better run ```mvn dependency:tree``` and check those solon plugin codes to ensure that you project doesn't depend on spring indirectly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug] ClassNotFoundException was thrown when compile with dubbo-native and dubbo-maven-plugin [dubbo]
Posted by "noear (via GitHub)" <gi...@apache.org>.
noear commented on issue #15674:
URL: https://github.com/apache/dubbo/issues/15674#issuecomment-3264516443
晚上,我提交一个能复现问题的示例项目。以及复现操作步骤
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug] ClassNotFoundException was thrown when compile with dubbo-native and dubbo-maven-plugin [dubbo]
Posted by "noear (via GitHub)" <gi...@apache.org>.
noear commented on issue #15674:
URL: https://github.com/apache/dubbo/issues/15674#issuecomment-3268616332
从现有异常看,有 AotProcessor 和 ReflectConfigMetadataRepository 字样。。。推测:是在 aot 运行时,收集类元数据时,被扫描进来了。
之前有类似的经验:在试验 mybatis-plus 原生编译时,明明没有用到过 kotlin 的类,但是原生编译时出错了。(其实在它的基础接口的方法上,有相关的参数。在需要查找哪些需要元数据注册的类时,就被扫进去了)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug] ClassNotFoundException was thrown when compile with dubbo-native and dubbo-maven-plugin [dubbo]
Posted by "zrlw (via GitHub)" <gi...@apache.org>.
zrlw commented on issue #15674:
URL: https://github.com/apache/dubbo/issues/15674#issuecomment-3268805830
it is just a reference that how to add dubbo sub modules to build dubbo native image, you should add the minimum modules that you need and does not copy those spring modules.
BTW, we require all discussion content should be written in english, you should admire this requirement.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug] ClassNotFoundException was thrown when compile with dubbo-native and dubbo-maven-plugin [dubbo]
Posted by "noear (via GitHub)" <gi...@apache.org>.
noear commented on issue #15674:
URL: https://github.com/apache/dubbo/issues/15674#issuecomment-3268605443
那个包是通过 dependencyManagement 管理的,应该没有关系的吧。。。现在也已经移除了。
另外,示例项目运行 `mvn dependency:tree` 的效果(没有 spring 相关的依赖)
```
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------< com.dudiao.solon:solon-native-example >----------------
[INFO] Building solon-native-example 1.0
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ solon-native-example ---
[INFO] com.dudiao.solon:solon-native-example:jar:1.0
[INFO] +- org.noear:solon-web:jar:3.5.2-SNAPSHOT:compile
[INFO] | +- org.noear:solon-lib:jar:3.5.2-SNAPSHOT:compile
[INFO] | | +- org.noear:solon-mvc:jar:3.5.2-SNAPSHOT:compile
[INFO] | | +- org.noear:solon-cache:jar:3.5.2-SNAPSHOT:compile
[INFO] | | \- org.noear:solon-config-plus:jar:3.5.2-SNAPSHOT:compile
[INFO] | +- org.noear:solon-server-smarthttp:jar:3.5.2-SNAPSHOT:compile
[INFO] | | +- org.noear:solon-server:jar:3.5.2-SNAPSHOT:compile
[INFO] | | +- org.noear:solon-net:jar:3.5.2-SNAPSHOT:compile
[INFO] | | +- org.noear:smart-http-server:jar:2.5.12:compile
[INFO] | | | \- org.noear:smart-http-common:jar:2.5.12:compile
[INFO] | | \- io.github.smartboot.socket:aio-pro:jar:1.5.55:compile
[INFO] | | \- io.github.smartboot.socket:aio-core:jar:1.5.55:compile
[INFO] | +- org.noear:solon-serialization-snack3:jar:3.5.2-SNAPSHOT:compile
[INFO] | | \- org.noear:solon-serialization:jar:3.5.2-SNAPSHOT:compile
[INFO] | +- org.noear:solon-sessionstate-local:jar:3.5.2-SNAPSHOT:compile
[INFO] | +- org.noear:solon-web-staticfiles:jar:3.5.2-SNAPSHOT:compile
[INFO] | +- org.noear:solon-web-cors:jar:3.5.2-SNAPSHOT:compile
[INFO] | \- org.noear:solon-security-validation:jar:3.5.2-SNAPSHOT:compile
[INFO] +- org.noear:solon-view-freemarker:jar:3.5.2-SNAPSHOT:compile
[INFO] | +- org.noear:solon-view:jar:3.5.2-SNAPSHOT:compile
[INFO] | \- org.freemarker:freemarker:jar:2.3.34:compile
[INFO] +- org.noear:solon-flow:jar:3.5.1:compile
[INFO] | +- org.noear:solon:jar:3.5.2-SNAPSHOT:compile
[INFO] | +- org.noear:solon-config-yaml:jar:3.5.2-SNAPSHOT:compile
[INFO] | | \- org.yaml:snakeyaml:jar:2.4:compile
[INFO] | +- org.noear:snack3:jar:3.2.139:compile
[INFO] | +- org.slf4j:slf4j-api:jar:2.0.17:compile
[INFO] | +- org.noear:dami:jar:1.0.6:compile
[INFO] | \- org.noear:liquor-eval:jar:1.6.2:compile
[INFO] | \- org.noear:liquor:jar:1.6.2:compile
[INFO] +- org.noear:solon-logging-logback:jar:3.5.2-SNAPSHOT:compile
[INFO] | +- org.noear:solon-logging:jar:3.5.2-SNAPSHOT:compile
[INFO] | +- ch.qos.logback:logback-classic:jar:1.3.15:compile
[INFO] | | \- ch.qos.logback:logback-core:jar:1.3.15:compile
[INFO] | \- org.fusesource.jansi:jansi:jar:2.4.1:compile
[INFO] +- org.noear:solon-scheduling-quartz:jar:3.5.2-SNAPSHOT:compile
[INFO] | +- org.noear:solon-scheduling:jar:3.5.2-SNAPSHOT:compile
[INFO] | \- org.quartz-scheduler:quartz:jar:2.3.2:compile
[INFO] | +- com.mchange:c3p0:jar:0.9.5.4:compile
[INFO] | \- com.mchange:mchange-commons-java:jar:0.2.15:compile
[INFO] +- org.noear:nami-channel-http:jar:3.5.2-SNAPSHOT:compile
[INFO] | +- org.noear:nami:jar:3.5.2-SNAPSHOT:compile
[INFO] | \- org.noear:solon-net-httputils:jar:3.5.2-SNAPSHOT:compile
[INFO] | \- org.noear:solon-rx:jar:3.5.2-SNAPSHOT:compile
[INFO] | \- org.reactivestreams:reactive-streams:jar:1.0.4:compile
[INFO] +- org.noear:nami-coder-snack3:jar:3.5.2-SNAPSHOT:compile
[INFO] +- org.noear:wood-solon-plugin:jar:3.5.2-SNAPSHOT:compile
[INFO] | +- org.noear:solon-data:jar:3.5.2-SNAPSHOT:compile
[INFO] | | \- org.noear:solon-security-vault:jar:3.5.2-SNAPSHOT:compile
[INFO] | +- org.noear:wood:jar:1.3.25:compile
[INFO] | \- org.noear:wood.plus:jar:1.3.25:compile
[INFO] +- com.baomidou:mybatis-plus-solon-plugin:jar:3.5.12:compile
[INFO] | +- com.baomidou:mybatis-plus-extension:jar:3.5.12:compile
[INFO] | | \- com.baomidou:mybatis-plus-core:jar:3.5.12:compile
[INFO] | | \- com.baomidou:mybatis-plus-annotation:jar:3.5.12:compile
[INFO] | \- org.noear:mybatis-solon-plugin:jar:3.5.2-SNAPSHOT:compile
[INFO] | \- org.mybatis:mybatis:jar:3.5.17:compile
[INFO] +- com.baomidou:mybatis-plus-jsqlparser:jar:3.5.12:compile
[INFO] | +- com.github.jsqlparser:jsqlparser:jar:5.1:compile
[INFO] | \- com.baomidou:mybatis-plus-jsqlparser-common:jar:3.5.12:compile
[INFO] +- org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:2.1.0:provided
[INFO] | +- org.jetbrains.kotlin:kotlin-stdlib:jar:2.1.0:provided
[INFO] | | \- org.jetbrains:annotations:jar:13.0:provided
[INFO] | \- org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:2.1.0:provided
[INFO] +- org.jetbrains.kotlin:kotlin-reflect:jar:2.1.0:provided
[INFO] +- com.zaxxer:HikariCP:jar:4.0.3:compile
[INFO] +- com.h2database:h2:jar:2.2.224:compile
[INFO] +- org.noear:solon-aot:jar:3.5.2-SNAPSHOT:compile
[INFO] | \- com.squareup:javapoet:jar:1.13.0:compile
[INFO] +- cn.hutool:hutool-core:jar:5.8.36:compile
[INFO] +- org.noear:dubbo3-solon-plugin:jar:3.5.2-SNAPSHOT:compile
[INFO] | \- org.apache.dubbo:dubbo:jar:3.3.5:compile
[INFO] | +- org.javassist:javassist:jar:3.30.2-GA:compile
[INFO] | +- io.netty:netty-all:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-buffer:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-codec-base:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-codec:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-codec-dns:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-codec-haproxy:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-codec-compression:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-codec-http:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-codec-http2:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-codec-memcache:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-codec-mqtt:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-codec-redis:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-codec-smtp:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-codec-socks:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-codec-stomp:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-codec-xml:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-codec-protobuf:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-codec-marshalling:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-common:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-handler:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-transport-native-unix-common:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-handler-proxy:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-handler-ssl-ocsp:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-resolver:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-resolver-dns:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-transport:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-transport-rxtx:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-transport-sctp:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-transport-udt:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-transport-classes-epoll:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-transport-classes-kqueue:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-resolver-dns-classes-macos:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-transport-classes-io_uring:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-codec-classes-quic:jar:4.2.1.Final:compile
[INFO] | | +- io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.2.1.Final:runtime
[INFO] | | +- io.netty:netty-transport-native-epoll:jar:linux-aarch_64:4.2.1.Final:runtime
[INFO] | | +- io.netty:netty-transport-native-epoll:jar:linux-riscv64:4.2.1.Final:runtime
[INFO] | | +- io.netty:netty-transport-native-io_uring:jar:linux-x86_64:4.2.1.Final:runtime
[INFO] | | +- io.netty:netty-transport-native-io_uring:jar:linux-aarch_64:4.2.1.Final:runtime
[INFO] | | +- io.netty:netty-transport-native-io_uring:jar:linux-riscv64:4.2.1.Final:runtime
[INFO] | | +- io.netty:netty-transport-native-kqueue:jar:osx-x86_64:4.2.1.Final:runtime
[INFO] | | +- io.netty:netty-transport-native-kqueue:jar:osx-aarch_64:4.2.1.Final:runtime
[INFO] | | +- io.netty:netty-resolver-dns-native-macos:jar:osx-x86_64:4.2.1.Final:runtime
[INFO] | | +- io.netty:netty-resolver-dns-native-macos:jar:osx-aarch_64:4.2.1.Final:runtime
[INFO] | | +- io.netty:netty-codec-native-quic:jar:linux-x86_64:4.2.1.Final:runtime
[INFO] | | +- io.netty:netty-codec-native-quic:jar:linux-aarch_64:4.2.1.Final:runtime
[INFO] | | +- io.netty:netty-codec-native-quic:jar:osx-x86_64:4.2.1.Final:runtime
[INFO] | | +- io.netty:netty-codec-native-quic:jar:osx-aarch_64:4.2.1.Final:runtime
[INFO] | | \- io.netty:netty-codec-native-quic:jar:windows-x86_64:4.2.1.Final:runtime
[INFO] | +- org.apache.dubbo:hessian-lite:jar:4.0.3:compile
[INFO] | +- com.alibaba.fastjson2:fastjson2:jar:2.0.56:compile
[INFO] | \- com.google.protobuf:protobuf-java:jar:3.25.7:compile
[INFO] +- org.apache.dubbo:dubbo-native:jar:3.3.5:compile
[INFO] | \- org.apache.dubbo:dubbo-common:jar:3.3.5:compile
[INFO] | +- commons-io:commons-io:jar:2.19.0:compile
[INFO] | \- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] +- org.projectlombok:lombok:jar:1.18.38:provided
[INFO] \- org.noear:solon-test:jar:3.5.2-SNAPSHOT:test
[INFO] +- org.noear:solon-proxy:jar:3.5.2-SNAPSHOT:compile
[INFO] | \- org.ow2.asm:asm:jar:9.8:compile
[INFO] +- org.mockito:mockito-core:jar:4.11.0:test
[INFO] | +- net.bytebuddy:byte-buddy:jar:1.12.19:test
[INFO] | +- net.bytebuddy:byte-buddy-agent:jar:1.12.19:test
[INFO] | \- org.objenesis:objenesis:jar:3.3:test
[INFO] +- org.junit.jupiter:junit-jupiter:jar:5.11.4:test
[INFO] | +- org.junit.jupiter:junit-jupiter-api:jar:5.11.4:test
[INFO] | | +- org.opentest4j:opentest4j:jar:1.3.0:test
[INFO] | | +- org.junit.platform:junit-platform-commons:jar:1.11.4:test
[INFO] | | \- org.apiguardian:apiguardian-api:jar:1.1.2:test
[INFO] | +- org.junit.jupiter:junit-jupiter-params:jar:5.11.4:test
[INFO] | \- org.junit.jupiter:junit-jupiter-engine:jar:5.11.4:test
[INFO] | \- org.junit.platform:junit-platform-engine:jar:1.11.4:test
[INFO] \- org.mockito:mockito-junit-jupiter:jar:4.11.0:test
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.714 s
[INFO] Finished at: 2025-09-09T09:59:47+08:00
[INFO] ------------------------------------------------------------------------
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug] ClassNotFoundException was thrown when compile with dubbo-native and dubbo-maven-plugin [dubbo]
Posted by "zrlw (via GitHub)" <gi...@apache.org>.
zrlw commented on issue #15674:
URL: https://github.com/apache/dubbo/issues/15674#issuecomment-3268881652
Here is a global opensource community under Apache.org, all the codes and replies are provided by volunteers.
If you want to solve your issue immediately, may be you should search some cosulting firm to help you.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug] ClassNotFoundException was thrown when compile with dubbo-native and dubbo-maven-plugin [dubbo]
Posted by "noear (via GitHub)" <gi...@apache.org>.
noear commented on issue #15674:
URL: https://github.com/apache/dubbo/issues/15674#issuecomment-3268517885
@zrlw
示例已准备好:
https://github.com/solonlab/solon-native-example/tree/dubbo
复现操作说明:
https://github.com/solonlab/solon-native-example/blob/dubbo/DUBBO.md
---
麻烦了
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug] ClassNotFoundException was thrown when compile with dubbo-native and dubbo-maven-plugin [dubbo]
Posted by "zrlw (via GitHub)" <gi...@apache.org>.
zrlw commented on issue #15674:
URL: https://github.com/apache/dubbo/issues/15674#issuecomment-3264502614
> 是的,同样的问题。不使用spring,单纯手动引入dubbo的场景下,直接运行是没有问题的,但是一旦执行native编译就会出现提示spring类缺失,我认为dubbo-native不应该强引用spring的相关类。或者换句话是,it should be a standalone component,for normal java project
if you mean you take ```native:compile``` in your build script such as ``` mvn clean install -P native native:compile -Dmaven.test.skip=true```, it will use ```Springboot3``` integration compile mode.
refer to https://cn.dubbo.apache.org/zh-cn/blog/2023/06/28/%E8%B5%B0%E5%90%91-native-%E5%8C%96springdubbo-aot-%E6%8A%80%E6%9C%AF%E7%A4%BA%E4%BE%8B%E4%B8%8E%E5%8E%9F%E7%90%86%E8%AE%B2%E8%A7%A3/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug] ClassNotFoundException was thrown when compile with dubbo-native and dubbo-maven-plugin [dubbo]
Posted by "noear (via GitHub)" <gi...@apache.org>.
noear commented on issue #15674:
URL: https://github.com/apache/dubbo/issues/15674#issuecomment-3268634509
dubbo-samples-native-image 项目给个地址?
---
我上面提供的示例,已做了简化。。。清理了与 dubbo 无关的内容。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug] (非 spring 环境)java 项目使用 dubbo-native 出现 spring 缺类异常 [dubbo]
Posted by "liucq200518 (via GitHub)" <gi...@apache.org>.
liucq200518 commented on issue #15674:
URL: https://github.com/apache/dubbo/issues/15674#issuecomment-3264412455
是的,同样的问题。不使用spring,单纯手动引入dubbo的场景下,直接运行是没有问题的,但是一旦执行native编译就会出现提示spring类缺失,我认为dubbo-native不应该强引用spring的相关类。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug] ClassNotFoundException was thrown when compile with dubbo-native and dubbo-maven-plugin [dubbo]
Posted by "zrlw (via GitHub)" <gi...@apache.org>.
zrlw commented on issue #15674:
URL: https://github.com/apache/dubbo/issues/15674#issuecomment-3268863396
> 问题还没解决呢。怎么就关啦?
>
> //ps: 我不会英文啊。
there are some tranlation tools such as https://fanyi.baidu.com/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug] (非 spring 环境)java 项目使用 dubbo-native 出现 spring 缺类异常 [dubbo]
Posted by "noear (via GitHub)" <gi...@apache.org>.
noear commented on issue #15674:
URL: https://github.com/apache/dubbo/issues/15674#issuecomment-3264408383
@zrlw 开发时是在 “非 spring 环境”。jvm 模式下是正常的。。。但加个原生编译,就出错了。
内部依赖了 spring 的接口。。。希望(dubbo 原生编译)能在 “非 spring 环境” 运行!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug] (非 spring 环境)java 项目使用 dubbo-native 出现 spring 缺类异常 [dubbo]
Posted by "zrlw (via GitHub)" <gi...@apache.org>.
zrlw commented on issue #15674:
URL: https://github.com/apache/dubbo/issues/15674#issuecomment-3264442247
pls rewrite your issue in english.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug] ClassNotFoundException was thrown when compile with dubbo-native and dubbo-maven-plugin [dubbo]
Posted by "zrlw (via GitHub)" <gi...@apache.org>.
zrlw commented on issue #15674:
URL: https://github.com/apache/dubbo/issues/15674#issuecomment-3264482903
how to write ```Steps to reproduce this issue```
1. provide your sample project which include the minimum codes and pom.xml that could reproduce your issue.
2. provide your mvn build script, such as ```mvn clean install -P native -Dmaven.test.skip=true```, make sure you use API mode to compile your project which does not depend on spring plugin.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org