Hi,

You have to make that bundle import javax.naming in Import-Package.
All packages not in java.* have to be explicitly imported in the
manifest if you want to use them.
My guess is that you used PDE to create your manifest, and
unfortunately it doesn't show errors on missing JRE package imports
(and uses a launcher, Equinox Launcher, that uses the bootdelegation
property that makes these problems invisible).

A manifest generation tool like Bnd would probably help you get your
manifest right.

(btw, if you had that import-package line, and a package was not
resolved, you would get an error when installing the bundle instead of
a runtime error).

Hope this helps,

Simon

On Mon, Feb 28, 2011 at 12:11 PM, Filip Nguyen <nguyen.fi...@gmail.com> wrote:
> Hello,
> I am begining to use Apache felix. I have problem that one of my bundles
> wants to access MQ. I use ActiveMQ jars to do this (I packaged them into the
> bundle) but when trying to use ActiveMQConnectionFactory I am getting
> exception:
> java.lang.NoClassDefFoundError: javax/naming/Referenceable
>
> I found that this dependency is in rt.jar (meaning in JDK).
>
> How come? I thought that felix bundles run in context where rt.jar is on
> classpath. What's the best approach to remedy my problems?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
> For additional commands, e-mail: users-h...@felix.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org

Reply via email to