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

Operating System version: MacOS Mojave 10.14.4 (18E226)

Java version: 1.8

Steps to reproduce this issue

register script route

URL registryUrl = URL.valueOf("zookeeper://127.0.0.1:2181");
ZookeeperRegistryFactory zookeeperRegistryFactory = new
ZookeeperRegistryFactory();
zookeeperRegistryFactory.setZookeeperTransporter(new
CuratorZookeeperTransporter());
Registry zookeeperRegistry = zookeeperRegistryFactory.createRegistry(registryUrl);
URL routerURL =
// URL.valueOf("script://0.0.0.0/com.wk.dubbotest.IDubboTest?category=routers&dynamic=false&enabled=true&force=false&priority=0&runtime=true&rule="
URL.valueOf("script://0.0.0.0/com.wk.dubbotest.IDubboTest?type=javascript&rule="
+ URL.encode(get_demoService_createUser_router()));

// routerURL = routerURL.addParameter("rule", URL.encode(get_demoService_createUser_router()));
// zookeeperRegistry.register(routerURL); // 注册
zookeeperRegistry.unregister(routerURL); // 取消注册

consumer print error

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

Expected Result

I hope that consumer can work correctly and the script route can take effect

Actual Result

Consumer print error when I registered the script route

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

2019-09-02 11:39:59.302 ERROR 5026 --- [-127.0.0.1:2181] c.a.d.r.integration.RegistryDirectory : Unsupported protocol script in notified url: script://0.0.0.0/com.wk.dubbotest.IDubboTest?rule=function+route%28invokers%29+%7B++++var+result+%3D+new+java.util.ArrayList%28invokers.size%28%29%29%3B++++result.add%28invokers.get%280%29%29%3B++++return+result%3B%7Droute%28invokers%29%3B&type=javascript from registry 127.0.0.1:2181 to consumer 10.38.1.51, supported protocol: [dubbo, injvm, mock, redis, registry, rmi, thrift]

java.lang.IllegalStateException: Unsupported protocol script in notified url: script://0.0.0.0/com.wk.dubbotest.IDubboTest?rule=function+route%28invokers%29+%7B++++var+result+%3D+new+java.util.ArrayList%28invokers.size%28%29%29%3B++++result.add%28invokers.get%280%29%29%3B++++return+result%3B%7Droute%28invokers%29%3B&type=javascript from registry 127.0.0.1:2181 to consumer 10.38.1.51, supported protocol: [dubbo, injvm, mock, redis, registry, rmi, thrift]
at com.alibaba.dubbo.registry.integration.RegistryDirectory.toInvokers(RegistryDirectory.java:372) [dubbo-2.5.3.jar:2.5.3]
at com.alibaba.dubbo.registry.integration.RegistryDirectory.refreshInvoker(RegistryDirectory.java:224) [dubbo-2.5.3.jar:2.5.3]
at com.alibaba.dubbo.registry.integration.RegistryDirectory.notify(RegistryDirectory.java:195) [dubbo-2.5.3.jar:2.5.3]
at com.alibaba.dubbo.registry.support.AbstractRegistry.notify(AbstractRegistry.java:449) [dubbo-2.5.3.jar:2.5.3]
at com.alibaba.dubbo.registry.support.FailbackRegistry.doNotify(FailbackRegistry.java:273) [dubbo-2.5.3.jar:2.5.3]
at com.alibaba.dubbo.registry.support.FailbackRegistry.notify(FailbackRegistry.java:259) [dubbo-2.5.3.jar:2.5.3]
at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry.access$400(ZookeeperRegistry.java:45) [dubbo-2.5.3.jar:2.5.3]
at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry$3.childChanged(ZookeeperRegistry.java:159) [dubbo-2.5.3.jar:2.5.3]
at com.alibaba.dubbo.remoting.zookeeper.zkclient.ZkclientZookeeperClient$2.handleChildChange(ZkclientZookeeperClient.java:82) [dubbo-2.5.3.jar:2.5.3]
at org.I0Itec.zkclient.ZkClient$10.run(ZkClient.java:843) [zkclient-0.9.jar:na]
at org.I0Itec.zkclient.ZkEventThread.run(ZkEventThread.java:71) [zkclient-0.9.jar:na]

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

Operating System version: macOS 10.12.6

Java version: 1.8

Steps to reproduce this issue

使用protobuf-json的序列化方式

进行普通的dubbo RPC调用

Expected Result

正常调用

Actual Result

报错,序列化失败

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

Caused by: java.lang.IllegalArgumentException: This serialization only support google protobuf object, the object class is: java.lang.String
at org.apache.dubbo.common.serialize.protobuf.support.GenericProtobufObjectOutput.writeObject(GenericProtobufObjectOutput.java:94)
at org.apache.dubbo.common.serialize.protobuf.support.GenericProtobufObjectOutput.writeUTF(GenericProtobufObjectOutput.java:74)
at org.apache.dubbo.rpc.protocol.dubbo.DubboCodec.encodeRequestData(DubboCodec.java:176)
at org.apache.dubbo.remoting.exchange.codec.ExchangeCodec.encodeRequest(ExchangeCodec.java:238)
at org.apache.dubbo.remoting.exchange.codec.ExchangeCodec.encode(ExchangeCodec.java:69)
at org.apache.dubbo.rpc.protocol.dubbo.DubboCountCodec.encode(DubboCountCodec.java:40)
at org.apache.dubbo.remoting.transport.netty4.NettyCodecAdapter$InternalEncoder.encode(NettyCodecAdapter.java:70)
at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107)
... 23 more

at org.apache.dubbo.remoting.exchange.support.DefaultFuture.doReceived(DefaultFuture.java:191)
at org.apache.dubbo.remoting.exchange.support.DefaultFuture.received(DefaultFuture.java:153)
at org.apache.dubbo.remoting.exchange.support.DefaultFuture.received(DefaultFuture.java:141)
at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.handleResponse(HeaderExchangeHandler.java:62)
at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:199)
at org.apache.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:51)
at org.apache.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:57)
... 3 more