ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Weintraub" <>
Subject Re: cannot resolve symbol
Date Tue, 23 Oct 2007 21:17:10 GMT
Well, it tells you the line that your build.xml was on when the error
failed, and the error (Cannot resolve symbol) and the symbol it cannot
resolve (getTxnGrps).

What is probably happening is that this class is in a JAR that isn't
in your classpath. If you look at the compiler error, you should see
the name of the program that was executing when this failed. If there
is no compiler output log, you can set the "verbose" and/or
"listfiles" to true in the <javac> task. That way, the files will be
listed, and you'll see which one is giving you the error.

What you need to do is:

1). Determine what is in your classpath. If you have a property that
contains the classpath, print it out before you execute this task. You
maybe missing a particular jar or class in your classpath. If you are
using a "refid" for a classpath, then convert it over to a property by
using the following syntax:

<property name="classpath_prop" refid="classpath">
<echo message="CLASSPATH = &quot;${classpath_prop}&quot;"/>

2). You will have to hunt down where this class is defined. I don't
think it is a standard class in any standard library (a Google search
pulled up nothing), so it may be something that is compiled in another
library and that library should be included in your classpath. Try a
text search of "getTxnGrps" in your source to see if you can find
where it is being defined.

3). If it isn't being defined in your source code, and if you're on
Unix, you may want to go through your jar directory and search through
all jars for a classfile where that class may be defined:

$ cd $JAR_DIR
$ find . -name "*.jar" | while read jar
echo "####JAR=$jar"
jar tvf $jar
echo ""
done > jar.output

Then search "jar.output" for a possible candidate classfile (With
luck, it will actually be called "getTxnGrps.class").

4). If nothing else worked, Find the developer who last worked on that
file, and ask them where "getTxnGrps" is defined. They should know.
Also, if you're using version control, find out when the code was
added to the file that caused this issue. That might help pinpoint why
this error occurred.

On 10/23/07, Chris Styles <> wrote:
> Hi,
> I'm trying to run an ant target manually, and I'm receiving the
> following error... How do I resolve this issue...???
> cannot resolve symbol
>     [javac] symbol  : method getTxnGrps ()
>     [javac] location: class com.s1.common.export.user.ExportFormValue
>     [javac]               txnGrpArray =
> getBaiTxnGrpList(value.getTxnGrps());
>     [javac]
> C:\CruiseControl\projects\mib\MIB_2.X_FWD_DEV_AIX-WAS-DB2\EP_US_PSO_2.X\
> build\build.xml:812: The following error occurred while executing this
> line:
> C:\CruiseControl\projects\mib\MIB_2.X_FWD_DEV_AIX-WAS-DB2\EP_US_PSO_2.X\
> build\build.xml:631: Compile failed; see the compiler error output for
> details.
> Thanks
> Chris

David Weintraub

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message