Project

General

Profile

Actions

Defect #3445

open

Notification with attachment(s) isn't send when message forwarding is active

Added by Ondřej Kopr 7 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Notification
Target version:
-
Start date:
10/11/2023
Due date:
% Done:

0%

Estimated time:
Affected versions:
Owner:

Description

When a behavior wants send notification with attachment(s) is these attachments saved into disk. The saving method works for standard sending with direct recipients, but when administrator set automatic forwarding to email adress the sending ends with the error:

java.lang.IllegalArgumentException: Insert binary data
    at org.springframework.util.Assert.notNull(Assert.java:198)
    at eu.bcvsolutions.idm.core.ecm.service.impl.DefaultAttachmentManager.saveAttachment(DefaultAttachmentManager.java:101)
    at eu.bcvsolutions.idm.core.ecm.service.impl.DefaultAttachmentManager$$FastClassBySpringCGLIB$$e23f2177.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:752)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691)
    at eu.bcvsolutions.idm.core.ecm.service.impl.DefaultAttachmentManager$$EnhancerBySpringCGLIB$$32be6c8f.saveAttachment(<generated>)
    at eu.bcvsolutions.idm.core.notification.service.impl.AbstractNotificationSender.lambda$saveNotificationAttachments$1(AbstractNotificationSender.java:243)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
    at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
    at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
    at eu.bcvsolutions.idm.core.notification.service.impl.AbstractNotificationSender.saveNotificationAttachments(AbstractNotificationSender.java:255)
    at eu.bcvsolutions.idm.core.notification.service.impl.DefaultNotificationManager.createLog(DefaultNotificationManager.java:91)
    at eu.bcvsolutions.idm.core.notification.service.impl.DefaultNotificationManager.send(DefaultNotificationManager.java:58)
    at eu.bcvsolutions.idm.core.notification.service.impl.DefaultNotificationManager.send(DefaultNotificationManager.java:25)
    at eu.bcvsolutions.idm.core.notification.service.impl.AbstractNotificationSender.send(AbstractNotificationSender.java:155)
    at eu.bcvsolutions.idm.core.notification.service.impl.AbstractNotificationSender$$FastClassBySpringCGLIB$$2db1961c.invoke(<generated>)

because the forwarding message contains information about attachments but without inputData.

Redirect message works pefrectly.

No data to display

Actions

Also available in: Atom PDF