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

Operating System version: linux

Java version: 1.8

Steps to reproduce this issue

服务端经常会报错

cause: java.lang.NoClassDefFoundError: com/alibaba/com/caucho/hessian/io/ThrowableSerializer

服务重器后会好一段时间,时间长了以后就会再次出现

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

What do you expected from the above steps？

What actually happens?

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

with root cause
org.apache.dubbo.remoting.RemotingException: Failed to send response: Response [id=450, version=2.0.2, status=20, event=false, error=null, result=AppResponse [value=null, exception=java.lang.NoClassDefFoundError: ch/qos/logback/classic/spi/ThrowableProxy]], cause: java.lang.NoClassDefFoundError: com/alibaba/com/caucho/hessian/io/ThrowableSerializer
java.lang.NoClassDefFoundError: com/alibaba/com/caucho/hessian/io/ThrowableSerializer
at com.alibaba.com.caucho.hessian.io.SerializerFactory.getSerializer(SerializerFactory.java:375)
at com.alibaba.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:411)
at org.apache.dubbo.common.serialize.hessian2.Hessian2ObjectOutput.writeObject(Hessian2ObjectOutput.java:98)
at org.apache.dubbo.common.serialize.ObjectOutput.writeThrowable(ObjectOutput.java:49)
at org.apache.dubbo.rpc.protocol.dubbo.DubboCodec.encodeResponseData(DubboCodec.java:207)
at org.apache.dubbo.remoting.exchange.codec.ExchangeCodec.encodeResponse(ExchangeCodec.java:283)
at org.apache.dubbo.remoting.exchange.codec.ExchangeCodec.encode(ExchangeCodec.java:71)
at org.apache.dubbo.rpc.protocol.dubbo.DubboCountCodec.encode(DubboCountCodec.java:40)
at org.apache.dubbo.remoting.transport.netty4.NettyCodecAdapter$InternalEncoder.encode(NettyCodecAdapter.java:69)
at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702)
at io.netty.handler.timeout.IdleStateHandler.write(IdleStateHandler.java:302)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702)
at io.netty.channel.ChannelDuplexHandler.write(ChannelDuplexHandler.java:115)
at org.apache.dubbo.remoting.transport.netty4.NettyServerHandler.write(NettyServerHandler.java:104)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717)
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:764)
at io.netty.channel.AbstractChannelHandlerContext$WriteTask.run(AbstractChannelHandlerContext.java:1071)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)

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

Operating System version: windows

Java version: 1.8

Steps to reproduce this issue

创建一个dubbo demo项目，提供一个方法，该方法抛出一个自定义的异常例如MyBizException

引入http协议，启动项目

使用postman之类的工具调用这个方法，它的返回结果如下：

{"jsonrpc":"2.0","id":"1","error":{"code":0,"message":"参数不能为空","data":{"exceptionTypeName":"com.demo.exception.MyBizException","message":"参数不能为空"}}}

它的error.code错误码一直是0，没法自己指定

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

Expected Result

What do you expected from the above steps？

希望有地方可以指定自己的错误码

Actual Result

What actually happens?

error.code一直是0

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

Just put your stack trace here!