You need to import javax.net in the manifest.

javax.*, packages are not automatically known to bundles.

/stephane

2009/1/10 Miguel <m...@moviquity.com>

>  I don't import this class: javax/net/SocketFactory because I thought I
> didnt need it.
>
> In my code, I import the following classes:
>
> import javax.mail.Message;
> import javax.mail.MessagingException;
> import javax.mail.PasswordAuthentication;
> import javax.mail.Session;
> import javax.mail.Transport;
> import javax.mail.internet.AddressException;
> import javax.mail.internet.InternetAddress;
> import javax.mail.internet.MimeMessage;
>
> and I have them into me manifest.
> Actually I dont have any javax.net import in my manifext.
> The point is that I have run my application into my eclipse framework and
> it works perfectly but when i run the app outside eclipse, i got the
> commented error.
>
> On Sat, 2009-01-10 at 10:49 +0100, Miguel wrote:
>
> Hello,
>
> I m running an OSGI platform which send mails. I m using the library
> javax/net/SocketFactory which is inside rt.jar but my OSGI platform doesnt
> find.
>
> Exception in thread "SendMailThread" java.lang.NoClassDefFoundError:
> javax/net/SocketFactory
>         at
> com.sun.mail.util.SocketFetcher.getSocketFactory(SocketFetcher.java:262)
>         at
> com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:150)
>         at
> com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1359)
>
> how can include this library in runtime enviroment?
>
> thank you ,
>
> M
>
>
> _______________________________________________
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev
>



-- 
http://perso.citi.insa-lyon.fr/sfrenot
work here : http://tinyurl.com/2ts4xf
sleep here : http://tinyurl.com/33p2gt
play here : http://tinyurl.com/3yarjz
---
Stephane Frenot
Université de Lyon, INRIA
INSA-Lyon, CITI, F-69621, France
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to