Email polling failed to trigger process model with "this.folderid" null exception

Hi All,

We are getting "this.folderid" is null exception on email poling process model and failed to create process instance.

This issue is happening intermittently, on the same PM we have instances where process instances are successfully initiated.

We haven't configured any folder on the start node, as there was no requirement for us to capture the email attachments. However at times we will receive attachments.

The same email was successfully instantiating process instance on lower environments.

2024-12-30 14:20:46,647 [Appian EmailHandlerBean - 1475] INFO com.appiancorp.process.emailpoller.EmailHandlerBean - EmailHandlerBean received email message. ([XX] [Order to Produce] Account No. XXXXXXXX (Police Ref: D/XXXX/XXXX)) 2024-12-30 14:20:46,947 [Appian EmailHandlerBean - 1475] ERROR com.appiancorp.process.emailpoller.EmailHandlerBean - Error receiving message in EmailHandlerBean MDB jakarta.mail.MessagingException: Message could not be sent; nested exception is: java.lang.NullPointerException: Cannot invoke "java.lang.Long.equals(Object)" because "this.folderId" is null at com.appiancorp.messaging.MessagePublisherServiceImpl.publishMessageToProcess(MessagePublisherServiceImpl.java:501) at jdk.internal.reflect.GeneratedMethodAccessor3655.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:569) at com.appiancorp.util.MethodInvocationReflectionImpl.proceed(MethodInvocationReflectionImpl.java:23) at com.appiancorp.security.authz.AuthorizationMethodInvocation.invoke0(AuthorizationMethodInvocation.java:63) at com.appiancorp.security.authz.AuthorizationMethodInterceptor.invoke(AuthorizationMethodInterceptor.java:28) at com.appiancorp.services.ServiceManager$ServiceInvocationHandler.invoke(ServiceManager.java:479) at jdk.proxy3/jdk.proxy3.$Proxy1251.publishMessageToProcess(Unknown Source) at com.appiancorp.process.emailpoller.EmailHandlerBean.onMessage(EmailHandlerBean.java:68) at com.appiancorp.process.emailpoller.MailActivation.run(MailActivation.java:176) at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:241) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840) Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.Long.equals(Object)" because "this.folderId" is null at com.appiancorp.messaging.MessagePublisherServiceImpl$FolderMaps$Key.equals(MessagePublisherServiceImpl.java:1703) at java.base/java.util.HashMap.putVal(HashMap.java:633) at java.base/java.util.HashMap.put(HashMap.java:610) at java.base/java.util.HashSet.add(HashSet.java:221) at com.appiancorp.messaging.MessagePublisherServiceImpl$FolderMaps.addFolderIdForPm(MessagePublisherServiceImpl.java:1746) at com.appiancorp.messaging.MessagePublisherServiceImpl.getFolderMaps(MessagePublisherServiceImpl.java:1216) at com.appiancorp.messaging.MessagePublisherServiceImpl.processAttachmentsAndPublishMessage(MessagePublisherServiceImpl.java:797) at com.appiancorp.messaging.MessagePublisherServiceImpl.publishMessageToProcess(MessagePublisherServiceImpl.java:481) ... 14 more 2024-12-30 14:20:46,947 [Appian MailActivation - 1] ERROR com.appiancorp.process.emailpoller.MailActivation - MA 1: (email@xxxxxx.xxx.com.xx on imap://mail-ap-xxxx-x.appiananywhere.com:143):Could not deliver message. java.lang.RuntimeException: Error receiving message in EmailHandlerBean MDB at com.appiancorp.process.emailpoller.EmailHandlerBean.onMessage(EmailHandlerBean.java:103) at com.appiancorp.process.emailpoller.MailActivation.run(MailActivation.java:176) at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:241) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840)

  Discussion posts and replies are publicly visible