Can't we use lazy initialization here? I had similar experience with
this class in the past, and think it should not be so fragile to
initialization sequence. And definitely it should not affect whole VM
run.

2006/10/18, Paulex Yang <[EMAIL PROTECTED]>:
A little further hack shows that, the cause is o.a.h.luni.util.Msg
cannot be initialized so early, which is the exception message i18n
helper class. Its static init codes try to load ResourceBundle but
failed. The new i18n helper o.a.h.l.internal.nls.Messages has same
issue. I modified the java.net.URL ln.296 as below, and the test passed.
-                throw new MalformedURLException(
-                        org.apache.harmony.luni.util.Msg.getString(
-                        "K00d8", spec)); //$NON-NLS-1$
+               throw new MalformedURLException("exception message here");

Leo Li wrote:
> Hi, all:
>     During the self-hosting of Derby, I found a security policy  if is
> applied will lead to errors in loading the class of JarFile. IBM vm
> will throw java/lang/UnsatisfiedLinkError: java/util/zip/ZipFile.ntvi
> while
> drlvm will crash with "SEH handler: shutdown errorSEH handler: too many
> shutdown errors..."
>
>     Here is the testcase:
>
>
> import java.util.jar.*;
> public class TestJarFile {
>
> public static void main(String[] args) throws Exception{
>  System.out.println(JarFile.CENATT);
>   }
>
> }
>
> And the attachment is the derby_tests.policy.
>
> Then run:
>
> java -Djava.security.manager
> -Djava.security.policy=derby_tests.policyTestJarFile
>
> Run passes,
>
> Harmony on IBM VM fails with java/lang/UnsatisfiedLinkError:
> java/util/zip/ZipFile.ntvi
>
> Harmony on Drlvm fails with SEH handler: shutdown errorSEH handler:
> too many
> shutdown errors
>
> If the security manager is not specified, Harmony passes.
>
>


--
Paulex Yang
China Software Development Lab
IBM


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to