[prev in list] [next in list] [prev in thread] [next in thread]
List: geronimo-dev
Subject: Re: Unable to locate provider for protocol: pop3
From: Alessandro PTQS <alessandro.pilonato () ptqs ! it>
Date: 2007-05-30 12:58:13
Message-ID: 10873103.post () talk ! nabble ! com
[Download RAW message or body]
Can you give me a simple example for use pop3 ?
I had downloaded geronimo 2.0 M5 and my code still doesn't work:
.
.
.
props.put("mail.pop3.port", "110");
Session session = Session.getDefaultInstance(props, null);
store = session.getStore("pop3");
store.connect(popServer, popUser, popPassword);
folder = store.getFolder("INBOX");
if (folder == null) throw new Exception("No POP3 INBOX");
folder.open(Folder.READ_WRITE);
.
.
.
.
the stacktrace is here:
javax.mail.MessagingException: Empty Response
at
org.apache.geronimo.javamail.store.pop3.POP3ResponseBuilder.buildResp
onse(POP3ResponseBuilder.java:64)
at
org.apache.geronimo.javamail.store.pop3.POP3Connection.sendCommand(PO
P3Connection.java:154)
at
org.apache.geronimo.javamail.store.pop3.message.POP3Message.getConten
tStream(POP3Message.java:88)
at
javax.mail.internet.MimePartDataSource.getInputStream(MimePartDataSou
rce.java:46)
at javax.activation.DataHandler.getInputStream(DataHandler.java:70)
at
javax.mail.internet.MimeMessage.getInputStream(MimeMessage.java:896)
at common.MailManager.saveMail(MailManager.java:105)
at common.MailManager.recieve(MailManager.java:67)
at common.ThreadMail.run(ThreadMail.java:12)
javax.mail.MessagingException: Unexpected response: 700
at
org.apache.geronimo.javamail.store.pop3.POP3ResponseBuilder.buildResp
onse(POP3ResponseBuilder.java:86)
at
org.apache.geronimo.javamail.store.pop3.POP3Connection.sendCommand(PO
P3Connection.java:154)
at
org.apache.geronimo.javamail.store.pop3.message.POP3Message.loadHeade
rs(POP3Message.java:175)
at
org.apache.geronimo.javamail.store.pop3.message.POP3Message.getHeader
(POP3Message.java:192)
at
javax.mail.internet.MimeMessage.getSingleHeader(MimeMessage.java:1525
)
at javax.mail.internet.MimeMessage.getSubject(MimeMessage.java:526)
thanks so much.
Rick McGuire wrote:
>
> Geronimo 1.1.1 does not have a pop3 provider. The 1.2 and 2.0 releases
> are the first releases where pop3 support was (will be) included.
>
> Rick
>
> Alessandro PTQS wrote:
> > Good morning,
> >
> > I would to know the functionality about pop3 javamail on geronimo 1.1.1.
> >
> > I premise that I already use the geronimo javamail smtp configuration.
> >
> > I have an application ear , with ejb 2.0.
> >
> > For smtp,
> >
> > I define the dependencies, a gbean on my geronimo-application.xml, I
> > define
> > the resource ref in my web.xml and geronimo-web.xml and my code look like
> > this:
> >
> > InitialContext context = new InitialContext();
> > Session mailSession = (Session)
> > context.lookup("java:comp/env/mail/MailSession");
> > Transport transport = mailSession.getTransport("smtp");
> >
> >
> > For smtp, the application works fine.
> >
> > What's wrong for pop3 ???
> >
> > What type of configuration I need to do ? In your documentation I didn't
> > find nothing.
> >
> > The exception throw is: "Unable to locate provider for protocol: pop3"
> >
> >
> > Thanks in advance.
> >
> >
> > Best regards,
> >
> > Alessandro Pilonato.
> >
>
>
>
--
View this message in context: \
http://www.nabble.com/Unable-to-locate-provider-for-protocol%3A-pop3-tf3832566s134.html#a10873103
Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic