Closed glassfishrobot closed 15 years ago
@glassfishrobot Commented shaline@java.net said: Created an attachment (id=2751) ant task log file
@glassfishrobot Commented shaline@java.net said: Created an attachment (id=2752) server.log
@glassfishrobot Commented @sivakumart said: Request Jagadish to investigate
@glassfishrobot Commented @h2002044 said: I guess, our mail server does not allow IMAP, it has to be imaps. Whereas the sample application supports only "imap"
NOTES:
Attaching a sample code (plain java that will use imap for our mail server and will fail with the same exception as seen in server.log).
Steps to reproduce :
Set the HOST, USERNAME, PASSWORD in the attached source
javac -classpath /glassfishv3/glassfish/modules/javax.mail.jar:. InboxReader.java
java -classpath /glassfishv3/glassfish/modules/javax.mail.jar:. InboxReader
javax.mail.MessagingException: No login methods supported!; nested exception is: com.sun.mail.iap.ProtocolException: No login methods supported! at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:609) at javax.mail.Service.connect(Service.java:291) at javax.mail.Service.connect(Service.java:172) at InboxReader.main(InboxReader.java:18) Caused by: com.sun.mail.iap.ProtocolException: No login methods supported! at com.sun.mail.imap.IMAPStore.login(IMAPStore.java:662) at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:589) ... 3 more
If you have ubuntu, probably you can have a mail server of your own and try: You can refer : https://help.ubuntu.com/community/MailServer
I used "postfix" as mail transfer agent and "courier" as mail delivery agent.
@glassfishrobot Commented @h2002044 said: Created an attachment (id=2765) java source
@glassfishrobot Commented judytangs said: In today's SDK pteam, it was suggested to raise this to P1 to fix for JavaOne release.
@glassfishrobot Commented @h2002044 said: please refer the above evaluation as even a standalone java client will fail with same exception.
@glassfishrobot Commented shaline@java.net said: The documentation provided with the mail-connector sample application is not clear and does not mention how to setup a mail server of our own to test the sample. Sample documentation should clearly list the steps to setup a mail server to test this application.
@glassfishrobot Commented @h2002044 said: It is not possible to provide complete documentation on how to setup a mail server. Instead, I have added a note to use any mail server that supports SMTP and IMAP. Also, provided a link to a simple mail server URL and its documentation against which the sample application works.
Checking in docs/index.html; /cvs/glassfish-samples/ws/javaee6/connectors/apps/mailconnector/docs/index.html,v <-- index.html new revision: 1.6; previous revision: 1.5 done
Added the following note in mail connector docs :
Mail Servers
Note : It is possible to use any mail server which supports SMTP and IMAP
eg: Dwarf mail server has simple steps to setup the mail server and use for this sample application. Refer the <a href="http://158.195.16.189/doc/mail/index.html">documentation for more details.
@glassfishrobot Commented shaline@java.net said: Tested the sample with the mock-javamail server, and the sample works fine after following the instructions sent by developer for b03a. But in b03b , the connector samples document is not updated with the mock-javamail server setup, and Glassfish configuration. Please put these instructions in the samples document.
@glassfishrobot Commented @h2002044 said: "Mail Servers : Note : It is possible to use any mail server which supports SMTP and IMAP eg: Dwarf mail server</a has simple steps to setup the mail server and use for this sample application. Refer the <a href="http://158.195.16.189/doc/mail/index.html">documentation for more details.
The above installation works for me out of the box. No configuration change required, even the email id shown in the mail-connector sample application is configured already in the referred product.
@glassfishrobot Commented shaline@java.net said: Used the mocK javamail server,and was able to query the mail server for new messages.
@glassfishrobot Commented File: ant.log Attached By: shaline@java.net
@glassfishrobot Commented File: InboxReader.java Attached By: @h2002044
@glassfishrobot Commented File: server.log Attached By: shaline@java.net
@glassfishrobot Commented This issue was imported from java.net JIRA GLASSFISH-8244
@glassfishrobot Commented Reported by shaline@java.net
@glassfishrobot Commented Marked as incomplete on Wednesday, May 20th 2009, 4:02:29 am
Build Used: javaee SDK b03a build47 on solaris sparc jdk used : 1.6.0_13
The connector sample got built,deployed to the glassfish domain, when I did "ant all" after editing the ear_dir/mailconnector-ejb/src/conf/ejb-jar.xml with our mail servername, my username, and my mail password, and the application got launched successfully. The Sending of the email messages to a given email mailbox works fine, and I was able to receive the messages in the specified inbox. But querying the same mailbox for new messages does not work, and I see an error displayed as below:
Error in allocating a connection. Cause: No login methods supported! Review the values you entered and try again.
In the server.log I see the below message: [#|2009-05-07T11:22:24.285-0700|INFO|glassfish|samples.connectors.mailconnector. ra.inbound|_ThreadID=18;_ThreadName=Thread-1;|[EC] Unexpected Error while openin g Mail Folder: ::Inbox@ check for typos with foldername, username, password or h ostname in ejb-jar.xml, rebuild and redeploy|#]
I have attached the server.log, and the ant.log for reference.
Environment
Operating System: All Platform: All
Affected Versions
[V3]