You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/09/12 02:26:30 UTC

[GitHub] lexburner edited a comment on issue #2478: 2.5.3版本。出现No such extension com.alibaba.dubbo.container.Container by name spring

lexburner edited a comment on issue #2478: 2.5.3版本。出现No such extension com.alibaba.dubbo.container.Container by name spring
URL: https://github.com/apache/incubator-dubbo/issues/2478#issuecomment-420490326
 
 
   step to reproduce @Chanel-Li 's problem:
   1. clone the latest version code dubbo-2.7.0
   2. run `org.apache.dubbo.container.Main` throw above exception.
   
   This is not a bug. `org.apache.dubbo.container.Main` will default loads `spring container`,while the source code of moudle `dubbo-container-api` doesn't add dependency of `dubbo-container-spring`, so `ExtensionLoader.getExtensionLoader(Container.class).getExtension("spring")` will throw exception.
   
   suggestion:
   
   1. You shouldn't run `org.apache.dubbo.container.Main` directly from source code.More details you can browse the doc [service-container.html](https://dubbo.apache.org/zh-cn/docs/user/demos/service-container.html)
   2. If you want to unit test 'spring-container', ask `org.apache.dubbo.container.spring.SpringContainerTest` for help.
   
   The simplest way to deal with your problem.Add below dependency to your project
   ```
           <dependency>
               <groupId>org.apache.dubbo</groupId>
               <artifactId>dubbo-container-spring</artifactId>
               <version>${project.parent.version}</version>
           </dependency>
   ```
   and the try again.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org