Jane Young wrote:
> Marina Vatkina wrote:
>
>> Bill Shannon wrote:
>>
>>> 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...
>>
>>
>> This is per JDK design:
>>
> But if iStream is null, "iStream.available()" returns
> NullPointerException and there should be a check for that.
> I think Bill is right that getResourceStream uses URL syntax and it's
> not able to find the file with the Window's File.separator.
> This is a bug in the code.
I don't argue that :)
thanks,
-marina
>
> Jane
>
>> Returns:
>> A InputStream object or null if no resource with this name is found
>>
>> -marina
>>
>>>
>>> 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.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>