Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8931121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:02:31+00:00 2026-06-15T09:02:31+00:00

I developed a webmail to link apache james and it works. But some user

  • 0

I developed a webmail to link apache james and it works. But some user cannot receive emails from james. I set mailSession.setDebug(true) and trace two users’ logs(sa can receive, the other cannot). The difference shows below:

the user who can receive email successfully(user sa):

[2012-11-15 14:24:12] com.csc.mail.jsh.mail.core.ReceiveMail : [INFO ]  - trying to receive emails from james server...
C: STAT
S: +OK 2 2584
C: NOOP
S: +OK
C: TOP 1 0
S: +OK Message follows
...

the other user receive failure(user chai):

[2012-11-15 14:22:01] com.csc.mail.jsh.mail.core.ReceiveMail : [INFO ]  - trying to receive emails from james server...
C: STAT
S: -ERR
C: QUIT
S: +OK Apache James POP3 Server signing off.
[2012-11-15 14:22:03] com.csc.mail.jsh.mail.core.ReceiveMail : [ERROR]  - Folder open failed:javax.mail.MessagingException: Open failed;
nested exception is:
    java.io.IOException: STAT command failed: null
    at com.sun.mail.pop3.POP3Folder.open(POP3Folder.java:228)
    at com.csc.mail.jsh.mail.core.ReceiveMail.receive(ReceiveMail.java:82)
    at com.csc.mail.jsh.mail.core.ReceiveMail.run(ReceiveMail.java:222)
    at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException: STAT command failed: null
    at com.sun.mail.pop3.Protocol.stat(Protocol.java:366)
    at com.sun.mail.pop3.POP3Folder.open(POP3Folder.java:203)
    ... 3 more

My receive code:

Session mailSession = Session.getInstance(System.getProperties(), null);
mailSession.setDebug(true);
Store store = null;
Folder folder = null; //javax.mail.Folder
try {
    store = mailSession.getStore("pop3");
    store.connect(Property.getPop3(), userName, password);
    logger.info("trying to receive emails from james server...");
    folder = store.getFolder("INBOX");
    try {
        if (!folder.isOpen()) {
            folder.open(Folder.READ_WRITE); //the point of throwing the exception
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
    //receive email from james server.
} catch (Exception e) {
    logger.error("Email Receive Error!" + StackTraceStr.st2str(e));
    try {
        folder.close(true);
    } catch (Exception e2) {
    }
} finally {
    try {
        store.close();
    } catch (Exception cloex) {
    }
}

I had posted a post at here. Thanks for your any help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T09:02:33+00:00Added an answer on June 15, 2026 at 9:02 am

    I had contact with Apache James and finally found the answer. You can find it at here: STAT command failed occasionally. At the end of the page, the thread had been listed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I developed a form for Blackberry that keeps me some information, but I need
I developed some WPF projects, but I met a very serious issue. As you
I developed an application and it works well on OS6 (Operating System 6) but
I developed a website .The site works fine on Chrome 19.0.1084.46 m but on
I developed a user control that displays a list of products and it works
I developed my site and it works like a charm on my local machine.
I developed a custom file manager for tinymce. But even if adding image to
I developed a module to display submenus as stand alone module, every thing works
I developed a winforms app locally on my machine. It reads data from a
I developed a project in android [API 13] but when i tried to run

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.