You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Zhendi Su <Zh...@oracle.com> on 2002/04/02 01:56:14 UTC

Javac NullPointerException -- Please help

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




Re: Javac NullPointerException -- Please help

Posted by Diane Holt <ho...@yahoo.com>.
Recommendation: File the bug report, as requested, and look into using
Ant's (optional) <depend> task instead of setting the 'depend' attribute.

Diane


=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://http://taxes.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>