[
https://issues.apache.org/jira/browse/THRIFT-2353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dan Small updated THRIFT-2353:
------------------------------
Attachment: sample.zip
Attached zip contains sample idl and source code that reproduces the problem.
Note that the C++ code shows the problem while the Java code does not.
I also have the file output from the java code and the C++ code. These are
java\t.txt and cpp\t.txt. Note that these were produced with a snapshot of
thrift that I downloaded today + the patch for issue 1833. ( As opposed to
being produced by thrift 0.9.1. )
> 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
> Attachments: sample.zip
>
>
> 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)