• Mail export error 'Nested Group'

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #41624  by MKochS
 
Good evening everybody,

I am running 6.3.1 (community edition) an Debian 8. I recently upgraded from 6.3.0 to 6.3.1 to finish an annoying mail import problem.

After an apparently seamless upgrade, I am facing a new problem: when I am exporting mails from the mail repository, the process stops after a given percentage (2%, 53%, whatever) and throws this error in the RepositoryExporter.log:
Code: Select all
2016-04-19 20:30:50,431 ERROR MessagingException 'Nested group'

Another error I am getting is
Code: Select all
2016-04-19 20:37:22,122 ERROR MessagingException 'Missing '<''

Any ideas about what's wrong?

TIA
Matthias
 #41653  by jllort
 
Probably while importing now we are parsing the mail accounts better, and format stored in database not corresponses with actual ( or contains some errors ). Is this the complete stack trace of the error or do you have a more detailed one ?
 #41673  by pavila
 
Go to Administration > Utilities > Scripting and run (to detect badly imported mail addresses):
Code: Select all
import com.openkm.core.DatabaseException;
import com.openkm.dao.bean.NodeMail;
import com.openkm.dao.HibernateUtil;
import javax.mail.internet.*;
import org.hibernate.*;

String qs = "from NodeMail nm";
Session session = null;

try {
    session = HibernateUtil.getSessionFactory().openSession();
    session.beginTransaction();
 
    Query q = session.createQuery(qs);
    
 
    for (NodeMail nm : q.list()) {
        try {
            new InternetAddress(nm.getFrom());
        } catch (AddressException e) {
            print("Error con : " + nm.getUuid() + "<br>");
        }
    }
 
    HibernateUtil.commit(session.getTransaction());
} catch (HibernateException e) {
    HibernateUtil.rollback(session.getTransaction());
    throw new DatabaseException(e.getMessage(), e);
} finally {
    HibernateUtil.close(session);
}
 #41676  by MKochS
 
This is the result:
Code: Select all
Sourced file: inline evaluation of: ``import com.openkm.core.DatabaseException; import com.openkm.dao.bean.NodeMail; . . . '' : Object constructor : at Line: 19 : in file: inline evaluation of: ``import com.openkm.core.DatabaseException; import com.openkm.dao.bean.NodeMail; . . . '' : new InternetAddress ( nm .getFrom ( ) ) Target exception: java.lang.NullPointerException 
Sorry about the mess, I didn't know where to enter newline.
 #41705  by jllort
 
It's strange error, because seems nm.getFrom() returns null, what should never be possible to be received an e-mail from null. I think in your case should modify the code taking in consideration when from is null, and setting there some valid mail address like "empty@from.com"

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.