You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "Mr-hu7050 (via GitHub)" <gi...@apache.org> on 2023/03/10 12:27:41 UTC

[GitHub] [dubbo] Mr-hu7050 opened a new issue, #11785: 3.2.0.beta5版本使用外置Tomcat启动时,报Unable to get value for property model-environment

Mr-hu7050 opened a new issue, #11785:
URL: https://github.com/apache/dubbo/issues/11785

   ### Environment
   
   * Dubbo version: 3.2.0.beta5
   * Operating System version: macOS
   * Java version: 17.0.6
   * Tomcat version: 10.1.7
   * SpringBoot version: 3.0.4
   
   ### Steps to reproduce this issue
   Caused by: org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name 'dubbo-org.apache.dubbo.spring.boot.autoconfigure.DubboConfigurationProperties': Could not bind properties to 'DubboConfigurationProperties' : prefix=dubbo, ignoreInvalidFields=false, ignoreUnknownFields=true
   		at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.bind(ConfigurationPropertiesBindingPostProcessor.java:99)
   		at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:79)
   		at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:420)
   		at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1754)
   		at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:599)
   		at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521)
   		at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326)
   		at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
   		at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324)
   		at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
   		at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:961)
   		at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:917)
   		at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:584)
   		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.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:174)
   		at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:154)
   		at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:96)
   		at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:171)
   		at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4875)
   		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
   		... 43 more
   	Caused by: org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'dubbo.consumer.exported-urls[0].or-default-framework-model.model-environment' to org.apache.dubbo.common.config.Environment
   		at org.springframework.boot.context.properties.bind.Binder.handleBindError(Binder.java:387)
   		at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:347)
   		at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$4(Binder.java:472)
   		at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:98)
   		at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:86)
   		at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:62)
   		at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$5(Binder.java:476)
   		at org.springframework.boot.context.properties.bind.Binder$Context.withIncreasedDepth(Binder.java:590)
   		at org.springframework.boot.context.properties.bind.Binder$Context.withDataObject(Binder.java:576)
   		at org.springframework.boot.context.properties.bind.Binder.bindDataObject(Binder.java:474)
   		at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:414)
   		at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:343)
   		at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$4(Binder.java:472)
   		at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:98)
   		at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:86)
   		at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:62)
   		at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$5(Binder.java:476)
   		at org.springframework.boot.context.properties.bind.Binder$Context.withIncreasedDepth(Binder.java:590)
   		at org.springframework.boot.context.properties.bind.Binder$Context.withDataObject(Binder.java:576)
   		at org.springframework.boot.context.properties.bind.Binder.bindDataObject(Binder.java:474)
   		at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:414)
   		at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:343)
   		at org.springframework.boot.context.properties.bind.Binder.lambda$bindAggregate$1(Binder.java:435)
   		at org.springframework.boot.context.properties.bind.Binder$Context.withSource(Binder.java:566)
   		at org.springframework.boot.context.properties.bind.Binder.lambda$bindAggregate$2(Binder.java:436)
   		at org.springframework.boot.context.properties.bind.IndexedElementsBinder.bindIndexed(IndexedElementsBinder.java:106)
   		at org.springframework.boot.context.properties.bind.IndexedElementsBinder.bindIndexed(IndexedElementsBinder.java:86)
   		at org.springframework.boot.context.properties.bind.IndexedElementsBinder.bindIndexed(IndexedElementsBinder.java:70)
   		at org.springframework.boot.context.properties.bind.CollectionBinder.bindAggregate(CollectionBinder.java:49)
   		at org.springframework.boot.context.properties.bind.AggregateBinder.bind(AggregateBinder.java:56)
   		at org.springframework.boot.context.properties.bind.Binder.lambda$bindAggregate$3(Binder.java:438)
   		at org.springframework.boot.context.properties.bind.Binder$Context.withIncreasedDepth(Binder.java:590)
   		at org.springframework.boot.context.properties.bind.Binder.bindAggregate(Binder.java:438)
   		at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:399)
   		at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:343)
   		at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$4(Binder.java:472)
   		at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:98)
   		at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:86)
   		at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:62)
   		at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$5(Binder.java:476)
   		at org.springframework.boot.context.properties.bind.Binder$Context.withIncreasedDepth(Binder.java:590)
   		at org.springframework.boot.context.properties.bind.Binder$Context.withDataObject(Binder.java:576)
   		at org.springframework.boot.context.properties.bind.Binder.bindDataObject(Binder.java:474)
   		at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:414)
   		at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:343)
   		at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$4(Binder.java:472)
   		at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:98)
   		at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:86)
   		at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:62)
   		at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$5(Binder.java:476)
   		at org.springframework.boot.context.properties.bind.Binder$Context.withIncreasedDepth(Binder.java:590)
   		at org.springframework.boot.context.properties.bind.Binder$Context.withDataObject(Binder.java:576)
   		at org.springframework.boot.context.properties.bind.Binder.bindDataObject(Binder.java:474)
   		at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:414)
   		at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:343)
   		at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:332)
   		at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:262)
   		at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:249)
   		at org.springframework.boot.context.properties.ConfigurationPropertiesBinder.bind(ConfigurationPropertiesBinder.java:93)
   		at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.bind(ConfigurationPropertiesBindingPostProcessor.java:96)
   		... 65 more
   	Caused by: java.lang.IllegalStateException: Unable to get value for property model-environment
   		at org.springframework.boot.context.properties.bind.JavaBeanBinder$BeanProperty.lambda$getValue$0(JavaBeanBinder.java:360)
   		at org.springframework.boot.context.properties.bind.DefaultBindConstructorProvider.getBindConstructor(DefaultBindConstructorProvider.java:48)
   		at org.springframework.boot.context.properties.bind.ValueObjectBinder$ValueObject.get(ValueObjectBinder.java:190)
   		at org.springframework.boot.context.properties.bind.ValueObjectBinder.bind(ValueObjectBinder.java:67)
   		at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$5(Binder.java:476)
   		at org.springframework.boot.context.properties.bind.Binder$Context.withIncreasedDepth(Binder.java:590)
   		at org.springframework.boot.context.properties.bind.Binder$Context.withDataObject(Binder.java:576)
   		at org.springframework.boot.context.properties.bind.Binder.bindDataObject(Binder.java:474)
   		at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:414)
   		at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:343)
   		... 123 more
   	Caused by: java.lang.reflect.InvocationTargetException
   		at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   		at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
   		at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   		at java.base/java.lang.reflect.Method.invoke(Method.java:568)
   		at org.springframework.boot.context.properties.bind.JavaBeanBinder$BeanProperty.lambda$getValue$0(JavaBeanBinder.java:357)
   		... 132 more
   	Caused by: java.lang.UnsupportedOperationException: Environment is inaccessible for FrameworkModel
   		at org.apache.dubbo.rpc.model.FrameworkModel.getModelEnvironment(FrameworkModel.java:346)
   		... 137 more


