on 07-15-2009 9:22 PM
Hi Experts,
We wrote JavaMail API to read Gmail emails within the WD. When we run the application from WD I got the following exception. When we run as standalone application using JDK1.4.2_07 and JDK1.4.2_19, it works fine. it looks like security provider class missing or not loaded in to the Web AS Java.
Is there jar file which i have to added to the project?
No provider for imaps
javax.mail.Session.getProvider(Session.java:289)
I appreciate your help.
Thanks,
Ramana.
Thanks for quick reply.
I tried using the below code. I still get the "no provider for imaps" at store.connect method. it works when I run as standalone program. I get the below error when run from WD. It seems like some jar file missing with in the proj class path.
String host = "imap.gmail.com";
String username = "xxxxx"
String password = "xxxxx";
Properties props = System.getProperties();
props.put( "domain", "true" );
//Class.forName("com.sun.net.ssl.internal.ssl.Provider");
Context initialContext = new InitialContext( props );
Session session = ( Session )initialContext.lookup( "java:comp/env/mail/MailSession" );
//Session session = Session.getInstance(props);
Store store = session.getStore("imaps");
store.connect(host,username,password); //
Thanks,
Ramana.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use this one
javax.mail.Session object
Regards,
sunaina Reddy T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check this thread similar prob got resloved
for security
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.