Dan Small created THRIFT-2353:
---------------------------------
Summary: Unexpected 'No more data to read.' when using
TCompactProtocolT
Key: THRIFT-2353
URL: https://issues.apache.org/jira/browse/THRIFT-2353
Project: Thrift
Issue Type: Bug
Components: C++ - Library
Affects Versions: 0.9.1
Environment: Windows/Visual Studio 2010
Reporter: Dan Small
Below is my .idl
I filled in a ConnectorConfig with a couple of 'xmlFiles' and 'delimitedFiles'
each of which had several 'properties'.
I was writing to a file using TSimpleFileTransport and TCompactProtocolT.
When I tried to read what had been written I would get the 'No more data to
read.' error. If I switched to using TBinaryProtocol then the problem would
go away and everything seemed to function correctly.
The same problem does not happen with Java.
I tried applying the patch for issue 1833 however that didn't fix the problem.
union PropertyLocation
{
1 : i64 column
2 : string xpath
}
struct DocumentProperty
{
1 : i64 datatype,
2 : bool dateIsUTC,
3 : string id,
4 : string displayName,
5 : string description,
6 : string dateStringFormat,
7 : PropertyLocation location;
}
struct DelimitedFormat
{
1 : i32 columnDelimiter
2 : i32 listDelimiter
3 : i32 quote
4 : bool firstRowIsHeader
}
struct XMLFormat
{
1 : list< string > namespaces
}
union FormatDetail
{
1 : DelimitedFormat delimitedFormat
2 : XMLFormat xmlFormat
}
struct DocumentFormat
{
1 : string id,
2 : string displayName,
3 : string description,
4 : list< DocumentProperty > properties;
5 : FormatDetail detail;
}
struct ConnectorConfig
{
1 : i64 logRetentionDays
2 : i64 logLevel
3 : i64 logMaxFileSize
4 : list< DocumentFormat > xmlFiles
5 : list< DocumentFormat > delimitedFiles
6 : string logLocation
}
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)