Page 1 of 1

Issue with importing specific email

PostPosted:Mon Nov 02, 2020 9:45 am
by deep2468
Few email imported then I am getting below msg in my email
Code: Select all
bsh.TargetError: Sourced file: inline evaluation of: ``new com.openkm.core.UserMailImporter().run();'' : Method Invocation run : at Line: 1 : in file: inline evaluation of: ``new com.openkm.core.UserMailImporter().run();'' : .run ( ) Target exception: java.lang.NullPointerException 

Now manual importing email work however auto importing not working.
only 19 email imported automatically. 20th specific email not importing even I tried manual importing.

I am using openkm CE 6.9

Kindly Help.

below is extract from openkm log file, may be useful to you for providing help
Code: Select all
 2020-10-31 20:50:00,127 [Thread-99] [] INFO  com.openkm.core.UserMailImporter - *** User mail importer activated ***
2020-10-31 20:50:04,384 [Thread-99] [] INFO  com.openkm.util.MailUtils - ======= ======= 0 ======= =======
2020-10-31 20:50:04,384 [Thread-99] [] INFO  com.openkm.util.MailUtils - Folder: inbox
2020-10-31 20:50:04,860 [Thread-99] [] INFO  com.openkm.util.MailUtils - Subject: null
2020-10-31 20:50:04,861 [Thread-99] [] INFO  com.openkm.util.MailUtils - From: Satyanarayanan Iyer <satyanarayananiyer@gmail.com>
2020-10-31 20:50:04,861 [Thread-99] [] INFO  com.openkm.util.MailUtils - Received: Mon Jul 23 20:24:11 IST 2018
2020-10-31 20:50:04,861 [Thread-99] [] INFO  com.openkm.util.MailUtils - Sent: Mon Jul 23 20:24:09 IST 2018
2020-10-31 20:50:06,721 [Thread-99] [] WARN  com.openkm.util.MailUtils - null
java.lang.NullPointerException: null
	at com.openkm.util.FormatUtil.fixUTF8(FormatUtil.java:307) ~[classes/:6.3.9]
	at com.openkm.util.MailUtils.messageToMail(MailUtils.java:785) [classes/:6.3.9]
	at com.openkm.util.MailUtils.importMessages(MailUtils.java:656) [classes/:6.3.9]
	at com.openkm.util.MailUtils.importMessages(MailUtils.java:583) [classes/:6.3.9]
	at com.openkm.core.UserMailImporter.runAs(UserMailImporter.java:89) [classes/:6.3.9]
	at com.openkm.core.UserMailImporter.run(UserMailImporter.java:60) [classes/:6.3.9]
	at sun.reflect.GeneratedMethodAccessor725.invoke(Unknown Source) ~[na:na]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_261]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_261]
	at bsh.Reflect.invokeMethod(Reflect.java:166) [beanshell2-2.1.8.jar:2.1.8 2014-02-20 03:56:17]
	at bsh.Reflect.invokeObjectMethod(Reflect.java:99) [beanshell2-2.1.8.jar:2.1.8 2014-02-20 03:56:17]
	at bsh.BSHPrimarySuffix.doName(BSHPrimarySuffix.java:176) [beanshell2-2.1.8.jar:2.1.8 2014-02-20 03:56:17]
	at bsh.BSHPrimarySuffix.doSuffix(BSHPrimarySuffix.java:120) [beanshell2-2.1.8.jar:2.1.8 2014-02-20 03:56:17]
	at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:80) [beanshell2-2.1.8.jar:2.1.8 2014-02-20 03:56:17]
	at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47) [beanshell2-2.1.8.jar:2.1.8 2014-02-20 03:56:17]
	at bsh.Interpreter.eval(Interpreter.java:664) [beanshell2-2.1.8.jar:2.1.8 2014-02-20 03:56:17]
	at bsh.Interpreter.eval(Interpreter.java:758) [beanshell2-2.1.8.jar:2.1.8 2014-02-20 03:56:17]
	at bsh.Interpreter.eval(Interpreter.java:747) [beanshell2-2.1.8.jar:2.1.8 2014-02-20 03:56:17]
	at com.openkm.util.ExecutionUtils.runScript(ExecutionUtils.java:106) [classes/:6.3.9]
	at com.openkm.core.Cron$RunnerBsh.run(Cron.java:99) [classes/:6.3.9]
	at java.lang.Thread.run(Unknown Source) [na:1.8.0_261]
2020-10-31 20:50:06,722 [Thread-99] [] WARN  com.openkm.core.Cron - Error executing crontab task 'User Mail Importer': bsh.TargetError: Sourced file: inline evaluation of: ``new com.openkm.core.UserMailImporter().run();'' : Method Invocation run : at Line: 1 : in file: inline evaluation of: ``new com.openkm.core.UserMailImporter().run();'' : .run ( ) 

Target exception: java.lang.NullPointerException
 

Re: Issue with importing specific email

PostPosted:Mon Nov 02, 2020 10:21 am
by easyflo
Hi deep2468,

Probably I had the same problem, fixed it and created therefore this PR: https://github.com/openkm/document-mana ... m/pull/255.

Cheers

Re: Issue with importing specific email

PostPosted:Mon Nov 02, 2020 10:40 am
by deep2468
Hi easyflo,

Yup, this is the same issue (i.e., null subject in email)

Thank you easyflo for your prompt reply.