Page 1 of 1

Failing to import email - Subject isn't NULL

PostPosted:Wed Jun 19, 2024 3:39 pm
by rosario
Hello all,

I'm running OpenKM Version: 6.3.11 (build: d7abb25) on top of Ubuntu 20.04.06 and tomcat 8.5.34

Trying to access mail server via IMAP, test successfull.

There are about 90,000 emails on the tested account, import still ongoing.

For each email I get the following from /home/openkm/tomcat/logs/openkm.log but no mail is visible on OpenKM.

Code: Select all
...
2024-06-19 17:32:45,840 [Thread-759] [] INFO  com.openkm.util.MailUtils - ======= ======= 17576 ======= =======
2024-06-19 17:32:45,840 [Thread-759] [] INFO  com.openkm.util.MailUtils - Folder: INBOX
2024-06-19 17:32:45,850 [Thread-759] [] INFO  com.openkm.util.MailUtils - Subject: Social Media Marketing: Pinterest 101
2024-06-19 17:32:45,851 [Thread-759] [] INFO  com.openkm.util.MailUtils - From: Shopify Digest <welcome@email.shopify.com>
2024-06-19 17:32:45,851 [Thread-759] [] INFO  com.openkm.util.MailUtils - Received: Wed Mar 15 19:07:59 CET 2017
2024-06-19 17:32:45,851 [Thread-759] [] INFO  com.openkm.util.MailUtils - Sent: Wed Mar 15 19:07:47 CET 2017
2024-06-19 17:32:46,198 [Thread-759] [] INFO  c.o.m.db.stuff.DbSimpleAccessManager - ***************************
2024-06-19 17:32:46,198 [Thread-759] [] INFO  c.o.m.db.stuff.DbSimpleAccessManager - ***************************
2024-06-19 17:32:46,198 [Thread-759] [] WARN  c.o.m.db.stuff.DbSimpleAccessManager - com.openkm.module.db.stuff.DbSimpleAccessManager -> isGranted (DbSimpleAccessManager.java:67)
2024-06-19 17:32:46,198 [Thread-759] [] WARN  c.o.m.db.stuff.DbSimpleAccessManager - com.openkm.module.db.stuff.SecurityHelper -> checkRead (SecurityHelper.java:98)
2024-06-19 17:32:46,199 [Thread-759] [] WARN  c.o.m.db.stuff.DbSimpleAccessManager - com.openkm.dao.NodeFolderDAO -> findByPk (NodeFolderDAO.java:202)
2024-06-19 17:32:46,199 [Thread-759] [] WARN  c.o.m.db.stuff.DbSimpleAccessManager - com.openkm.module.db.DbFolderModule -> create (DbFolderModule.java:84)
2024-06-19 17:32:46,199 [Thread-759] [] WARN  c.o.m.db.stuff.DbSimpleAccessManager - com.openkm.api.OKMFolder -> createSimple (OKMFolder.java:68)
2024-06-19 17:32:46,199 [Thread-759] [] WARN  c.o.m.db.stuff.DbSimpleAccessManager - com.openkm.api.OKMFolder -> createMissingFolders (OKMFolder.java:200)
2024-06-19 17:32:46,199 [Thread-759] [] WARN  c.o.m.db.stuff.DbSimpleAccessManager - com.openkm.util.MailUtils -> importMessages (MailUtils.java:607)
2024-06-19 17:32:46,199 [Thread-759] [] WARN  c.o.m.db.stuff.DbSimpleAccessManager - com.openkm.util.MailUtils -> importMessages (MailUtils.java:527)
2024-06-19 17:32:46,199 [Thread-759] [] WARN  c.o.m.db.stuff.DbSimpleAccessManager - com.openkm.core.UserMailImporter -> runAs (UserMailImporter.java:80)
2024-06-19 17:32:46,199 [Thread-759] [] WARN  c.o.m.db.stuff.DbSimpleAccessManager - com.openkm.core.UserMailImporter -> run (UserMailImporter.java:51)
2024-06-19 17:32:46,199 [Thread-759] [] WARN  c.o.m.db.stuff.DbSimpleAccessManager - com.openkm.util.ExecutionUtils -> runScript (ExecutionUtils.java:106)
2024-06-19 17:32:46,199 [Thread-759] [] WARN  c.o.m.db.stuff.DbSimpleAccessManager - com.openkm.core.Cron$RunnerBsh -> run (Cron.java:99)
2024-06-19 17:32:46,199 [Thread-759] [] INFO  c.o.m.db.stuff.DbSimpleAccessManager - ***************************
2024-06-19 17:32:46,199 [Thread-759] [] INFO  c.o.m.db.stuff.DbSimpleAccessManager - ***************************
2024-06-19 17:32:46,201 [Thread-759] [] WARN  com.openkm.util.MailUtils - null
java.lang.NullPointerException: null
2024-06-19 17:32:48,538 [Thread-759] [] INFO  com.openkm.util.MailUtils - ======= ======= 17577 ======= =======
....
Subject isn't null in any of those messages.

As you can see there is no further details in between java.lang.NullPointerException: null and the following mail log.

Any suggestion?

Thanks
Rosario

[EDIT]
If it might be of any relevance, I had replaced the pdfjs with the latest from https://github.com/mozilla/pdf.js/relea ... 6-dist.zip
to fix the preview issue.

Re: Failing to import email - Subject isn't NULL

PostPosted:Fri Jun 21, 2024 6:29 am
by rosario
Nevermind.

The issue was precisely because I replaced both

/home/openkm/tomcat/webapps/OpenKM/preview/build and pdfjs

with the downloaded ones, instead of being more careful in merging the new pdfjs within the old directory.

I'll figure it out.

Thanks anyway for your attention.
Rosario

Re: Failing to import email - Subject isn't NULL

PostPosted:Mon Jul 15, 2024 6:26 am
by jllort
Importing emails has not relation with replacing pdf.js. ¿Can share an eml sample file for testing?