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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "IllegalArgumentException with Ant" Watch "IllegalArgumentException with Ant" New topic
Author

IllegalArgumentException with Ant

Unnsse Khan
Ranch Hand

Joined: Nov 12, 2001
Posts: 511
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.....
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.
 
wood burning stoves
 
subject: IllegalArgumentException with Ant
 
Similar Threads
Problem loading applet from servlet - load: xxx.class not found
Error whiile using JBoss Tool with eclips
executable jar build by JBuilderX, NoClassDefFoundError!!
My applet is not being seen in its jar anymore. Please help!
Applet not loading due to IOException