Jarek Jarcec Cecho created SQOOP-1227:
-----------------------------------------

             Summary: Sqoop fails to compile against commons-io higher then 1.4
                 Key: SQOOP-1227
                 URL: https://issues.apache.org/jira/browse/SQOOP-1227
             Project: Sqoop
          Issue Type: Bug
    Affects Versions: 1.4.4
            Reporter: Jarek Jarcec Cecho
            Assignee: Jarek Jarcec Cecho
             Fix For: 1.4.5


The problem is in 
[DataDrivenImportJob.writeAvroSchema|https://github.com/apache/sqoop/blob/trunk/src/java/org/apache/sqoop/mapreduce/DataDrivenImportJob.java#L103]
 where we have following code fragment:

{code}
    FileUtils.writeStringToFile(schemaFile, schema.toString(true), null);
{code}

The last parameter to the function call is {{null}} without any time. This 
works fine in {{commons-io}} 1.4 as the method {{writeStringToFile}} have only 
two different definitions:

{code}
writeStringToFile(File file, String data) 
writeStringToFile(File file, String data, String encoding) 
{code}

However later versions has added a lot of other definitions, such as:

{code}
writeStringToFile(File file, String data, Charset encoding)
{code}

And thus the compilation fails on ambiguity problem:

{code}
    [javac] 
/home/jarcec/apache/repos/sqoop/src/java/org/apache/sqoop/mapreduce/DataDrivenImportJob.java:109:
 error: reference to writeStringToFile is ambiguous, both method 
writeStringToFile(File,String,Charset) in FileUtils and method 
writeStringToFile(File,String,String) in FileUtils match
    [javac]     FileUtils.writeStringToFile(schemaFile, schema.toString(true), 
null);
    [javac]              ^
{code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to