felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall (JIRA)" <j...@apache.org>
Subject [jira] Commented: (FELIX-1032) NPE on URL#openStream()
Date Tue, 19 May 2009 14:03:45 GMT

    [ https://issues.apache.org/jira/browse/FELIX-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12710736#action_12710736

Richard S. Hall commented on FELIX-1032:

I think I need to understand your scenario better. You update A and on its activation it scans
all active bundles for resources, right? Do you stop A before performing the update or do
you just update the active bundle? Are you performing a refresh? Does the scan happen before,
after, or before and after (if you are not stopping the bundle) the refresh? If you reduce
the number of bundles, does it still produce the error? Are you using any threads in A or
just the calling thread?

> NPE on URL#openStream()
> -----------------------
>                 Key: FELIX-1032
>                 URL: https://issues.apache.org/jira/browse/FELIX-1032
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.4.1, felix-1.6.0, felix-1.6.1, felix-1.8.0
>         Environment: Linux bono 2.6.28-6-generic #17-Ubuntu SMP Fri Jan 30 15:34:36 UTC
2009 i686 GNU/Linux
> java version "1.6.0_13"
> Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
> Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)
>            Reporter: Martin Zdila
>            Priority: Critical
>         Attachments: hack.patch
> Note that also affected is felix-1.6.0 (it is not in the list).
> I am often getting NPE with the following code:
> new URL("bundle://66.0:0/somewhere/my.resource" /* or any other bundle:// URL */).openStream();
> java.lang.NullPointerException
> 	at java.util.zip.Inflater.ensureOpen(Inflater.java:336)
> 	at java.util.zip.Inflater.getBytesWritten(Inflater.java:296)
> 	at java.util.zip.ZipFile$1.available(ZipFile.java:243)
> 	at org.apache.felix.framework.URLHandlersBundleURLConnection.connect(URLHandlersBundleURLConnection.java:125)
> 	at org.apache.felix.framework.URLHandlersBundleURLConnection.getInputStream(URLHandlersBundleURLConnection.java:134)
> 	at java.net.URL.openStream(URL.java:1009)
> It is not allways reproducible. The first call causes the NPE and the second call with
the same URL string goes without problems.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message