NullPointerException when trying to load class

2011-07-13 Thread Olivier Bigard
Hi, We are using Felix 3.2.2 and sometimes following NPE occurs when Framework tries to load a class during Bundle startup: Caused by: java.lang.Exception: org.osgi.framework.BundleException: Activator start error in bundle XXX [167]. at

Moving fragment to Resolved state in fileinstall watched directory?

2011-07-13 Thread lili_ili
Hi I have a directory being watched by fileinstall. Fragment is copied to this directory after its host, and it automatically moves to Installed state. To make it Resolved, I need to either run resolve X command, or restart the server. Is there a way to solve it and resolve fragments located in

Re: NullPointerException when trying to load class

2011-07-13 Thread Richard S. Hall
Not aware of it. Is this something that you can give me a working test case? - richard On 7/13/11 9:46, Olivier Bigard wrote: Hi, We are using Felix 3.2.2 and sometimes following NPE occurs when Framework tries to load a class during Bundle startup: Caused by: java.lang.Exception:

Re: Moving fragment to Resolved state in fileinstall watched directory?

2011-07-13 Thread Richard S. Hall
If the host gets resolved first, then the fragment won't be able to attach to it since Felix doesn't support dynamic fragment attachment (and Equinox only supports it in a limited way). The most portable approach is to make sure the fragment is installed into the framework before the host is

RE: NullPointerException when trying to load class

2011-07-13 Thread Bigard Olivier
It's very hard for me to reproduce this problem, so I'm pretty sure I can't generate a working test case... Sorry about that... Olivier -Message d'origine- De : Richard S. Hall [mailto:he...@ungoverned.org] Envoyé : mercredi 13 juillet 2011 16:43 À : users@felix.apache.org Objet : Re:

Re: NullPointerException when trying to load class

2011-07-13 Thread Richard S. Hall
On 7/13/11 10:48, Bigard Olivier wrote: It's very hard for me to reproduce this problem, so I'm pretty sure I can't generate a working test case... Bummer. This area has changed a bit. You could try to reproduce it with the latest 3.3.0 snapshot from the Maven repo snapshot repo. I wouldn't

Re: Moving fragment to Resolved state in fileinstall watched directory?

2011-07-13 Thread lili_ili
Thank you, Richard. Can you recommend a java side solution? I have an installer code that copies the fragment to the watched directory. From there, I think to add a listener and after a fragment is started redeploy its host. Is there a simpler solution? thanks again Richard S. Hall wrote:

Re: Moving fragment to Resolved state in fileinstall watched directory?

2011-07-13 Thread Justin Edelson
Is code running inside the framework? If so, why not just install the bundle directly (and the refresh the host bundle) rather than mucking with FileInstall. Justin On Jul 13, 2011, at 12:03 PM, lili_ili svet...@gmail.com wrote: Thank you, Richard. Can you recommend a java side solution?

Re: Moving fragment to Resolved state in fileinstall watched directory?

2011-07-13 Thread Richard Hall
On Wed, Jul 13, 2011 at 12:03 PM, lili_ili svet...@gmail.com wrote: Thank you, Richard. Can you recommend a java side solution? I have an installer code that copies the fragment to the watched directory. From there, I think to add a listener and after a fragment is started redeploy its host.

Re: Moving fragment to Resolved state in fileinstall watched directory?

2011-07-13 Thread Achim Nierbeck
I might be naive, but I think this would be a great feature for felix. Often this is a real downside for using fragments that they don't get attached because the host bundle is already started, so you start tuning with startlevels which for me is just a bad workaround. Would this be a possible

Re: Maven bundle plugin and DynamicImport-Package

2011-07-13 Thread Alasdair Nottingham
How does exporting a package help? I don't have the package in my bundle, so that doesn't make sense to me. Alasdair On 12 July 2011 15:28, Peter Kriens peter.kri...@aqute.biz wrote: As you're VERY closely tied to the spec package I would just export the package ... Kind regards,

Re: Moving fragment to Resolved state in fileinstall watched directory?

2011-07-13 Thread Richard Hall
On Wed, Jul 13, 2011 at 4:11 PM, Achim Nierbeck bcanh...@googlemail.comwrote: I might be naive, Yes, you are. ;-) but I think this would be a great feature for felix. Often this is a real downside for using fragments that they don't get attached because the host bundle is already