You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jerry Brown <js...@hotels.com> on 2004/08/11 19:33:18 UTC

Having problems with reference not being found in 1.6.2

We have a set of scripts that were developed under Ant 1.5.4 that have
worked without problems. I need to migrate over to Ant 1.6.2 for another
project, and am having a problem.

We have a <fileset> that has an id, and it consists of a number of jars
that are used both as a classpath in the javac task, as well as a set of
files that we copy to the distribution. For this reason we gave it a
refid. Here is a snipppet of that: 

	    <fileset id="library.fileset" dir="${lib}">
		    <include name="${core_lib}lib/golfclient.jar"/>
		    <include name="${core_lib}lib/availability.jar"/>
		    <include name="${core_lib}lib/jedi.jar"/>
		    <include name="${core_lib}lib/search.jar"/>
		    <include name="${core_lib}lib/util.jar"/>
		    <include name="${core_lib}lib/utildb.jar"/>
		    <include name="${core_lib}lib/worldspan.jar"/>
		    <include
name="${contrib_lib}Apache/Axis/1.1/axis.jar"/>
		    <include
name="${contrib_lib}Apache/IBM/WSDL4J/1.4/wsdl4j.jar"/>
	    </fileset>
	    <!-- NOTE: must still set the compile.classpath here. It
just doesn't make sense to do it in targets.xml-->
	    <path id="compile.classpath">
	    	<fileset refid="library.fileset"/>
		<fileset dir="${lib}">
		    <include name="${dynamo_lib}DAS/classes.jar"/>
		    <include name="${dynamo_lib}DPS/classes.jar"/>
		    <include name="${dynamo_lib}DSS/classes.jar"/>
		</fileset>
	    </path>

At compile time, we call compile.classpath as part of the <javac> task:

	  <javac debug="${compile.debug}" srcdir="${src}"
destdir="${build}" target="${javac.target}">
            <classpath refid="compile.classpath"/>
        </javac>

As I said before, this has been working for months under Ant 1.5.4, but
now it is failing under 1.6.2:

	/export/home/builder/Sandboxes/Build/compile.xml:28: Reference
library.fileset not found.
        at
org.apache.tools.ant.types.Reference.getReferencedObject(Reference.java:
55)
        at
org.apache.tools.ant.types.Path.dieOnCircularReference(Path.java:467)
        at
org.apache.tools.ant.types.Path.dieOnCircularReference(Path.java:475)
        at org.apache.tools.ant.types.Path.list(Path.java:286)
        at org.apache.tools.ant.types.Path.toString(Path.java:354)
        at
org.apache.tools.ant.taskdefs.Property.execute(Property.java:359)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at
org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:64)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at net.sf.antcontrib.logic.IfTask.execute(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:123)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
        at
org.apache.tools.ant.Project.executeTargets(Project.java:1062)
        at org.apache.tools.ant.Main.runBuild(Main.java:673)
        at org.apache.tools.ant.Main.startAnt(Main.java:188)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)

Are there any changes in the way filesets or references are done in
1.6.2 that would affect us? Thanks in advance.


Jerry Brown

Re: Having problems with reference not being found in 1.6.2

Posted by Tom Starr <st...@u.washington.edu>.
Maybe it will be no help, but I had to rename /etc/ant.conf after 
upgrading to Ant 1.6 in order to overcome library problems - that was a 
valuable newbie lesson for me.

Jerry Brown wrote:
> We have a set of scripts that were developed under Ant 1.5.4 that have
> worked without problems. I need to migrate over to Ant 1.6.2 for another
> project, and am having a problem.
> 
> We have a <fileset> that has an id, and it consists of a number of jars
> that are used both as a classpath in the javac task, as well as a set of
> files that we copy to the distribution. For this reason we gave it a
> refid. Here is a snipppet of that: 
> 
> 	    <fileset id="library.fileset" dir="${lib}">
> 		    <include name="${core_lib}lib/golfclient.jar"/>
> 		    <include name="${core_lib}lib/availability.jar"/>
> 		    <include name="${core_lib}lib/jedi.jar"/>
> 		    <include name="${core_lib}lib/search.jar"/>
> 		    <include name="${core_lib}lib/util.jar"/>
> 		    <include name="${core_lib}lib/utildb.jar"/>
> 		    <include name="${core_lib}lib/worldspan.jar"/>
> 		    <include
> name="${contrib_lib}Apache/Axis/1.1/axis.jar"/>
> 		    <include
> name="${contrib_lib}Apache/IBM/WSDL4J/1.4/wsdl4j.jar"/>
> 	    </fileset>
> 	    <!-- NOTE: must still set the compile.classpath here. It
> just doesn't make sense to do it in targets.xml-->
> 	    <path id="compile.classpath">
> 	    	<fileset refid="library.fileset"/>
> 		<fileset dir="${lib}">
> 		    <include name="${dynamo_lib}DAS/classes.jar"/>
> 		    <include name="${dynamo_lib}DPS/classes.jar"/>
> 		    <include name="${dynamo_lib}DSS/classes.jar"/>
> 		</fileset>
> 	    </path>
> 
> At compile time, we call compile.classpath as part of the <javac> task:
> 
> 	  <javac debug="${compile.debug}" srcdir="${src}"
> destdir="${build}" target="${javac.target}">
>             <classpath refid="compile.classpath"/>
>         </javac>
> 
> As I said before, this has been working for months under Ant 1.5.4, but
> now it is failing under 1.6.2:
> 
> 	/export/home/builder/Sandboxes/Build/compile.xml:28: Reference
> library.fileset not found.
>         at
> org.apache.tools.ant.types.Reference.getReferencedObject(Reference.java:
> 55)
>         at
> org.apache.tools.ant.types.Path.dieOnCircularReference(Path.java:467)
>         at
> org.apache.tools.ant.types.Path.dieOnCircularReference(Path.java:475)
>         at org.apache.tools.ant.types.Path.list(Path.java:286)
>         at org.apache.tools.ant.types.Path.toString(Path.java:354)
>         at
> org.apache.tools.ant.taskdefs.Property.execute(Property.java:359)
>         at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.tools.ant.Target.performTasks(Target.java:369)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
>         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
>         at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.tools.ant.Target.performTasks(Target.java:369)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
>         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
>         at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at
> org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:64)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at net.sf.antcontrib.logic.IfTask.execute(Unknown Source)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at
> org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:123)
>         at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.tools.ant.Target.performTasks(Target.java:369)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
>         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
>         at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.tools.ant.Target.performTasks(Target.java:369)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
>         at
> org.apache.tools.ant.Project.executeTargets(Project.java:1062)
>         at org.apache.tools.ant.Main.runBuild(Main.java:673)
>         at org.apache.tools.ant.Main.startAnt(Main.java:188)
>         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
>         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
> 
> Are there any changes in the way filesets or references are done in
> 1.6.2 that would affect us? Thanks in advance.
> 
> 
> Jerry Brown


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org