[sip-comm-dev] troubles with importing plugin's classes


#1

i'm having troubles with importing plugin's classes
importing has done without any errors
but while running this exception comes

     [java] java.lang.NoClassDefFoundError:
net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl


#2

Check your OSGi literature on how classes get exported from a bundle.
In your case, you're probably importing at compile time the
ProtocolProviderServiceJabberImpl class because all our sources live
in a single tree and the OSGi class visibility is not enforced but
after building, the classes get split into multiple bundles and only a
subset of them are visible out of their containing bundle.

···

On Thu, Dec 3, 2009 at 12:28 PM, Rasika Kariyawasam <kkrasika@gmail.com> wrote:

i'm having troubles with importing plugin's classes
importing has done without any errors
but while running this exception comes
[java] java.lang.NoClassDefFoundError:
net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

*is *

*org.osgi.framework.PackagePermission*

*that i have to use in order to do this ?*

*then i think i have to edit the existing *

*jabber bundle too.*

···

On Thu, Dec 3, 2009 at 4:34 PM, Lubomir Marinov <lubo@sip-communicator.org>wrote:

Check your OSGi literature on how classes get exported from a bundle.
In your case, you're probably importing at compile time the
ProtocolProviderServiceJabberImpl class because all our sources live
in a single tree and the OSGi class visibility is not enforced but
after building, the classes get split into multiple bundles and only a
subset of them are visible out of their containing bundle.

On Thu, Dec 3, 2009 at 12:28 PM, Rasika Kariyawasam <kkrasika@gmail.com> > wrote:
> i'm having troubles with importing plugin's classes
> importing has done without any errors
> but while running this exception comes
> [java] java.lang.NoClassDefFoundError:
>
net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#4

i used
Import-Package:net.java.sip.communicator.impl.protocol.jabber
then build was not successful

then i used
Import-Bundle:
net.java.sip.communicator.impl.protocol.jabber;version="[1.2.2.osgi,1.2.2.osgi]"
then build was ok
but again same NoClassDefFoundError comes

please give some solution

thanks in advance

···

On Thu, Dec 3, 2009 at 4:52 PM, Rasika Kariyawasam <kkrasika@gmail.com>wrote:

*is *

*org.osgi.framework.PackagePermission*

*that i have to use in order to do this ?*

*then i think i have to edit the existing *

*jabber bundle too.*

On Thu, Dec 3, 2009 at 4:34 PM, Lubomir Marinov <lubo@sip-communicator.org > > wrote:

Check your OSGi literature on how classes get exported from a bundle.
In your case, you're probably importing at compile time the
ProtocolProviderServiceJabberImpl class because all our sources live
in a single tree and the OSGi class visibility is not enforced but
after building, the classes get split into multiple bundles and only a
subset of them are visible out of their containing bundle.

On Thu, Dec 3, 2009 at 12:28 PM, Rasika Kariyawasam <kkrasika@gmail.com> >> wrote:
> i'm having troubles with importing plugin's classes
> importing has done without any errors
> but while running this exception comes
> [java] java.lang.NoClassDefFoundError:
>
net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#5

Hi,

you can take a look here
http://www.sip-communicator.org/index.php/Documentation/CreatingServices
about creating new osgi services. Also read this tutorial :
http://oscar-osgi.sf.net/tutorial/index.html, paying attention to the
import and export classes.
You cannot import and use in other bundle
net.java.sip.communicator.impl.protocol.jabber cause this package
hasn't been exported from other bundle. You only import and use
packages which has been exported by other bundles.

Cheers
damencho

···

On Fri, Dec 4, 2009 at 7:31 AM, Rasika Kariyawasam <kkrasika@gmail.com> wrote:

i used
Import-Package:net.java.sip.communicator.impl.protocol.jabber
then build was not successful
then i used
Import-Bundle:
net.java.sip.communicator.impl.protocol.jabber;version="[1.2.2.osgi,1.2.2.osgi]"
then build was ok
but again same NoClassDefFoundError comes
please give some solution
thanks in advance

On Thu, Dec 3, 2009 at 4:52 PM, Rasika Kariyawasam <kkrasika@gmail.com> > wrote:

is

org.osgi.framework.PackagePermission

that i have to use in order to do this ?

then i think i have to edit the existing

jabber bundle too.

On Thu, Dec 3, 2009 at 4:34 PM, Lubomir Marinov >> <lubo@sip-communicator.org> wrote:

Check your OSGi literature on how classes get exported from a bundle.
In your case, you're probably importing at compile time the
ProtocolProviderServiceJabberImpl class because all our sources live
in a single tree and the OSGi class visibility is not enforced but
after building, the classes get split into multiple bundles and only a
subset of them are visible out of their containing bundle.

On Thu, Dec 3, 2009 at 12:28 PM, Rasika Kariyawasam <kkrasika@gmail.com> >>> wrote:
> i'm having troubles with importing plugin's classes
> importing has done without any errors
> but while running this exception comes
> [java] java.lang.NoClassDefFoundError:
>
> net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net