dev@glassfish.java.net

Re: Windows Build Broken

From: Bill Shannon <bill.shannon_at_sun.com>
Date: Thu, 17 Sep 2009 10:51:46 -0700

Jane Young wrote on 9/17/09 3:34 AM:
>
> I'm also seeing the build failure in Windows.
> Caused by: java.io.EOFException
> at java.io.DataInputStream.readInt(DataInputStream.java:375)
> at
> sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:628)
> at
> sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:38)
> at java.security.KeyStore.load(KeyStore.java:1185)
> at
> com.sun.enterprise.security.ssl.SecuritySupportImpl.loadKS(SecuritySupportImpl.java:194)
>
> at
> com.sun.enterprise.security.ssl.SecuritySupportImpl.loadStores(SecuritySupportImpl.java:147)
>
>
> and as Byron pointed out it's because the files in
> <home>\.glassfishv3-build\config are empty
> The files are empty because the NullPointerException is thrown in
> /security/core/src/main/java/com/sun/enterprise/security/common/Util.java:
> line 149
>
> //Util.java
> InputStream iStream =
> Util.class.getClassLoader().getResourceAsStream("config"+File.separator
> + fileName);
>
> while (iStream.available() > 0) { <-- line 149
> oStream.write(iStream.read());
> }
>
> iStream is null.... but the files are there in
> v3\security\core\target\classes\config.
> Can someone from security team take a look at this? In the meantime can
> we disable the ejb.EmbeddedTest since it's breaking Windows build?

No doubt someone is catching Exception and hiding this error? Grrr...

I believe resources are always named using URL syntax (forward slashes)
instead of file syntax. The code above is buggy, which is why it fails
on Windows.