This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: compiling macros to class yields foo.<init>(foo.scm) error whenl oading


Hoehle, Joerg-Cyril wrote:

Hi,

I posted an alternative to brl-repeat to the brl-users list some time ago. I did not mention then that I had delayed sending it because I haven't yet managed to turn the .scm file into .class files. I wonder if there's a bug in Kawa or something I'm missing.

Here's how I compile:
java -cp D:/Java/jakarta-tomcat-4.1.29/shared/lib/kawa-1.7.jar;D:/Java/jakarta-tomcat-4.1.29/shared/lib/brl-2.2.1.jar;. kawa.repl -P jch. -P jch. -C patches2.scm
(compiling patches2.scm)

Then I attempt to load the class file:
#|kawa:43|# (require <jch.patches2>)
java.lang.NullPointerException
	at gnu.mapping.OutPort.write(OutPort.java:199)
	at java.io.PrintWriter.print(Unknown Source)
	at gnu.mapping.OutPort.print(OutPort.java:285)
	at java.io.PrintWriter.println(Unknown Source)
	at java.lang.Throwable.printStackTrace(Unknown Source)
	at kawa.Shell.run(Shell.java:267)

This looks familiar, though I don't remember what the actual issue was. It's possible this was fixed by this change:

2003-11-20 Per Bothner <per@bothner.com>

* kawa/Shell.java (run): Better error robustness.

Unfortunately, this was after 1.7.90.  If you have problems
with CVS, perhaps someone else can test this?

> #|kawa:1|# (load"jch/patches2.class")
> java.lang.NullPointerException
>	at jch.patches2.<init>(patches2.scm)
	
I assume this is a bug in your code.  It's unfortunate we're not getting
a line number in the stack trace.  I have made some improvements to add
line numbers in more places, which might help.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]