cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vgritse...@hns.com>
Subject RE: [C2 patch] Jikes 1.14
Date Thu, 05 Jul 2001 18:14:51 GMT
Marcus,

I think I found the problem: I overlooked that fact that when printing the error, jikes sometimes
inserts empty string. This should be fixed now. Please test - hope last time.


> 	I had explicitly set 'line' to null so the first readline would always
> 	be executed (check the attached patch).

This should not be done as line may contain first line of the next error, and every
error is parsed into separate CompileError object. My result now looks like:
----------------------------------
org.apache.cocoon.components.language.LanguageException: Error compiling sitemap_xmap:
Line 0, column 0: Could not find package "java/util" in:                C:\Work\homepage\WEB-INF\work
Line 0, column 0: Could not find package "java/lang" in:                C:\Work\homepage\WEB-INF\work
----------------------------------
(that's when rt.jar is not in the path)

Vadim

> -----Original Message-----
> From: Marcus Crafter [mailto:crafterm@fztig938.bank.dresdner.net]
> Sent: Thursday, July 05, 2001 13:04
> To: cocoon-dev@xml.apache.org
> Subject: RE: [C2 patch] Jikes 1.14
> 
> 
> Hi Vadim,
> 
> On Thu, 5 Jul 2001, Vadim Gritsenko wrote:
> 
> > Done. 
> > 
> > Marcus, would you mind testing it one more time?
> 	
> 	No problem. We'll get there eventually! :-)
> 
> ERROR   14921   [cocoon  ] (Thread-25): Error compiling sitemap
> java.util.NoSuchElementException
>         at java.util.StringTokenizer.nextToken(StringTokenizer.java:235)
>         at org.apache.cocoon.components.language.programming.java.Jikes.parseError(Jikes.java:201)
>         at org.apache.cocoon.components.language.programming.java.Jikes.parseStream(Jikes.java:189)
>         at 
> org.apache.cocoon.components.language.programming.java.AbstractJavaCompiler.getErrors(AbstractJavaCompiler.java:114)
>         at org.apache.cocoon.components.language.programming.java.JavaLanguage.compile(JavaLanguage.java:191)
>         at 
> org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage.load(CompiledProgrammingLanguage
> .java:131)
> 
> 	From my observations, I think the problem lies in fact that 'line' is
> 	not set to null, when encountering the end of the first message.
> 
> 	This causes the first readline to be skipped, on my system pushing
> 	an empty (non-null) string onto the buffer. The second set of readlines
> 	immediately breaks because it actually reads the first line of the
> 	next error, not the rest of the error (which contain leading spaces).
> 
> 	This results in parseError being called with an empty string - and
> 	hence causing the exception above.
> 
> 	I had explicitly set 'line' to null so the first readline would always
> 	be executed (check the attached patch).
> 
> 	I also noticed that parseError does not build a complete error message
> 	on my system as nextToken() is only called once (delimited by newline).
> 	I've also added a test and loop to get all of the message in the
> 	attached patch.
> 
> 	Could it be that jikes is behaving differently between our systems ?
> 	Sounds like it.
> 
> 	I've also attached how my logfile, to compare against how it looks
> 	against your system.
> 
> 	Hope that helps.
> 
> 	Cheers,
> 
> 	Marcus
> 	
> -- 
>         .....
>      ,,$$$$$$$$$,      Marcus Crafter
>     ;$'      '$$$$:    Computer Systems Engineer
>     $:         $$$$:   Open Software Associates GmbH
>      $       o_)$$$:   82-84 Mainzer Landstrasse
>      ;$,    _/\ &&:'   60327 Frankfurt Germany
>        '     /( &&&
>            \_&&&&'     Email : Marcus.Crafter@osa.de
>           &&&&.        Business Hours : +49 69 9757 200
>     &&&&&&&:           After Hours    : +49 69 49086750
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message