You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "xiaoheng1 (GitHub)" <gi...@apache.org> on 2019/11/16 02:56:56 UTC
[GitHub] [dubbo] xiaoheng1 opened issue #5334: ExtensionLoader 无法加载 http 的扩展
我使用的是 dubbo.2.7.5
测试如下:
服务端:
```
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dubbo="http://dubbo.apache.org/schema/dubbo"
xmlns="http://www.springframework.org/schema/beans"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd">
<dubbo:application name="demo-provider2"/>
<dubbo:registry address="zookeeper://127.0.0.1:2181"/>
<dubbo:protocol name="dubbo" port="20881"/>
<dubbo:protocol name="http" port="8080" server="servlet" contextpath="/abc" />
<bean id="demoService" class="org.apache.dubbo.demo.provider.DemoServiceImpl"/>
<dubbo:service interface="org.apache.dubbo.demo.DemoService" ref="demoService" protocol="http"/>
</beans>
```
启动的时候报错如下:
```
[Exception in thread "main" [16/11/19 10:50:51:911 CST] main INFO config.AbstractConfig: [DUBBO] No valid ip found from environment, try to find valid host from DNS., dubbo version: , current host: 192.168.1.103
java.lang.IllegalStateException: No such extension org.apache.dubbo.rpc.Protocol by name http
at org.apache.dubbo.common.extension.ExtensionLoader.noExtensionException(ExtensionLoader.java:520)
at org.apache.dubbo.common.extension.ExtensionLoader.createExtension(ExtensionLoader.java:529)
at org.apache.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:346)
at org.apache.dubbo.config.ServiceConfig.findConfigedPorts(ServiceConfig.java:758)
at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:562)
at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:458)
at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:416)
at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:379)
at org.apache.dubbo.config.spring.ServiceBean.export(ServiceBean.java:336)
at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:114)
at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:60)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:393)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:347)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:883)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
at org.apache.dubbo.demo.provider.Application.main(Application.java:23)
[16/11/19 10:50:51:915 CST] Thread-0 INFO support.ClassPathXmlApplicationContext: Closing org.springframework.context.support.ClassPathXmlApplicationContext@368239c8: startup date [Sat Nov 16 10:50:50 CST 2019]; root of context hierarchy
[16/11/19 10:50:51:918 CST] Thread-0 INFO support.AbstractRegistryFactory: [DUBBO] Close all registries [], dubbo version: , current host: 192.168.1.103]([url](`url`))
```
[ Full content available at: https://github.com/apache/dubbo/issues/5334 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org