Hi Richard,

  Thank you for replying so quickly.

  If you install fragment bundle before host-bundle, this error will occur when 
we shutdown the framework.

  This exception didn't kill the application, it just display a exception stack 
message on console.


ERROR: Bundle HelloworldImpl [2] Error detaching fragments. 
(java.lang.NullPointerException)
java.lang.NullPointerException
        at java.util.ArrayList.<init>(Unknown Source)
        at 
org.apache.felix.framework.ModuleImpl.attachFragments(ModuleImpl.java:1183)
        at 
org.apache.felix.framework.BundleImpl.closeModules(BundleImpl.java:138)
        at org.apache.felix.framework.BundleImpl.close(BundleImpl.java:101)
        at 
org.apache.felix.framework.Felix$SystemBundleActivator.stop(Felix.java:4593)
        at 
org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:651)
        at org.apache.felix.framework.Felix.stopBundle(Felix.java:2226)
        at org.apache.felix.framework.Felix$3.run(Felix.java:876)
        at java.lang.Thread.run(Unknown Source)


2011-04-03 



Huisheng Xu



发件人: Richard S. Hall 
发送时间: 2011-04-03  01:15:31 
收件人: users 
抄送: 
主题: Re: Could we check Null when attachFragments in felix-framework-3.20 
 
Can you tell me how to reproduce this?
-> richard
On 04/02/2011 06:40 AM, echo_o wrote:
> Hi guys,
>
> After I upgrade felix framework from 3.0.9 to 3.2.0,  I met an error like 
> this:
>
> java.lang.NullPointerException
>          at java.util.ArrayList.<init>(ArrayList.java:131)
>          at 
> org.apache.felix.framework.ModuleImpl.attachFragments(ModuleImpl.java:1183)
>          at 
> org.apache.felix.framework.BundleImpl.closeModules(BundleImpl.java:138)
>          at org.apache.felix.framework.BundleImpl.close(BundleImpl.java:101)
>          at 
> org.apache.felix.framework.Felix$SystemBundleActivator.stop(Felix.java:4593)
>          at 
> org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:651)
>          at org.apache.felix.framework.Felix.stopBundle(Felix.java:2226)
>          at org.apache.felix.framework.Felix$3.run(Felix.java:876)
>          at java.lang.Thread.run(Thread.java:619)
>
> It seems that there is no Null checking when felix close a Module with 
> fragments.  Here is the codes from ModuleImpl.java, line 1183.
>
> List<Wire>  hostWires = new ArrayList<Wire>(m_fragments.get(i).getWires());
>
> It would be better to check whether getWires() return null before using it.  
> Thank you very much
>
> 2011-04-02
>
>
>
> echo_o
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to