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 2021/11/29 04:31:30 UTC

[GitHub] [dubbo] lmm1990 commented on issue #8461: org.apache.dubbo.common.serialize.protobuf.support.ProtobufUtils is not found in dubbo 3.0.x

lmm1990 commented on issue #8461:
URL: https://github.com/apache/dubbo/issues/8461#issuecomment-981284076


   @EarthChen
   dubbo 3.0.4 with dubbo-serialization-protobuf 2.7.14 is not working
   
   pom.xml setting
   <!-- https://mvnrepository.com/artifact/org.apache.dubbo/dubbo -->
           <dependency>
               <groupId>org.apache.dubbo</groupId>
               <artifactId>dubbo</artifactId>
               <version>3.0.4</version>
           </dependency>
           <!-- https://mvnrepository.com/artifact/org.apache.dubbo/dubbo-serialization-protobuf -->
           <dependency>
               <groupId>org.apache.dubbo</groupId>
               <artifactId>dubbo-serialization-protobuf</artifactId>
               <version>2.7.14</version>
           </dependency>
   
   error msg
   java.lang.IllegalStateException: Failed to create adaptive instance: java.lang.IllegalStateException: Can't create adaptive extension interface org.apache.dubbo.common.extension.ExtensionInjector, cause: No such extension org.apache.dubbo.common.extension.ExtensionInjector by name spi, possible causes: 
   (1) spi=org.apache.dubbo.common.extension.factory.SpiExtensionFactory:
   java.lang.IllegalStateException: Failed to load extension class (interface: interface org.apache.dubbo.common.extension.ExtensionInjector, class line: spi=org.apache.dubbo.common.extension.factory.SpiExtensionFactory) in jar:file:/C:/Users/DataXgroup/.m2/repository/org/apache/dubbo/dubbo-common/2.7.14/dubbo-common-2.7.14.jar!/META-INF/dubbo/internal/org.apache.dubbo.common.extension.ExtensionFactory, cause: Duplicate extension org.apache.dubbo.common.extension.ExtensionInjector name spi on org.apache.dubbo.common.extension.inject.SpiExtensionInjector and org.apache.dubbo.common.extension.factory.SpiExtensionFactory
   java.lang.IllegalStateException: Failed to load extension class (interface: interface org.apache.dubbo.common.extension.ExtensionInjector, class line: spi=org.apache.dubbo.common.extension.factory.SpiExtensionFactory) in jar:file:/C:/Users/DataXgroup/.m2/repository/org/apache/dubbo/dubbo-common/2.7.14/dubbo-common-2.7.14.jar!/META-INF/dubbo/internal/org.apache.dubbo.common.extension.ExtensionFactory, cause: Duplicate extension org.apache.dubbo.common.extension.ExtensionInjector name spi on org.apache.dubbo.common.extension.inject.SpiExtensionInjector and org.apache.dubbo.common.extension.factory.SpiExtensionFactory
   	at org.apache.dubbo.common.extension.ExtensionLoader.loadResource(ExtensionLoader.java:998)
   
   
   update pom.xml
   <!-- https://mvnrepository.com/artifact/com.google.protobuf/protobuf-java -->
           <dependency>
               <groupId>com.google.protobuf</groupId>
               <artifactId>protobuf-java</artifactId>
               <version>3.6.0</version>
           </dependency>
           <!-- https://mvnrepository.com/artifact/com.google.protobuf/protobuf-java-util -->
           <dependency>
               <groupId>com.google.protobuf</groupId>
               <artifactId>protobuf-java-util</artifactId>
               <version>3.6.0</version>
           </dependency>
           <!-- https://mvnrepository.com/artifact/org.apache.dubbo/dubbo-serialization-api -->
           <dependency>
               <groupId>org.apache.dubbo</groupId>
               <artifactId>dubbo-serialization-api</artifactId>
               <version>3.0.4</version>
           </dependency>
   
   DemoServiceDubbo.java
   @javax.annotation.Generated(
   value = "by Dubbo generator",
   comments = "Source: DemoService.proto")
   public final class DemoServiceDubbo {
   private static final AtomicBoolean registered = new AtomicBoolean();
   
   public static boolean init() {
       if (registered.compareAndSet(false, true)) {
   //            org.apache.dubbo.common.serialize.protobuf.support.ProtobufUtils.marshaller(
   //            com.dataxgroup.nex.recommend.idl.HelloReply.getDefaultInstance());
   //            org.apache.dubbo.common.serialize.protobuf.support.ProtobufUtils.marshaller(
   //            com.dataxgroup.nex.recommend.idl.HelloRequest.getDefaultInstance());
       }
       return true;
   }
   
   private DemoServiceDubbo() {}
   
   }
   
   **No error reporting**
   
   ### Please upgrade Dubbo serialization protobuf dependency
   
   
   
   
   


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