- [x] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
- [x] I have checked the [FAQ](https://github.com/apache/dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.

### Steps to reproduce this issue

1. start provider and consumer
2. provider return `MetadataInfo`
![image](https://user-images.githubusercontent.com/43994656/128314936-2b517524-50ac-465d-b378-119dfea24c78.png)

3. consumer received `HashMap`
![image](https://user-images.githubusercontent.com/43994656/128314994-637476b8-ef78-4107-8b14-c8e25c06d67c.png)
4. error 
```
java.lang.ClassCastException: java.util.HashMap cannot be cast to org.apache.dubbo.metadata.MetadataInfo
	at org.apache.dubbo.common.bytecode.proxy0.getMetadataInfo(proxy0.java)
	at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.doGetMetadataInfo(ServiceInstancesChangedListener.java:331)
	at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.getRemoteMetadata(ServiceInstancesChangedListener.java:285)
	at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.onEvent(ServiceInstancesChangedListener.java:136)
	at org.apache.dubbo.registry.nacos.NacosServiceDiscovery.handleEvent(NacosServiceDiscovery.java:143)
	at org.apache.dubbo.registry.nacos.NacosServiceDiscovery.lambda$null$4(NacosServiceDiscovery.java:122)
```
5. It should be caused by the serialization whitelist. I removed this change and the call is normal.  #8386

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.dubbo.common.serialize.hessian2.dubbo;
import org.apache.dubbo.common.serialize.hessian2.Hessian2SerializerFactory;
import com.alibaba.com.caucho.hessian.io.SerializerFactory;
public class DefaultHessian2FactoryInitializer extends AbstractHessian2FactoryInitializer {
    @Override
    protected SerializerFactory createSerializerFactory() {
        Hessian2SerializerFactory hessian2SerializerFactory = new Hessian2SerializerFactory();
        hessian2SerializerFactory.getClassFactory().allow(RuntimeException.class.getName());
        return hessian2SerializerFactory;
    }
}