fgalarraga

Mail trigger problems

Discussion created by fgalarraga on Jul 30, 2018

Hi all,

I'm working with PAM 4.3 SP1 over Windows Server and having problems when using mail trigger.

 

I configure mail trigger with "Save mail attachments to database" but mail attachments are not passed as parameters to my process. The attachments are written to ..\CA\PAM\server\c2o\itpamTemp\ folder but they cannot be uploaded to database. The log file shows this error:

 

2018-07-29 21:43:04,289 ERROR [com.optinuity.c2o.persistence.RuntimeDatabaseManager] [ service thread] Unable update attachments to database
java.io.FileNotFoundException: ..\CA\PAM\server\c2o\itpamTemp\null (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:146)
at com.optinuity.c2o.persistence.RuntimeDatabaseManager.updateSoapAttachments(RuntimeDatabaseManager.java:4832)
at com.optinuity.c2o.wsd.trigger.util.MessageAttachmentProcessor.saveAttachmentsToPersistence(MessageAttachmentProcessor.java:230)
at com.optinuity.c2o.wsd.trigger.util.MessageAttachmentProcessor.saveAttachmentsToDB(MessageAttachmentProcessor.java:110)
at com.optinuity.c2o.wsd.trigger.smtp.SMTPEngine.processSMTPMessage(SMTPEngine.java:85)
at com.optinuity.c2o.wsd.trigger.smtp.SMTPMailClientService$ServiceThread.run(SMTPMailClientService.java:351)
2018-07-29 21:43:04,290 ERROR [com.optinuity.c2o.wsd.trigger.util.MessageAttachmentProcessor] [ service thread] Error while uploading attachments to database -
com.optinuity.c2o.util.C2OException: ATTACHMENT_SAVE_ERROR
at com.optinuity.c2o.persistence.RuntimeDatabaseManager.updateSoapAttachments(RuntimeDatabaseManager.java:4840)
at com.optinuity.c2o.wsd.trigger.util.MessageAttachmentProcessor.saveAttachmentsToPersistence(MessageAttachmentProcessor.java:230)
at com.optinuity.c2o.wsd.trigger.util.MessageAttachmentProcessor.saveAttachmentsToDB(MessageAttachmentProcessor.java:110)
at com.optinuity.c2o.wsd.trigger.smtp.SMTPEngine.processSMTPMessage(SMTPEngine.java:85)
at com.optinuity.c2o.wsd.trigger.smtp.SMTPMailClientService$ServiceThread.run(SMTPMailClientService.java:351)
2018-07-29 21:43:04,291 ERROR [com.optinuity.c2o.wsd.trigger.util.MessageAttachmentProcessor] [ service thread] Unable to save attachments to database -
org.hibernate.TransactionException: Transaction not successfully started
at org.hibernate.transaction.JTATransaction.commit(JTATransaction.java:126)
at com.optinuity.c2o.wsd.trigger.util.MessageAttachmentProcessor.saveAttachmentsToPersistence(MessageAttachmentProcessor.java:242)
at com.optinuity.c2o.wsd.trigger.util.MessageAttachmentProcessor.saveAttachmentsToDB(MessageAttachmentProcessor.java:110)
at com.optinuity.c2o.wsd.trigger.smtp.SMTPEngine.processSMTPMessage(SMTPEngine.java:85)
at com.optinuity.c2o.wsd.trigger.smtp.SMTPMailClientService$ServiceThread.run(SMTPMailClientService.java:351)
2018-07-29 21:43:04,296 ERROR [com.optinuity.c2o.wsd.trigger.smtp.SMTPEngine] [ service thread] Error occurred while processing the SMTP messsage::Unable to save attachments to database - Transaction not successfully started
com.optinuity.c2o.util.C2OException: Unable to save attachments to database - Transaction not successfully started
at com.optinuity.c2o.wsd.trigger.util.MessageAttachmentProcessor.saveAttachmentsToDB(MessageAttachmentProcessor.java:113)
at com.optinuity.c2o.wsd.trigger.smtp.SMTPEngine.processSMTPMessage(SMTPEngine.java:85)
at com.optinuity.c2o.wsd.trigger.smtp.SMTPMailClientService$ServiceThread.run(SMTPMailClientService.java:351)

 

 

Sometimes, other parameters are not passed to the process too. For example, mail body is not passed and the following error is shown in log file:

 

2018-07-29 21:37:48,886 ERROR [com.optinuity.c2o.workflowengine.WorkflowManager] [ service thread] exception occured setting caller valuemap to process dataset
org.mozilla.javascript.EvaluatorException: msg.string.expected
at org.mozilla.javascript.Context.reportRuntimeError(Context.java:970)
at org.mozilla.javascript.Context.reportRuntimeError(Context.java:1022)
at com.optinuity.c2o.bean.C2OString.setFrom(C2OString.java:430)
at com.optinuity.c2o.bean.C2OValueArray.setFrom(C2OValueArray.java:1012)
at com.optinuity.c2o.bean.C2OValueMap.setFrom(C2OValueMap.java:677)
at com.optinuity.c2o.bean.C2OValueMap.setFrom(C2OValueMap.java:639)
at com.optinuity.c2o.bean.C2OValueMap.setFrom(C2OValueMap.java:694)
at com.optinuity.c2o.workflowengine.WorkflowManager.initFlowStateObject(WorkflowManager.java:884)
at com.optinuity.c2o.workflowengine.WorkflowManager.createWorkFlowRuntimeInstanceObject(WorkflowManager.java:647)
at com.optinuity.c2o.workflowengine.WorkflowManager.loadWorkFlow(WorkflowManager.java:388)
at com.optinuity.c2o.workflowengine.FlowManagerCache.registerNewFlowManager(FlowManagerCache.java:241)
at com.optinuity.c2o.workflowengine.C2oWorkFlowEngine.loadWorkFlow(C2oWorkFlowEngine.java:181)
at com.optinuity.c2o.workflowengine.C2oWorkFlowEngine.loadWorkFlow(C2oWorkFlowEngine.java:235)
at com.optinuity.c2o.wsd.trigger.util.TriggerUtil.executeFlow(TriggerUtil.java:492)
at com.optinuity.c2o.wsd.trigger.smtp.SMTPEngine.handleDefaultHandler(SMTPEngine.java:156)
at com.optinuity.c2o.wsd.trigger.smtp.SMTPEngine.processSMTPMessage(SMTPEngine.java:137)
at com.optinuity.c2o.wsd.trigger.smtp.SMTPMailClientService$ServiceThread.run(SMTPMailClientService.java:351)

 

Finally, several times, PAM stop processing the incoming mails and I must to recycle the PAM Windows service.

 

I have another environment with PAM 4.3 HF01 working the same without problem.

 

Do you think there is a file system permission problem or is it a PAM bug? SP1 includes HF01? Could SP2 help?

 

Thanks in advance.

 

Regards,

Fabio.

Outcomes