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 and found no similar issues.
Apache Dubbo Component
Java SDK (apache/dubbo)
Dubbo Version
<dubbo.version>3.3.1</dubbo.version>
Steps to reproduce this issue
- build with native
2.run application:
2025-09-02 09:35:43,006 ERROR [main] o.s.boot.SpringApplication [SpringApplication.java : 822] Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dubboConfigBeanInitializer': Initialization dubbo config beans failed
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1770)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:598)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:520)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:331)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:252)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:329)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:201)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:973)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:950)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:614)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:732)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:434)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:310)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:150)
at com.hcll.sail.MessageProviderApplication.main(MessageProviderApplication.java:109)
Caused by: org.springframework.beans.FatalBeanException: Initialization dubbo config beans failed
at org.apache.dubbo.config.spring.context.DubboConfigBeanInitializer.init(DubboConfigBeanInitializer.java:89)
at org.apache.dubbo.config.spring.context.DubboConfigBeanInitializer.afterPropertiesSet(DubboConfigBeanInitializer.java:77)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1817)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1766)
... 15 common frames omitted
Caused by: java.lang.NullPointerException: null
at org.apache.dubbo.config.spring.reference.ReferenceBeanManager.initReferenceBean(ReferenceBeanManager.java:208)
at org.apache.dubbo.config.spring.reference.ReferenceBeanManager.prepareReferenceBeans(ReferenceBeanManager.java:165)
at org.apache.dubbo.config.spring.context.DubboConfigBeanInitializer.init(DubboConfigBeanInitializer.java:87)
... 18 common frames omitted
2025-09-02 09:36:51,105 INFO [background-preinit] o.h.validator.internal.util.Version [Version.java : 21] HV000001: Hibernate Validator 8.0.1.Final
2025-09-02 09:36:51,281 INFO [main] o.a.d.s.b.c.e.WelcomeLogoApplicationListener [Log4j2Logger.java : 71] [DUBBO]
What you expected to happen
NullPointerException was found.I expect it normally
Anything else
I should add this code to fix it:
//fix bug,在native下moduleModel为null
if (moduleModel == null) {
moduleModel = DubboBeanUtils.getModuleModel(applicationContext);
}
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