my dog learned polymorphism
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=""
<transaction src="E:\Apps\FishStore\FishScripts\test.sql"/>
When I try to do this:
E:\Apps\FishStore>ant run.prelim.sql
at 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$ Source)
at Method)
at sun.misc.URLClassPath.getLoader(Unknown Source)
at sun.misc.URLClassPath.getLoader(Unknown Source)
at sun.misc.URLClassPath.getResource(Unknown Source)
at$ Source)
at Method)
at Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
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.
I agree. Here's the link:
subject: IllegalArgumentException with Ant
It's not a secret anymore!