-- 
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


[GitHub] [dubbo] iswift commented on issue #11785: 3.2.0.beta5版本使用外置Tomcat启动时,报Unable to get value for property model-environment

Posted by "iswift (via GitHub)" <gi...@apache.org>.
iswift commented on issue #11785:
URL: https://github.com/apache/dubbo/issues/11785#issuecomment-1482522246

   代码已更新,可以打包了
   
   ![image](https://user-images.githubusercontent.com/3256088/227485179-30ce74a6-0413-4eae-b52f-ab68bff8337f.png)
   


-- 
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


[GitHub] [dubbo] AlbumenJ closed issue #11785: 3.2.0.beta5版本使用外置Tomcat启动时,报Unable to get value for property model-environment

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ closed issue #11785: 3.2.0.beta5版本使用外置Tomcat启动时,报Unable to get value for property model-environment
URL: https://github.com/apache/dubbo/issues/11785


-- 
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


[GitHub] [dubbo] luger1990 commented on issue #11785: 3.2.0.beta5版本使用外置Tomcat启动时,报Unable to get value for property model-environment

Posted by "luger1990 (via GitHub)" <gi...@apache.org>.
luger1990 commented on issue #11785:
URL: https://github.com/apache/dubbo/issues/11785#issuecomment-1471470067

   mark


-- 
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


[GitHub] [dubbo] AlbumenJ commented on issue #11785: 3.2.0.beta5版本使用外置Tomcat启动时,报Unable to get value for property model-environment

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #11785:
URL: https://github.com/apache/dubbo/issues/11785#issuecomment-1466035062

   Would you please submit a demo?
   It seems that spring has override dubbo's method.


-- 
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


[GitHub] [dubbo] Mr-hu7050 commented on issue #11785: 3.2.0.beta5版本使用外置Tomcat启动时,报Unable to get value for property model-environment

Posted by "Mr-hu7050 (via GitHub)" <gi...@apache.org>.
Mr-hu7050 commented on issue #11785:
URL: https://github.com/apache/dubbo/issues/11785#issuecomment-1467448734

   https://github.com/iswift/dubbo-demo
   代码已上传到github上


-- 
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


[GitHub] [dubbo] AlbumenJ commented on issue #11785: 3.2.0.beta5版本使用外置Tomcat启动时,报Unable to get value for property model-environment

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #11785:
URL: https://github.com/apache/dubbo/issues/11785#issuecomment-1481046718

   ![image](https://user-images.githubusercontent.com/9292748/227194449-28707d57-59d0-4340-b4b5-3bd4342fb920.png)
   给的 Demo 打包不了


-- 
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


[GitHub] [dubbo] AlbumenJ commented on issue #11785: 3.2.0.beta5版本使用外置Tomcat启动时,报Unable to get value for property model-environment

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #11785:
URL: https://github.com/apache/dubbo/issues/11785#issuecomment-1473187171

   ![image](https://user-images.githubusercontent.com/9292748/225825137-b503a81a-e71e-4dff-85d3-b25cfe550e36.png)
   
   这个我这边直接启动时正常的,你的部署方式可以给一下吗


-- 
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


[GitHub] [dubbo] Mr-hu7050 commented on issue #11785: 3.2.0.beta5版本使用外置Tomcat启动时,报Unable to get value for property model-environment

Posted by "Mr-hu7050 (via GitHub)" <gi...@apache.org>.
Mr-hu7050 commented on issue #11785:
URL: https://github.com/apache/dubbo/issues/11785#issuecomment-1475480419

   打成war包,部署在外置的Tomcat种,不要用Application类启动。


-- 
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


[GitHub] [dubbo] AlbumenJ commented on issue #11785: 3.2.0.beta5版本使用外置Tomcat启动时,报Unable to get value for property model-environment

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #11785:
URL: https://github.com/apache/dubbo/issues/11785#issuecomment-1486301324

   ![image](https://user-images.githubusercontent.com/9292748/228150318-57a44065-c4a0-4f9b-9b98-a031df466835.png)
   
   看了下在 Tomcat 部署状态下会有一个 jndi 数据源,而这个数据源无法判断 dubbo 的配置是否存在,进而不算拆开 Dubbo 的配置,把一些内部的 Transient 的属性也加载了
   
   ![image](https://user-images.githubusercontent.com/9292748/228150661-3c3ed580-477d-498c-8f3e-bf001f975a28.png)
   


-- 
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