Bug#413116: jamvm issues with java.util.logging

Michael Koch konqueror at gmx.de
Fri Mar 16 23:13:34 CET 2007


On Fri, Mar 16, 2007 at 01:47:14AM +0100, Nicolas François wrote:
> Hello Michael,
> 
> On Thu, Mar 15, 2007 at 09:35:59AM +0100, Michael Koch wrote:
> > 
> > Well I consider "jamvm -cp Test.jar Test" and "jamvm -jar Test.jar" not
> > working a major issue. If I wouldn't, we wouldn't need a fix for this.
> > These two are the main usecases for every Java runtime and should just
> > work.
> 
> I don't deny it's a bug;)
> 
> The (later) problem is caused by an exception thrown in LogManager.
> 
> jamvm do not support Exception before the end of the VM init.
> 
> I think this is a bug in jamvm, which considers it is still in the
> initialization when it executes the main class (when the class comes from
> a jar).
> 
> (I've not deeply investigated it, but it is probably the main thread which
> is started too early, or jamvm should allow Exception even if the
> initialization is not finished)
> Feel free to clone and reassign the clone to jamvm.
> I don't think this jamvm bug is critical.
> It can be reproduced with:
> =================================================
> public class Test {
>     public static void main(String argv[]) {
>         try { throw new java.lang.Exception("foo"); }
>         catch (Exception e) { System.out.println("catched"); }
>     }
> }
> =================================================
> 
> 
> 
> As the original issue is solved by 0.92-4, I had a look at the diff
> between 0.91-3 and 0.92-4. I don't think the upstream changes can be
> backported to t-p-u.
> 
> In 0.91-3,
>     new URL(url).openStream();
> throws an exception when url is a non existent file. And no exceptions is
> thrown with 0.92-4.
> 
> The changes involve java/net/URL* and gnu/java/net/loader/* (e.g.
> gnu/java/net/loader/FileURLLoader.java do not throw an exception if the
> file does not exist).
> 
> I don't think it's worth reviewing the upstream diff (diffstat indicate
> ~2kloc for the above mentioned files; which could probably be reduced, but
> need a deep understanding of what is done), and LogManager can safely test
> if the file exists and fall back with a default properties file if the
> file is not found (see attached patch).
> 
> I consider this part of the patch as an hack, but it is safe, and fix the
> `jamvm -jar Test.jar' use case.

I agree. I currently upload a a new classpath with your patch applied to
t-p-u. Thanks for your help.


Cheers,
Michael
-- 
 .''`.  | Michael Koch <konqueror at gmx.de>
: :' :  | Free Java Developer <http://www.classpath.org>
`. `'   |
  `-    | 1024D/BAC5 4B28 D436 95E6 F2E0 BD11 5923 A008 2763 483B




More information about the pkg-java-maintainers mailing list