horizonzy opened a new issue #8176:
URL: https://github.com/apache/dubbo/issues/8176


   ### Environment
   
   * Dubbo version: 3.0
   
   ### Steps to reproduce this issue
   start dubbo-demo-triple ApiProvider's main.
   
   ### There are two problem
   1.metadataService is inner service at dubbo, it need dubbo protocol to 
export, but dubbo-demo-triple module didn't import dubbo-rpc-dubbp dependency.
   
   2.This module use old coding model, it use serviceConfig.export directly, 
didn't use DubboBootStrap to start. The old coding model exist problem, it's 
can't add registryConfig to configManager, so didn't use registryConfig as 
metadataReportConfig. 
   At 3.0, we need metadataReport to do service name mapping.
   
   
   
   If there is an exception, please attach the exception trace:
   
   ```
   java.lang.IllegalStateException: the metadata report was not inited.
        at 
org.apache.dubbo.metadata.report.MetadataReportInstance.checkInit(MetadataReportInstance.java:83)
        at 
org.apache.dubbo.metadata.report.MetadataReportInstance.getMetadataReport(MetadataReportInstance.java:72)
        at 
org.apache.dubbo.registry.client.metadata.MetadataServiceNameMapping.lambda$map$0(MetadataServiceNameMapping.java:56)
        at 
org.apache.dubbo.registry.client.metadata.MetadataServiceNameMapping.execute(MetadataServiceNameMapping.java:121)
        at 
org.apache.dubbo.registry.client.metadata.MetadataServiceNameMapping.map(MetadataServiceNameMapping.java:50)
        at 
org.apache.dubbo.config.ServiceConfig.lambda$exported$0(ServiceConfig.java:245)
        at java.util.ArrayList.forEach(ArrayList.java:1257)
        at 
org.apache.dubbo.config.ServiceConfig.exported(ServiceConfig.java:243)
        at 
org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:339)
        at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:231)
        at org.apache.dubbo.demo.provider.ApiProvider.main(ApiProvider.java:37)
   ```
   
   ```
   Exception in thread "main" java.lang.IllegalStateException: No such 
extension org.apache.dubbo.rpc.Protocol by name dubbo, no related exception was 
found, please check whether related SPI module is missing.
        at 
org.apache.dubbo.common.extension.ExtensionLoader.findException(ExtensionLoader.java:670)
        at 
org.apache.dubbo.common.extension.ExtensionLoader.createExtension(ExtensionLoader.java:677)
        at 
org.apache.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:477)
        at 
org.apache.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:461)
        at 
org.apache.dubbo.config.ServiceConfig.findConfigedPorts(ServiceConfig.java:682)
        at 
org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:483)
        at 
org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:362)
        at 
org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:338)
        at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:231)
        at 
org.apache.dubbo.config.metadata.ConfigurableMetadataServiceExporter.export(ConfigurableMetadataServiceExporter.java:83)
        at 
org.apache.dubbo.config.metadata.ConfigurableMetadataServiceExporter.export(ConfigurableMetadataServiceExporter.java:55)
        at 
org.apache.dubbo.config.bootstrap.DubboBootstrap.exportMetadataService(DubboBootstrap.java:1270)
        at 
org.apache.dubbo.config.bootstrap.DubboBootstrap.start(DubboBootstrap.java:1101)
        at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:235)
        at org.apache.dubbo.demo.provider.ApiProvider.main(ApiProvider.java:37)
   ```
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to