This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
java.lang.NullPointerException when loading SSAX.scm in kawa-1.7
- From: Stan Pinte <stan at altosw dot be>
- To: kawa <Kawa List <kawa at sources dot redhat dot com>>
- Cc: sax-sxml at lists dot sourceforge dot net
- Date: Fri, 4 Jul 2003 16:28:59 +0200
- Subject: java.lang.NullPointerException when loading SSAX.scm in kawa-1.7
- Organization: Alto Software
hello,
when loading SSAX.scm, I am getting the following:
java.lang.NullPointerException
at gnu.expr.LambdaExp.allocChildClasses(LambdaExp.java:936)
at gnu.expr.LambdaExp.compileAsMethod(LambdaExp.java:1352)
at gnu.expr.LambdaExp.compileChildMethods(LambdaExp.java:1256)
at gnu.expr.Compilation.addClass(Compilation.java:1521)
at gnu.expr.Compilation.compile(Compilation.java:799)
at gnu.expr.ModuleExp.evalToClass(ModuleExp.java:54)
at gnu.expr.ModuleExp.evalModule(ModuleExp.java:166)
at kawa.Shell.run(Shell.java:232)
at kawa.standard.load.loadSource(load.java:162)
at kawa.standard.load.loadSource(load.java:131)
at kawa.standard.load.apply(load.java:233)
at kawa.standard.load.apply2(load.java:201)
at kawa.standard.load.apply1(load.java:191)
at gnu.mapping.Procedure1.applyN(Procedure1.java:49)
at gnu.mapping.Procedure.apply(Procedure.java:102)
at gnu.mapping.CallContext.runUntilDone(CallContext.java:258)
at gnu.expr.ModuleExp.evalModule(ModuleExp.java:188)
at kawa.Shell.run(Shell.java:232)
at kawa.standard.load.loadSource(load.java:162)
at kawa.standard.load.loadSource(load.java:131)
at kawa.standard.load.apply(load.java:233)
at kawa.Shell.runFile(Shell.java:295)
at kawa.repl.processArgs(repl.java:231)
at kawa.repl.main(repl.java:593)
the problem happens in this form:
; a few lines of validation code
(run-test (letrec
((consumer (lambda (fragment foll-fragment seed)
(cons* (if (equal? foll-fragment (string #\newline))
" NL" foll-fragment) fragment seed)))
(test (lambda (str expected-result)
(newline) (display "body: ") (write str)
(newline) (display "Result: ")
(let ((result
(reverse
(call-with-input-string (unesc-string str)
(lambda (port) (ssax:read-cdata-body port consumer '()))
))))
(write result)
(assert (equal? result expected-result)))))
)
(test "]]>" '())
(test "abcd]]>" '("abcd" ""))
(test "abcd]]]>" '("abcd" "" "]" ""))
(test "abcd]]]]>" '("abcd" "" "]" "" "]" ""))
(test "abcd]]]]]>" '("abcd" "" "]" "" "]" "" "]" ""))
(test "abcd]]]a]]>" '("abcd" "" "]" "" "]]" "" "a" ""))
(test "abc%r%ndef%n]]>" '("abc" " NL" "def" " NL"))
(test "%r%n%r%n]]>" '("" " NL" "" " NL"))
(test "%r%n%r%na]]>" '("" " NL" "" " NL" "a" ""))
(test "%r%r%r%na]]>" '("" " NL" "" " NL" "" " NL" "a" ""))
(test "abc&!!!]]>" '("abc" "&" "" "" "!!!" ""))
(test "abc]]>>&]]]>and]]>"
'("abc" "" "]]" "" "" ">" "" "&" "gt" "" "" "&" "amp" "" ";" "" "]" ""
"]]" "" "" ">" "and" ""))
))
I can mail my version of the SSAX library, to reproduce the example. (295K)
Should I run kawa using debugging options, to help sort out what happens?
thanks,
Stan.