我使用TFS SDK for Java并在从服务器下载文件时随机获取此异常:
com.ctc.wstx.exc.WstxIOException:无效的UTF-8起始字节0xab(在char#6473861,字节#6473740)
以前有人遇到过吗?有什么想法吗?
完整的堆栈跟踪如下:
com.ctc.wstx.exc.WstxIOException:无效的UTF-8起始字节0xab(在char#6473861,字节#6473740)
在com.ctc.wstx.sr.StreamScanner.constructFromIOE(StreamScanner.java:599)
在com.ctc.wstx.sr.StreamScanner.loadMore(StreamScanner.java:967)
在com.ctc.wstx.sr.StreamScanner.loadMore(StreamScanner.java:1006)
在com.ctc.wstx.sr.StreamScanner.getNextChar(StreamScanner.java:758)
在com.ctc.wstx.sr.BasicStreamReader.parseNormalizedAttrValue(BasicStreamReader.java:1862)
在com.ctc.wstx.sr.BasicStreamReader.handleNsAttrs(BasicStreamReader.java:3013)
在com.ctc.wstx.sr.BasicStreamReader.handleStartElem(BasicStreamReader.java:2910)
在com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2786)
在com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1054)
在com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1129)
在ms.tfs.versioncontrol.clientservices._03._ItemSet.readFromElement(_ItemSet.java:138)
at ms.tfs.versioncontrol.clientservices._03._Repository4Soap_QueryItemsResponse.readFromElement(_Repository4Soap_QueryItemsResponse.java:98)
at ms.tfs.versioncontrol.clientservices._03._Repository4Soap12Service $ 44.readSOAPResponse(_Repository4Soap12Service.java:1214)
在com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:668)
... 28更多
引起:java.io.CharConversionException:无效的UTF-8起始字节0xab(在char#6473861,字节#6473740)
在com.ctc.wstx.io.UTF8Reader.reportInvalidInitial(UTF8Reader.java:303)
在com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:189)
在com.ctc.wstx.io.ReaderSource.readInto(ReaderSource.java:84)
在com.ctc.wstx.io.BranchingReaderSource.readInto(BranchingReaderSource.java:55)
在com.ctc.wstx.sr.StreamScanner.loadMore(StreamScanner.java:961)
......还有40多个
源代码:
private void overwriteChangedFiles(@NotNull VersionControlClient vc, @NotNull Workspace workspace, @NotNull VersionSpec version, @NotNull String localPath)
{
WorkingFolder workingFolder = workspace.getExactMappingForLocalPath(localPath);
ItemSet itemSet = vc.getItems(m_path, version, RecursionType.FULL, DeletedState.NON_DELETED, ItemType.FILE); // this line sometimes causes exception