티스토리 뷰
서버와 클라이언트간에 interface 가 다른 경우 다음과 같은 오류가 발생한다.
Client API가 동일한지 재배포해서 확인한다.
org.apache.thrift.transport.TTransportException
at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132)
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
at org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:129)
at org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101)
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378)
at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297)
at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204)
at org.apache.thrift.protocol.TProtocolDecorator.readMessageBegin(TProtocolDecorator.java:116)
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69)
at com.bnsworks.mwp.usermgmt.rpc.IU104$Client.recv_call(IU104.java:73)
at com.bnsworks.mwp.usermgmt.rpc.IU104$Client.call(IU104.java:60)
at com.bnsworks.mwp.usermgmt.TestIU104.test(TestIU104.java:62)
bytesRead가 0보다 작아서 TTransportException 발생
Client API가 동일한지 재배포해서 확인한다.
org.apache.thrift.transport.TTransportException
at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132)
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
at org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:129)
at org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101)
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378)
at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297)
at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204)
at org.apache.thrift.protocol.TProtocolDecorator.readMessageBegin(TProtocolDecorator.java:116)
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69)
at com.bnsworks.mwp.usermgmt.rpc.IU104$Client.recv_call(IU104.java:73)
at com.bnsworks.mwp.usermgmt.rpc.IU104$Client.call(IU104.java:60)
at com.bnsworks.mwp.usermgmt.TestIU104.test(TestIU104.java:62)
public int read(byte[] buf, int off, int len) throws TTransportException { if (inputStream_ == null) { throw new TTransportException(TTransportException.NOT_OPEN, "Cannot read from null inputStream"); } int bytesRead; try { bytesRead = inputStream_.read(buf, off, len); } catch (IOException iox) { throw new TTransportException(TTransportException.UNKNOWN, iox); } if (bytesRead < 0) { throw new TTransportException(TTransportException.END_OF_FILE); } return bytesRead; }
bytesRead가 0보다 작아서 TTransportException 발생
반응형
댓글