CSV Import fails with sun.io.MalformedInputException
来源:互联网 发布:c专家编程 编辑:程序博客网 时间:2024/05/21 13:09
http://confluence.atlassian.com/display/JIRAKB/CSV+Import+fails+with+sun.io.MalformedInputException
Symptoms
When trying to import issues via CSV the following error is thrown and the import fails:
Only new Users will be imported FAILED: Unexpected failure occurred. Importer will stop immediately. Data maybe in an unstable state com.atlassian.jira.exception.DataAccessException: com.atlassian.jira.imports.csv.ImportException: sun.io.MalformedInputException
at com.atlassian.jira.imports.csv.CsvDataBean.populateCache(CsvDataBean.java:201)
at com.atlassian.jira.imports.csv.CsvDataBean.refreshCache(CsvDataBean.java:105)
at com.atlassian.jira.imports.csv.CsvDataBean.getUsers(CsvDataBean.java:251)
at com.atlassian.jira.imports.importer.impl.DefaultJiraDataImporter.importUsers(DefaultJiraDataImporter.java:223)
at com.atlassian.jira.imports.importer.impl.DefaultJiraDataImporter.doImport(DefaultJiraDataImporter.java:94)
at com.atlassian.jira.imports.importer.impl.ImporterThread.run(ImporterThread.java:21)
Caused by: com.atlassian.jira.imports.csv.ImportException: sun.io.MalformedInputException
at com.atlassian.jira.imports.csv.MindProdCsvProvider.getNextLine(MindProdCsvProvider.java:102)
at com.atlassian.jira.imports.csv.CsvDataBean.populateCache(CsvDataBean.java:125)
... 5 more
Caused by: sun.io.MalformedInputException
at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:149)
at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:247)
at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:297)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:182)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.readLine(BufferedReader.java:299)
at java.io.BufferedReader.readLine(BufferedReader.java:362)
at com.mindprod.csv.CSVReader.getLineIfNeeded(CSVReader.java:690)
at com.mindprod.csv.CSVReader.get(CSVReader.java:343)
at com.mindprod.csv.CSVReader.getAllFieldsInLine(CSVReader.java:305)
at com.atlassian.jira.imports.csv.MindProdCsvProvider.getNextLine(MindProdCsvProvider.java:87)
Cause
This error is thrown when the system encoding is in UTF-8 but the CSV file is in a different character encoding.
Resolution
On Unix/Linux you can check the encoding of the CSV using the file command:
[amyers@erdinger:~]$ file mycsvfile.csv
mycsvfile.csv: ISO-8859 English text, with very long lines, with CRLF, LF line terminators
Once you have determind the encoding of the file, you can use the inconv command to change the encoding:
[amyers@erdinger:~]$ iconv -f ISO-8859-1 -t UTF-8 mycsvfile.csv > myutf8csvfile.csv
- CSV Import fails with sun.io.MalformedInputException
- 关于sun.io.MalformedInputException
- sun.io.MalformedInputException
- sun.io.MalformedInputException
- 异常sun.io.MalformedInputException处理
- RAD/RSA中的sun.io.MalformedInputException错误
- websphere XML文件装载错误sun.io.MalformedInputException
- 文件编码导致的sun.io.MalformedInputException异常
- 如何解决MATLAB启动sun.io.MalformedInputException异常
- 文件编码导致的sun.io.MalformedInputException异常
- 编译java文件,抛出throw a sun.io.MalformedInputException(Unix环境)
- 把war包部署到was上,出现错: sun.io.MalformedInputException
- Sqoop fails with "Error parsing arguments for import"
- DataPump Import (IMPDP) Fails With Error ORA-39083 Object Type INDEX_STATISTICS (文档 ID 1454880.1)
- DataPump Import Of Object Types Fails With Errors ORA-39083 ORA-2304 Or ORA-39117 ORA-39779 (Doc ID
- Start Routine Fails with CX_SY_DYN_CALL_ILLEGAL_TYPE
- Import-Csv 帮助信息
- sqlite import csv注意事项
- window open 弹出窗口方法
- 条款16:成对适用new和delete时要采用相同形式
- 我想成为高手
- 当这样的事情发生在我们身上,我们要怎么做?
- Firebug入门指南
- CSV Import fails with sun.io.MalformedInputException
- apache+php+mysql安装配置
- 问个内存电路接口以及访问问题
- _beginthread还是CreateThread
- 什么世道
- SVN 安装配置快速入门
- 用 Chukeh.dll 实现数据查询分页,及快速增、删、改、查操作
- 用Windows Live Writer写CSDN博客
- Server Side ViewState 在服务器端存贮ViewState (ASP.NET 2.0)