You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "xixingya (via GitHub)" <gi...@apache.org> on 2024/08/19 07:41:24 UTC

[I] [Bug] Using Stream With no protobuf not working [dubbo]

xixingya opened a new issue, #14546:
URL: https://github.com/apache/dubbo/issues/14546

   ### Pre-check
   
   - [X] I am sure that all the content I provide is in English.
   
   
   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Apache Dubbo Component
   
   Java SDK (apache/dubbo)
   
   ### Dubbo Version
   
   3.2.*
   
   ### Steps to reproduce this issue
   
   https://github.com/xixingya/dubbo-demo/blob/master/dubbo-demo-spi/src/main/java/tech/xixing/dubbo/demo/stream/StreamProviderDemo.java   
    please see this code. which is copy from 
   
   https://cn.dubbo.apache.org/zh-cn/overview/mannual/java-sdk/reference-manual/protocol/triple/streaming/#%E5%AE%9E%E7%8E%B0%E7%B1%BB
   
   ### What you expected to happen
   
   the stream mode not working 
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request to fix on your own?
   
   - [ ] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


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


Re: [I] [Bug] Using Stream With no protobuf not working [dubbo]

Posted by "LiujunjieALiling (via GitHub)" <gi...@apache.org>.
LiujunjieALiling commented on issue #14546:
URL: https://github.com/apache/dubbo/issues/14546#issuecomment-2297057290

   because your  stream consumer demo application  invoke with generic,
   
   <img width="1125" alt="image" src="https://github.com/user-attachments/assets/3289366a-a760-4e15-bbfd-96894e45e294">
   
   but stream pattern can't either use generic or  two params
   
   <img width="895" alt="image" src="https://github.com/user-attachments/assets/0f3a0f42-476d-4efe-ace6-53093c973c76">
   
   you should remove  reference.setGeneric("true"); than try again


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


Re: [I] [Bug] Using Stream With no protobuf not working [dubbo]

Posted by "xixingya (via GitHub)" <gi...@apache.org>.
xixingya commented on issue #14546:
URL: https://github.com/apache/dubbo/issues/14546#issuecomment-2295942120

   org.apache.dubbo.rpc.RpcException: java.lang.IllegalArgumentException: [Serialization Security] Serialized class tech.xixing.dubbo.demo.stream.StreamConsumerDemo$1 has not implement Serializable interface. Current mode is strict check, will disallow to deserialize it by default. 
   	at org.apache.dubbo.rpc.filter.GenericFilter.invoke(GenericFilter.java:129)
   	at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
   	at org.apache.dubbo.rpc.filter.ClassLoaderFilter.invoke(ClassLoaderFilter.java:54)
   	at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
   	at org.apache.dubbo.rpc.filter.EchoFilter.invoke(EchoFilter.java:41)
   
   	at org.apache.dubbo.rpc.TriRpcStatus.asException(TriRpcStatus.java:213)
   	at org.apache.dubbo.rpc.protocol.tri.call.UnaryClientCallListener.onClose(UnaryClientCallListener.java:53)
   	at org.apache.dubbo.rpc.protocol.tri.call.TripleClientCall.onComplete(TripleClientCall.java:127)
   	at org.apache.dubbo.rpc.protocol.tri.stream.TripleClientStream$ClientTransportListener.finishProcess(TripleClientStream.java:243)
   	at org.apache.dubbo.rpc.protocol.tri.stream.TripleClientStream$ClientTransportListener.onTrailersReceived(TripleClientStream.java:328)
   	at org.apache.dubbo.rpc.protocol.tri.stream.TripleClientStream$ClientTransportListener.lambda$onHeader$1(TripleClientStream.java:431)
   	at org.apache.dubbo.common.threadpool.serial.SerializingExecutor.run(SerializingExecutor.java:105)
   


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


Re: [I] [Bug] Using Stream With generic and injvm not work [dubbo]

Posted by "LiujunjieALiling (via GitHub)" <gi...@apache.org>.
LiujunjieALiling commented on issue #14546:
URL: https://github.com/apache/dubbo/issues/14546#issuecomment-2300557224

   > StreamObserver is a special class and should not pass to Serialize checker
   
   yesterday, i try to rebuild GenericFilter and TripleInvoker to support it,  but  it's costly, need i support it ?


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


