Hello! This is my Ant task: <target name="run.prelim.sql" depends="" > <sql driver="com.microsoft.jdbc.sqlserver.SQLServerDriver" url="jdbc:microsoft:sqlserver://baba:1433;database=FishStore" userid="DOMAIN/fooman" password="barbaz" rdbms="mssqlserver" > <transaction src="E:\Apps\FishStore\FishScripts\test.sql"/> </sql> </target> When I try to do this: E:\Apps\FishStore>ant run.prelim.sql java.lang.IllegalArgumentException at sun.net.www.ParseUtil.decode(Unknown Source) at sun.misc.FileURLMapper.getPath(Unknown Source) at sun.misc.FileURLMapper.exists(Unknown Source) at sun.misc.URLClassPath$JarLoader.getJarFile(Unknown Source) at sun.misc.URLClassPath$JarLoader.<init>(Unknown Source) at sun.misc.URLClassPath$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.misc.URLClassPath.getLoader(Unknown Source) at sun.misc.URLClassPath.getLoader(Unknown Source) at sun.misc.URLClassPath.getResource(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:213) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:90) Is there any way possible to "catch" this IllegalArgumentException using Ant? Is there anything in my Ant task that is causing this exception to become thrown? If anyone can help, I would be very grateful.....
This is quite an Old post surely the poster would have long forgotten about it.Still adding a reply for the Java Community's benefit.
I faced the same problem and could not find a logical reason for it. I read in some forum that this might be coming due to some entry in the classpath. I removed all my classpath entries and ANT worked perfectly. Then i narrowed down to one particular classpath entry which was playing spoilt spot. The classpath entry was pointing to a non existent location I removed it and bingo all went well.