Re: Error loading heap from jar

Matthias Radestock <[email protected]> Tue, 06 Jun 2006 09:22:22 +0100
Newsgroups gmane.comp.java.sisc.devel
Message-ID <[email protected]>
Norman Gray <[email protected]> writes:

> I'm getting a NullPointerException when SISC loads its heap from a  
> jar file (this is within Tomcat).
>
> The stack trace is below.  This is using the CVS HEAD as of 30-or-so  
> minutes ago.  I'm using the default heap, loaded using the defaults- 
> for-everything interface.
> 
> [snip]
>
> Bizarrely, this also fails in 1.13.7, with a different stack trace  
> (also below).  This is bizarre since the only diffs between r1_13_5  
> and r1_13_7 are the fixes to the comparing-null-lists bug, in src/ 
> sisc/data/Nothing.java and src/sisc/data/EmptyList.java, plus a  
> couple of minor changes in SRFIs (I haven't forgotten that I'm  
> supposed to be reviewing the accumulated srfi-19 changes).  It's not  
> obvious to me how they'd have such an effect (I have, by the way,  
> remembered to extract sisc-heap.jar using scheme-src/build-heapjar.scm).
>
> I'm rather up against a deadline this week (I really _must_ get  
> started on that poster!), but if you think a further reduction would  
> be useful I can try to produce one.
>
> [snip]
>
> java.lang.NullPointerException
>          sisc.util.FreeReference.hashCode(FreeReference.java:88)
>          sisc.exprs.FreeReferenceExp.hashCode(FreeReferenceExp.java:68)
>          java.util.HashMap.hash(HashMap.java:264)
>          java.util.HashMap.put(HashMap.java:382)
>          sisc.data.Expression.deserializeAnnotations(Expression.java:86)
>          sisc.ser.SLL2Deserializer.initializeExpression 
> (SLL2Deserializer.java:101)
>
> [snip]

Norman,

The problems has all the hallmarks of a heap/jar mismatch. Are you sure
you have the right heap paired up with the various sisc jars?

The stack trace indicates that a FreeReferenceExp is used as an
annotation key. AFAIK no SISC code does that, and it would actually be
quite a tricky piece of code to write.

If you cannot find a heap/jar mismatch, perhaps you could try writing a
little main() that calls into SISC in the same way the servlet container
does. That way we can investigate the problem much easier, without
needing a servlet container.


Matthias.