Re: [I] [Bug] Using Stream With generic and injvm not work [dubbo]

Posted by "flyhawk1010 (via GitHub)" <gi...@apache.org>.
flyhawk1010 commented on issue #14546:
URL: https://github.com/apache/dubbo/issues/14546#issuecomment-2342568781

       // generic invoke
       GenericService genericService = bootstrap.getCache().get(reference);
   
       StreamObserver<String> responseObserver = new StreamObserver<String>() {
           @Override
           public void onNext(String data) {
               
           }
   
           @Override
           public void onError(Throwable throwable) {
   
           }
   
           @Override
           public void onCompleted() {
   
           }
       };
   
       while (true) {
           try {
               Object genericInvokeResult =
                       genericService.$invoke("sayHello",
                               new String[] {String.class.getName(),StreamObserver.class.getName()},
                               new Object[] {param,responseObserver});
               System.out.println(genericInvokeResult);
               Thread.sleep(1000);
           } catch (Exception e) {
               e.printStackTrace();
           }
       }
   
   @JunJieLiu51520 I have this requirement, how can it be implemented?


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


Re: [I] [Bug] Using Stream With no protobuf not working [dubbo]

Posted by "xixingya (via GitHub)" <gi...@apache.org>.
xixingya commented on issue #14546:
URL: https://github.com/apache/dubbo/issues/14546#issuecomment-2297853292

   > do you have some idea for your case ? i can implement that @xixingya
   
   maybe streamObserver can exclude by Serializable check?


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


Re: [I] [Bug] Using Stream With no protobuf not working [dubbo]

Posted by "LiujunjieALiling (via GitHub)" <gi...@apache.org>.
LiujunjieALiling commented on issue #14546:
URL: https://github.com/apache/dubbo/issues/14546#issuecomment-2297066559

   do you have some idea for  your case ?  i can implement that @xixingya 


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


Re: [I] [Bug] Using Stream With generic and injvm not work [dubbo]

Posted by "LiujunjieALiling (via GitHub)" <gi...@apache.org>.
LiujunjieALiling commented on issue #14546:
URL: https://github.com/apache/dubbo/issues/14546#issuecomment-2300559559

   > > StreamObserver is a special class and should not pass to Serialize checker
   > 
   > yesterday, i try to rebuild GenericFilter and TripleInvoker to support it, but it's costly, need i support it ? @AlbumenJ 
   
   


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


Re: [I] [Bug] Using Stream With generic and injvm not work [dubbo]

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #14546:
URL: https://github.com/apache/dubbo/issues/14546#issuecomment-2303531124

   You can try it


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


Re: [I] [Bug] Using Stream With generic and injvm not work [dubbo]

Posted by "shijilin0116 (via GitHub)" <gi...@apache.org>.
shijilin0116 commented on issue #14546:
URL: https://github.com/apache/dubbo/issues/14546#issuecomment-2320404535

   same promblem, looking forword to solution~~


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


Re: [I] [Bug] Using Stream With generic and injvm not work [dubbo]

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #14546:
URL: https://github.com/apache/dubbo/issues/14546#issuecomment-2300206309

   StreamObserver is a special class and should not pass to Serialize checker


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


Re: [I] [Bug] Using Stream With generic and injvm not work [dubbo]

Posted by "LiujunjieALiling (via GitHub)" <gi...@apache.org>.
LiujunjieALiling commented on issue #14546:
URL: https://github.com/apache/dubbo/issues/14546#issuecomment-2300519072

   > StreamObserver is a special class and should not pass to Serialize checker
   
   i  guess that he wants to use generic invoke, and at the same time use StreamObserver(BI or S),such as following case:
   
   ![Uploading image.png…]()
   
   
   is it ? @xixingya 
   


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


Re: [I] [Bug] Using Stream With no protobuf not working [dubbo]

Posted by "xixingya (via GitHub)" <gi...@apache.org>.
xixingya commented on issue #14546:
URL: https://github.com/apache/dubbo/issues/14546#issuecomment-2296087028

   System.setProperty("dubbo.application.check-serializable", "false");  must set this properties works well,But using stream mode why I should set this properties


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