ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zhendi Su <Zhendi...@oracle.com>
Subject Javac NullPointerException -- Please help
Date Mon, 01 Apr 2002 23:56:14 GMT
Hi,

I am trying to compile a package under a common root.  Since I don't
want the compiler to recompile all the files over and over, I only
specified the root directory in my srcdir attribute and then used
include/exclude filters, as suggested in the user manual.  My javac task

is as follows:

<javac  srcdir="${JAVA_TOP}" includes="oracle/apps/okc/common/**"
destdir="${okcbasedir}/classes" target="1.1"
bootclasspath="${bootclasspath}" extdirs=" " depend="True"
failonerror="${javacfailonerror}" >

When I ran ant, however, it gave me an error:

 [javac] java.lang.NullPointerException
    [javac]     at sun.tools.java.Package.getSourceFile(Package.java,
Compiled Code)
    [javac]     at
sun.tools.javac.BatchEnvironment.loadDefinition(BatchEnvironment.java,
Compiled Code)
    [javac]     at
sun.tools.java.Environment.loadDefinition(Environment.java, Compiled
Code)
    [javac]     at
sun.tools.java.Environment.loadDefinition(Environment.java, Compiled
Code)
    [javac]     at
sun.tools.java.Environment.loadDefinition(Environment.java, Compiled
Code)
    [javac]     at
sun.tools.java.ClassDeclaration.getClassDefinitionNoCheck(ClassDeclaration.java,

Compiled Code)
    [javac]     at sun.tools.java.Imports.resolve(Imports.java, Compiled

Code)
    [javac]     at
sun.tools.javac.SourceClass.basicCheck(SourceClass.java, Compiled Code)
    [javac]     at
sun.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java,

Compiled Code)
    [javac]     at sun.tools.javac.Main.compile(Main.java, Compiled
Code)
    [javac]     at java.lang.reflect.Method.invoke(Native Method)
 [javac]     at
org.apache.tools.ant.taskdefs.compilers.Javac12.execute(Javac12.java,
Compiled Code)
    [javac]     at
org.apache.tools.ant.taskdefs.Javac.execute(Javac.java, Compiled Code)
    [javac]     at org.apache.tools.ant.Task.perform(Task.java, Compiled

Code)
    [javac]     at org.apache.tools.ant.Target.execute(Target.java,
Compiled Code)
    [javac]     at org.apache.tools.ant.Target.performTasks(Target.java,

Compiled Code)
    [javac]     at
org.apache.tools.ant.Project.executeTarget(Project.java, Compiled Code)
    [javac]     at
org.apache.tools.ant.Project.executeTargets(Project.java, Compiled Code)

    [javac]     at org.apache.tools.ant.Main.runBuild(Main.java,
Compiled Code)
    [javac]     at org.apache.tools.ant.Main.start(Main.java, Compiled
Code)
    [javac]     at org.apache.tools.ant.Main.main(Main.java, Compiled
Code)
    [javac] error: An exception has occurred in the compiler; please
file a bug report (http://java.sun.com/cgi-bin/bugreport.cgi).
    [javac] 1 error
    [javac] Compile failed, messages should have been provided.


The interesting thing is, if I change depend="True" to depend="False",
everything works fine.  But for our build it's desired that we check
dependencies during compilation.  Can someone
please give me some pointers?   Any help is appreciated.

Thanks!


Zhendi Su




Mime
View raw message