ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alec Fernandez" <Alec.Fernan...@sas.com>
Subject RE: Problem with fileset in concat on AIX
Date Tue, 03 Jul 2007 15:07:43 GMT
Hey Folks,

Turns out the file that was the source file in the concat task had a char (0x9F) that is not
legal in UTF-8 encoding.
Once I removed that char, then the concat task began working on AIX.

Thanks,
Alec
 

-----Original Message-----
From: Alec Fernandez 
Sent: Monday, July 02, 2007 4:52 PM
To: 'user@ant.apache.org'
Subject: Problem with fileset in concat on AIX

Hello,

This is my first post to this list (predictably, it's a problem), but I'll try to give back
now that I'm subscribed.  Please forgive and educate me on matters of etiquette.

I'm running the following script on AIX 5.2 with ant 1.7 but the same occurs with ant 1.6.5.
 Java is 1.5.0 but also occurs with 1.4.2. The problem does not occur on Linux or Solaris.
 (I'm resisting the urge to diss on a commercial OS)

<project name="Concat" basedir="." default="dist" >
  <property name="temp.dir" value="/tmp/alec" />
  <property name="alecfile" location="/tmp/alec/alec.src" />
  <target name="dist">
    <concat destfile="/tmp/alec/alec.txt" encoding="utf-8" fixlastline="yes" >
      <fileset file="${alecfile}"/>
    </concat>
  </target>
</project>

If the file alec.src does not exist, then all works as expected.  If the file does exist,
you get the following trace:

sevr6401[41]$ ant -f alec.xml -debug
Apache Ant version 1.7.0 compiled on December 13 2006
Buildfile: alec.xml
Adding reference: ant.PropertyHelper
Detected Java version: 1.5 in: /data/install/sasasf/jre1.5/jre Detected OS: AIX Adding reference:
ant.ComponentHelper Setting ro project property: ant.file -> /tmp/alec/alec.xml Adding
reference: ant.projectHelper Adding reference: ant.parsing.context Adding reference: ant.targets
parsing buildfile /tmp/alec/alec.xml with URI = file:/tmp/alec/alec.xml Setting ro project
property: ant.project.name -> Concat Adding reference: Concat Setting ro project property:
ant.file.Concat -> /tmp/alec/alec.xml Project base dir set to: /tmp/alec
 +Target: 
 +Target: dist
[antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml.
It could not be found.
Setting project property: temp.dir -> /tmp/alec Setting project property: alecfile ->
/tmp/alec/alec.src Setting project property: alecfile2 -> /tmp/alec/alec.src2 Attempting
to create object of type org.apache.tools.ant.helper.DefaultExecutor
Adding reference: ant.executor
Build sequence for target(s) `dist' is [dist] Complete build sequence is [dist, ]

dist:
fileset: Setup scanner in dir /tmp/alec with patternSet{ includes: [alec.src] excludes: []
}
fileset: Setup scanner in dir /tmp/alec with patternSet{ includes: [alec.src2] excludes: []
}
   [concat] Concating FileResource "/tmp/alec/alec.src"

BUILD FAILED
/tmp/alec/alec.xml:7: Error while concatenating: null
        at org.apache.tools.ant.taskdefs.Concat.cat(Concat.java:570)
        at org.apache.tools.ant.taskdefs.Concat.execute(Concat.java:470)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:615)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.Main.runBuild(Main.java:698)
        at org.apache.tools.ant.Main.startAnt(Main.java:199)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: sun.io.MalformedInputException
        at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:262)
        at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:314)
        at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:364)
        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:250)
        at java.io.InputStreamReader.read(InputStreamReader.java:212)
        at java.io.BufferedReader.read1(BufferedReader.java:206)
        at java.io.BufferedReader.read(BufferedReader.java:282)
        at org.apache.tools.ant.taskdefs.Concat$MultiReader.read(Concat.java:830)
        at org.apache.tools.ant.taskdefs.Concat.concatenate(Concat.java:589)
        at org.apache.tools.ant.taskdefs.Concat.cat(Concat.java:555)
        ... 18 more
--- Nested Exception ---
sun.io.MalformedInputException
        at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:262)
        at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:314)
        at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:364)
        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:250)
        at java.io.InputStreamReader.read(InputStreamReader.java:212)
        at java.io.BufferedReader.read1(BufferedReader.java:206)
        at java.io.BufferedReader.read(BufferedReader.java:282)
        at org.apache.tools.ant.taskdefs.Concat$MultiReader.read(Concat.java:830)
        at org.apache.tools.ant.taskdefs.Concat.concatenate(Concat.java:589)
        at org.apache.tools.ant.taskdefs.Concat.cat(Concat.java:555)
        at org.apache.tools.ant.taskdefs.Concat.execute(Concat.java:470)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:615)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.Main.runBuild(Main.java:698)
        at org.apache.tools.ant.Main.startAnt(Main.java:199)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Total time: 0 seconds
_______________________________________________
"The only problem is with configuration." -- Brent Laster


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message