#152 JCompile fails on nonexisting classpath

open
nobody
None
1
2003-08-08
2003-08-07
Hedzer van Dijk
No

I'm doing a compile of a plugin I'm writing. The
compile works out fine under ant but fails when i try
to use JCompile. Below is the errorstack shown in
JCompile and below that is the activity log.
Compiling
D:\java\source\jedit\jars\RegXtract\RegXtract.java...

Command line:

javac -classpath
C:\java\source\jedit;D:\java\source\jedit\jars\RegXtract
-g D:\java\source\jedit\jars\RegXtract\RegXtract.java

An exception has occurred in the compiler (1.4.0).
Please file a bug at the Java Developer Connection
(http://java.sun.com/cgi-bin/bugreport.cgi) after
checking the Bug Parade for duplicates. Include your
program and the following diagnostic in your report.
Thank you.

java.lang.ArrayIndexOutOfBoundsException: Array index
out of range: -230

at org.gjt.sp.jedit.Buffer.getLineOfOffset(Unknown Source)

at
errorlist.DefaultErrorSource$DefaultError.getLineNumber(Unknown
Source)

at errorlist.DefaultErrorSource.addError(Unknown Source)

at
jcompiler.JCompilerTask$PendingError.send(JCompilerTask.java:378)

at
jcompiler.JCompilerTask.outputText(JCompilerTask.java:180)

at jcompiler.JCompiler$Output.flush(JCompiler.java:898)

at jcompiler.JCompiler$Output.write(JCompiler.java:888)

at java.io.OutputStream.write(OutputStream.java:99)

at java.io.PrintStream.write(PrintStream.java:258)

at
sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:334)

at
sun.nio.cs.StreamEncoder$CharsetSE.implFlushBuffer(StreamEncoder.java:403)

at
sun.nio.cs.StreamEncoder$CharsetSE.implFlush(StreamEncoder.java:407)

at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:150)

at
java.io.OutputStreamWriter.flush(OutputStreamWriter.java:213)

at java.io.BufferedWriter.flush(BufferedWriter.java:230)

at java.io.PrintWriter.flush(PrintWriter.java:120)

at
com.sun.tools.javac.v8.util.Log.printErrLine(Log.java:227)

at
com.sun.tools.javac.v8.util.Log.printError(Log.java:244)

at com.sun.tools.javac.v8.util.Log.error(Log.java:294)

at com.sun.tools.javac.v8.util.Log.error(Log.java:260)

at
com.sun.tools.javac.v8.comp.Enter$MemberEnter.importAll(Enter.java:632)

at
com.sun.tools.javac.v8.comp.Enter$MemberEnter._case(Enter.java:742)

at
com.sun.tools.javac.v8.tree.Tree$Import.visit(Tree.java:399)

at
com.sun.tools.javac.v8.comp.Enter$MemberEnter.memberEnter(Enter.java:692)

at
com.sun.tools.javac.v8.comp.Enter$MemberEnter.memberEnter(Enter.java:704)

at
com.sun.tools.javac.v8.comp.Enter$MemberEnter._case(Enter.java:726)

at
com.sun.tools.javac.v8.tree.Tree$TopLevel.visit(Tree.java:382)

at
com.sun.tools.javac.v8.comp.Enter$MemberEnter.memberEnter(Enter.java:692)

at
com.sun.tools.javac.v8.comp.Enter$CompleteEnter.complete(Enter.java:831)

at
com.sun.tools.javac.v8.code.Symbol.complete(Symbol.java:375)

at
com.sun.tools.javac.v8.code.Symbol$ClassSymbol.complete(Symbol.java:697)

at com.sun.tools.javac.v8.comp.Enter.main(Enter.java:583)

at
com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:376)

at com.sun.tools.javac.v8.Main.compile(Main.java:526)

at com.sun.tools.javac.Main.compile(Main.java:32)

at
sun.reflect.GeneratedMethodAccessor83.invoke(Unknown
Source)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at jcompiler.JCompiler.invokeCompiler(JCompiler.java:301)

at jcompiler.JCompiler.compile(JCompiler.java:189)

at jcompiler.JCompilerTask.run(JCompilerTask.java:116)

An error occured invoking the Java compiler class
com.sun.tools.javac.Main!

The detailed error message was:

java.lang.ArrayIndexOutOfBoundsException: Array index
out of range: -230

Please report this message and any further messages
from the Activity Log to the current maintainer of
JCompiler. Thank you.

JCompiler ready.

======Activity log========

<html><ol>
<li>[error] JCompiler: The compiler method itself just
threw a runtime exception:
<li>[error] JCompiler:
java.lang.ArrayIndexOutOfBoundsException: Array index
out of range: -230
<li>[error] JCompiler: at
org.gjt.sp.jedit.Buffer.getLineOfOffset(Unknown Source)
<li>[error] JCompiler: at
errorlist.DefaultErrorSource$DefaultError.getLineNumber(Unknown
Source)
<li>[error] JCompiler: at
errorlist.DefaultErrorSource.addError(Unknown Source)
<li>[error] JCompiler: at
jcompiler.JCompilerTask$PendingError.send(JCompilerTask.java:378)
<li>[error] JCompiler: at
jcompiler.JCompilerTask.outputText(JCompilerTask.java:180)
<li>[error] JCompiler: at
jcompiler.JCompiler$Output.flush(JCompiler.java:898)
<li>[error] JCompiler: at
java.io.PrintStream.flush(PrintStream.java:136)
<li>[error] JCompiler: at
sun.nio.cs.StreamEncoder$CharsetSE.implFlush(StreamEncoder.java:409)
<li>[error] JCompiler: at
sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:150)
<li>[error] JCompiler: at
java.io.OutputStreamWriter.flush(OutputStreamWriter.java:213)
<li>[error] JCompiler: at
java.io.BufferedWriter.flush(BufferedWriter.java:230)
<li>[error] JCompiler: at
java.io.PrintWriter.flush(PrintWriter.java:120)
<li>[error] JCompiler: at
com.sun.tools.javac.v8.util.Log.flush(Log.java:138)
<li>[error] JCompiler: at
com.sun.tools.javac.v8.JavaCompiler.flush(JavaCompiler.java:460)
<li>[error] JCompiler: at
com.sun.tools.javac.v8.Main.compile(Main.java:548)
<li>[error] JCompiler: at
com.sun.tools.javac.Main.compile(Main.java:32)
<li>[error] JCompiler: at
sun.reflect.GeneratedMethodAccessor83.invoke(Unknown
Source)
<li>[error] JCompiler: at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
<li>[error] JCompiler: at
java.lang.reflect.Method.invoke(Method.java:324)
<li>[error] JCompiler: at
jcompiler.JCompiler.invokeCompiler(JCompiler.java:301)
<li>[error] JCompiler: at
jcompiler.JCompiler.compile(JCompiler.java:189)
<li>[error] JCompiler: at
jcompiler.JCompilerTask.run(JCompilerTask.java:116)
<li>[debug] JCompilerTask: Thread[JCompilerTask,6,main]
ends.
</ol></html>

Hope this helps,
regards, Hedzer

Discussion

    • priority: 5 --> 1
    • summary: JCompile fails on plugin --> JCompile fails on nonexisting classpath
     
  • Logged In: YES
    user_id=840039

    It seems to be more of a user error: the classpath is wrong,
    the directory c:\java\source\jedit does not exist. The error
    might be handled in a more user friendly way though. I
    lowered the status to 1.