• UserMailImporter.bsh Cron not working

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
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.
 #51546  by arwenvd
 
Hello there, fellow users,
I am facing some very strange problem with OpenKM cronjobs.

The cron i question is UserMailImporter.bsh

The problem looks like this:
When registering new mail, the cron cannot create inbox folder and sync the mails. Once the inbox folder is created, it is working properly.
When run manually, the script is able to create the inbox folder and sync.

The openkm.log throws some java exception when run automatically. The error is not present, when run manually with the yellow lighning:
Code: Select all
java.lang.NullPointerException: null
	at com.openkm.module.db.DbFolderModule.create(DbFolderModule.java:101) ~[classes/:6.3.9]
	at com.openkm.api.OKMFolder.createSimple(OKMFolder.java:68) ~[classes/:6.3.9]
	at com.openkm.api.OKMFolder.createMissingFolders(OKMFolder.java:200) ~[classes/:6.3.9]
	at com.openkm.util.MailUtils.importMessages(MailUtils.java:665) [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.GeneratedMethodAccessor847.invoke(Unknown Source) ~[na:na]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_261]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[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(Thread.java:748) [na:1.8.0_261]


Any thoughts and help will be greatly appreciated!

Cheers!
 #51635  by jllort
 
Should check the current email configuration looking for path what does not exists. Go to database query and check
Code: Select all
SELECT MA_ID, MA_MFOLDER FROM OKM_MAIL_ACCOUNT;

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.