Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: xxx

Operating System version: xxx

Java version: xxx

Steps to reproduce this issue

xxx

xxx

xxx

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

What do you expected from the above steps？

Actual Result

What actually happens?

If there is an exception, please attach the exception trace:

Just put your stack trace here!

Issue 2:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.7.3

Operating System version: Windows 10 企业版(10.0.17134)

Java version: 1.8.0_211

Operating System Lang:zh-cn

Steps to reproduce this issue

Do setup things,including run some dubbo servic(use the dubbo-samples),run a zookeeper service.A java app as a container to run the OSGi (hereinafter referred to as OSGiHost,and i use the equinox which eclipse use it too).

Code a bndproject(we can use the eclipse plugin:bndtools to make it, and the bundle we make that we referred to as Bundle ), make OSGiHost can load the Bundle

Code the Bundle with some generic service code can work in a general java project,and put libs referred on the bnd-classpath too(like curator-client-4.0.1.jar,curator-framework-4.0.1.jar,curator-recipes-4.0.1.jar,dubbo-2.7.3.jar,guava-20.0.jar,javassist-3.20.0-GA.jar,zookeeper-3.4.13.jar,while the versions are corresponding to the dubbo-samples's master branch version:754e937b1b0942d7a1dd76705daaf670854801fd on github, for dubbo.jar is not packed in a bundle-style like most Apache jars do,i have no choice)

4.Use the new version Bundle with a dubbo generic service feature,load it in OSGiHost,use the new feature.

1.准备一些DubboService工程（直接使用dubbo-samples工程），起一个zookeeper集群服务，一个OSGi环境的eclipse project，或者直接使用eclipse的Run Configureations中的OSGi Framework来配置一个OSGi环境.下文称这个环境为OSGiHost,我使用的是eclipse的实现:equinox.

2.创建一个bndproject生成bundle(使用eclipse的插件bndtools),生成的bundle下文称 Bundle.确保OSGiHost能够加载Bundle

3.往bundle工程中加入一些dubbo泛化调用代码，这些代码已经在普通的java 工程中调用通过，并且将依赖的jar包置于Bundle-ClassPath中（包有curator-client-4.0.1.jar,curator-framework-4.0.1.jar,curator-recipes-4.0.1.jar,dubbo-2.7.3.jar,guava-20.0.jar,javassist-3.20.0-GA.jar,zookeeper-3.4.13.jar，这是从dubbo-samples工程的master分支的754e937b1b0942d7a1dd76705daaf670854801fd版本生成的maven工程的maven依赖库中找到的包），这样做的方式是无法像绝大多数Apache的jar包那样以bundle方式加载它:dubbo-xxx.jar(未提供满足OSGi规范的manifest.mf)

4.OSGiHost加载新的加入了泛化特性的Bundle,并使用这个特性。

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

OSGiHost can call dubbo service by Bundle

OSGiHost可以通过Bundle调用dubbo服务

Actual Result

Get some exception,

After read few source code,i think ,it may occured beacause the configuration at inner path of dubbo-2.7.2.jar:\META-INF\dubbo\internal\org.apache.dubbo.common.extension.ExtensionFactory,it told dubbo to use org.apache.dubbo.common.extension.factory.AdaptiveExtensionFactory as a 'adaptive',and of course,in the OSGi loader doesn't load the configuration, or make it visible in old way.

发生了异常,

通过阅读相关处代码，我猜测有一种可能是dubbo.ajr中的配置\META-INF\dubbo\internal\org.apache.dubbo.common.extension.ExtensionFactory没有被dubbo读取到，无论是loader未加载，还是不处于过去的位置。使得其配置adaptive=org.apache.dubbo.common.extension.factory.AdaptiveExtensionFactory没有生效，进而使用了默认的ExtensionFactory.

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.corp.osgihost.osgi.OSGiUtil.doFunctionCall(OSGiUtil.java:241)
at com.corp.osgihost.task.TaskRunner.process(TaskRunner.java:277)
at com.corp.osgihost.task.TaskRunner.run(TaskRunner.java:198)
at com.corp.osgihost.event.TaskHandler.doTaskJobInner(TaskHandler.java:172)
at com.corp.osgihost.event.TaskHandler.doGUITask(TaskHandler.java:162)
at com.corp.osgihost.event.TaskHandler.doGUITaskJob(TaskHandler.java:113)
at com.corp.osgihost.event.TaskHandler.processTask(TaskHandler.java:72)
at com.corp.osgihost.event.TaskHandler$$FastClassBySpringCGLIB$$5d8c0873.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:750)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ExceptionInInitializerError
at com.corp.osgihost.bundle.dubbotest.DubboServiceFactory.genericInvoke(DubboServiceFactory.java:56)
at com.corp.osgihost.bundle.dubbotest.DubboServiceFactory.genericInvoke(DubboServiceFactory.java:51)
at com.corp.osgihost.bundle.dubbotest.DubboTestImpl.stepRPCDubboTest(DubboTestImpl.java:270)
at com.corp.osgihost.bundle.dubbotest.DubboTestImpl.doTestProcess(DubboTestImpl.java:375)
at com.corp.osgihost.bundle.dubbotest.DubboTestImpl.step(DubboTestImpl.java:707)
... 27 more
Caused by: java.lang.IllegalStateException: Failed to create adaptive instance: java.lang.IllegalStateException: Can't create adaptive extension interface org.apache.dubbo.common.extension.ExtensionFactory, cause: No adaptive method exist on extension org.apache.dubbo.common.extension.ExtensionFactory, refuse to create the adaptive class!
at org.apache.dubbo.common.extension.ExtensionLoader.getAdaptiveExtension(ExtensionLoader.java:486)
at org.apache.dubbo.common.extension.ExtensionLoader.<init>(ExtensionLoader.java:106)
at org.apache.dubbo.common.extension.ExtensionLoader.getExtensionLoader(ExtensionLoader.java:128)
at org.apache.dubbo.config.ReferenceConfig.<clinit>(ReferenceConfig.java:101)
... 32 more
Caused by: java.lang.IllegalStateException: Can't create adaptive extension interface org.apache.dubbo.common.extension.ExtensionFactory, cause: No adaptive method exist on extension org.apache.dubbo.common.extension.ExtensionFactory, refuse to create the adaptive class!
at org.apache.dubbo.common.extension.ExtensionLoader.createAdaptiveExtension(ExtensionLoader.java:847)
at org.apache.dubbo.common.extension.ExtensionLoader.getAdaptiveExtension(ExtensionLoader.java:482)
... 35 more
Caused by: java.lang.IllegalStateException: No adaptive method exist on extension org.apache.dubbo.common.extension.ExtensionFactory, refuse to create the adaptive class!
at org.apache.dubbo.common.extension.AdaptiveClassCodeGenerator.generate(AdaptiveClassCodeGenerator.java:89)
at org.apache.dubbo.common.extension.ExtensionLoader.createAdaptiveExtensionClass(ExtensionLoader.java:860)
at org.apache.dubbo.common.extension.ExtensionLoader.getAdaptiveExtensionClass(ExtensionLoader.java:856)
at org.apache.dubbo.common.extension.ExtensionLoader.createAdaptiveExtension(ExtensionLoader.java:845)
... 36 more