Hi,
I am trying to compile a package under a common root. Since I don't
want the compile 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 modified my javac task and moved the
"oracle/apps/okc" part to the srcdir, the compiler recompiles all the
files each time, but never gave me an error like the above. Can someone
please give me some pointers? I am pretty clueless to this problem...
Zhendi Su
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>