DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=40300>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40300 Summary: Message not helpful Product: Ant Version: 1.6.5 Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Core AssignedTo: dev@ant.apache.org ReportedBy: [EMAIL PROTECTED] When trying to filter a file that contains an apparently unexpected bytecode, such as 0xB7, Ant issues message: "Failed to copy <file1> to <file2> due to null" Where file1 and file2 are source and destination files, respectively in different directories. Exact command invocation: ant --noconfig -f test.xml ----------------------------------------------------------- Output: Buildfile: test.xml test: [copy] Copying 1 file to /home/bpracht/testout [copy] Copying /home/bpracht/testin/FilteredFile.txt to /home/bpracht/testout/FilteredFile.txt BUILD FAILED /home/bpracht/test.xml:8: Failed to copy /home/bpracht/testin/FilteredFile.txt to /home/bpracht/testout/FilteredFile.txt due to null Total time: 0 seconds ----------------------------------------------------------- ant -diagnostics: ANT_HOME=/opt/apache-ant-1.6.5/ ------- Ant diagnostics report ------- Apache Ant version 1.6.5 compiled on June 2 2005 ------------------------------------------- Implementation Version (JDK1.2+ only) ------------------------------------------- core tasks : 1.6.5 optional tasks : 1.6.5 ------------------------------------------- ANT_HOME/lib jar listing ------------------------------------------- ant.home: /opt/apache-ant-1.6.5/ ant-icontract.jar (9721 bytes) ant-swing.jar (6763 bytes) ant-antlr.jar (5667 bytes) ant-apache-regexp.jar (3724 bytes) ant-commons-logging.jar (3864 bytes) xml-apis.jar (124724 bytes) ant-launcher.jar (9180 bytes) ant-xalan1.jar (4465 bytes) ant-xslp.jar (2244 bytes) ant-jai.jar (21359 bytes) ant-junit.jar (74237 bytes) ant-jdepend.jar (8160 bytes) xercesImpl.jar (1010675 bytes) ant-stylebook.jar (2328 bytes) ant-commons-net.jar (35303 bytes) ant-jsch.jar (22726 bytes) ant-jmf.jar (6605 bytes) ant-apache-log4j.jar (3022 bytes) ant-weblogic.jar (14363 bytes) ant-nodeps.jar (421008 bytes) ant-apache-bcel.jar (8617 bytes) ant-vaj.jar (49742 bytes) ant-javamail.jar (6761 bytes) ant-netrexx.jar (9998 bytes) ant-starteam.jar (35472 bytes) ant-apache-oro.jar (48034 bytes) ant-apache-resolver.jar (4082 bytes) ant-apache-bsf.jar (12597 bytes) ant-trax.jar (68841 bytes) ant.jar (1034049 bytes) ------------------------------------------- Tasks availability ------------------------------------------- image : Missing dependency com.sun.media.jai.codec.FileSeekableStream sshexec : Missing dependency com.jcraft.jsch.UserInfo scp : Missing dependency com.jcraft.jsch.UserInfo jdepend : Missing dependency jdepend.xmlui.JDepend junit : Missing dependency junit.framework.TestListener ------------------------------------------- org.apache.env.Which diagnostics ------------------------------------------- Not available. Download it at http://xml.apache.org/commons/ ------------------------------------------- XML Parser information ------------------------------------------- XML Parser : org.apache.xerces.jaxp.SAXParserImpl XML Parser Location: /opt/IBMJava2-142/jre/lib/xml.jar ------------------------------------------- System properties ------------------------------------------- java.assistive : ON java.runtime.name : Java(TM) 2 Runtime Environment, Standard Edition sun.boot.library.path : /opt/IBMJava2-142/jre/bin java.vm.version : 1.4.2 ant.library.dir : /opt/apache-ant-1.6.5//lib java.vm.vendor : IBM Corporation java.vendor.url : http://www.ibm.com/ path.separator : : java.vm.name : Classic VM file.encoding.pkg : sun.io user.country : US sun.os.patch.level : unknown java.vm.specification.name : Java Virtual Machine Specification user.dir : /home/bpracht java.runtime.version : 1.4.2 java.fullversion : J2RE 1.4.2 IBM build cxia32142ifx-20060209 (SR4-1) (JIT enabled: jitc) java.awt.graphicsenv : sun.awt.X11GraphicsEnvironment java.endorsed.dirs : /opt/IBMJava2-142/jre/lib/endorsed os.arch : x86 com.ibm.vm.bitmode : 32 java.io.tmpdir : /tmp line.separator : java.vm.specification.vendor : Sun Microsystems Inc. java.awt.fonts : os.name : Linux ant.home : /opt/apache-ant-1.6.5/ sun.java2d.fontpath : java.library.path : /opt/IBMJava2-142/jre/bin:/opt/IBMJava2-142/jre/bin/classic:/opt/IBMJava2-142/jre/bin:/usr/lib java.specification.name : Java Platform API Specification java.class.version : 48.0 ibm.system.encoding : UTF-8 java.util.prefs.PreferencesFactory : java.util.prefs.FileSystemPreferencesFactory invokedviajava : os.version : 2.6.11-1.1369_FC4smp user.home : /home/bpracht user.timezone : America/New_York java.awt.printerjob : sun.print.PSPrinterJob java.specification.version : 1.4 file.encoding : UTF-8 user.name : bpracht java.class.path : /opt/apache-ant-1.6.5//lib/ant-launcher.jar:/opt/apache-ant-1.6.5/lib/ant-icontract.jar:/opt/apache-ant-1.6.5/lib/ant-swing.jar:/opt/apache-ant-1.6.5/lib/ant-antlr.jar:/opt/apache-ant-1.6.5/lib/ant-apache-regexp.jar:/opt/apache-ant-1.6.5/lib/ant-commons-logging.jar:/opt/apache-ant-1.6.5/lib/xml-apis.jar:/opt/apache-ant-1.6.5/lib/ant-launcher.jar:/opt/apache-ant-1.6.5/lib/ant-xalan1.jar:/opt/apache-ant-1.6.5/lib/ant-xslp.jar:/opt/apache-ant-1.6.5/lib/ant-jai.jar:/opt/apache-ant-1.6.5/lib/ant-junit.jar:/opt/apache-ant-1.6.5/lib/ant-jdepend.jar:/opt/apache-ant-1.6.5/lib/xercesImpl.jar:/opt/apache-ant-1.6.5/lib/ant-stylebook.jar:/opt/apache-ant-1.6.5/lib/ant-commons-net.jar:/opt/apache-ant-1.6.5/lib/ant-jsch.jar:/opt/apache-ant-1.6.5/lib/ant-jmf.jar:/opt/apache-ant-1.6.5/lib/ant-apache-log4j.jar:/opt/apache-ant-1.6.5/lib/ant-weblogic.jar:/opt/apache-ant-1.6.5/lib/ant-nodeps.jar:/opt/apache-ant-1.6.5/lib/ant-apache-bcel.jar:/opt/apache-ant-1.6.5/lib/ant-vaj.jar:/opt/apache-ant-1.6 .5/lib/ant-javamail.jar:/opt/apache-ant-1.6.5/lib/ant-netrexx.jar:/opt/apache-ant-1.6.5/lib/ant-starteam.jar:/opt/apache-ant-1.6.5/lib/ant-apache-oro.jar:/opt/apache-ant-1.6.5/lib/ant-apache-resolver.jar:/opt/apache-ant-1.6.5/lib/ant-apache-bsf.jar:/opt/apache-ant-1.6.5/lib/ant-trax.jar:/opt/apache-ant-1.6.5/lib/ant.jar:/opt/IBMJava2-142/lib/tools.jar java.vm.specification.version : 1.0 sun.arch.data.model : 32 java.home : /opt/IBMJava2-142/jre java.specification.vendor : Sun Microsystems Inc. ----------------------------------------------------------- test.xml file: ----------------------------------------------------------- <?xml version="1.0"?> <project name="Test" default="test" basedir="."> <target name="test" depends=""> <copy todir="testout" overwrite="false" verbose="true" flatten="false" includeEmptyDirs="true" > <fileset dir="testin" casesensitive="false"> <include name="FilteredFile.txt"/> </fileset> <filterset> <filter token="__VERSION__" value="1.0"/> </filterset> </copy> </target> </project> ----------------------------------------------------------- To Recreate: The FilteredFile.txt file should be in a subdirectory called testin, and there should be an output directory called testout. FilteredFile.txt should contain at least one unexpected byte, mine contains 0xB7. Then run ant --noconfig -f test.xml. ----------------------------------------------------------- Also noteworthy: My LANG environment variable is en_US.UTF-8 If I change it to en_US, the test.xml works. It also works if I remove the filtering in test.xml. ----------------------------------------------------------- ----------------------------------------------------------- It's not that I think there shouldn't be an error message, I just think it should be more informative. Saying things like "due to null" doesn't mean anything. Null what? Yes, I did get a stack trace, but I don't see why I should have to. The documentation should mention something about bad or bytes and the LANG variable. I still don't know which byte/characters were not allowed. FWIW, I can't say what code pages the files are in, only to say they're written in the US for a US audience. I think that would be CP-850, but I'm not sure. Thanks, Ben -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]