wood burning stoves 2.0*
The moose likes Ant, Maven and Other Build Tools and the fly likes IllegalArgumentException with Ant Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "IllegalArgumentException with Ant" Watch "IllegalArgumentException with Ant" New topic

IllegalArgumentException with Ant

Unnsse Khan
Ranch Hand

Joined: Nov 12, 2001
Posts: 511
This is my Ant task:
<target name="run.prelim.sql" depends="" >
<sql driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"
<transaction src="E:\Apps\FishStore\FishScripts\test.sql"/>
When I try to do this:
E:\Apps\FishStore>ant run.prelim.sql
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.....
Prashant Hurria
Ranch Hand

Joined: Mar 23, 2009
Posts: 40
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.
GeeCON Prague 2014
subject: IllegalArgumentException with Ant