AnsweredAssumed Answered

WF crashes w/ ClassCastException: java.lang.String

Question asked by kniffte on Oct 29, 2008
Hello!

I'm using Alfresco 3B, Release 3194. We've set up a rule to inform one user, if a somebody has added content to a space. This user is a coordinator to that space and his email address is set correctly within ldap — and therefore within Alfresco (we checked that by sending a single invitation for another space, which worked perfectly well).

Now, when somebody adds content to that rule-using space, the following ClassCastException is being thrown:

09:58:55,403 ERROR [org.alfresco.repo.action.executer.MailActionExecuter] Failed to send email to StSc
org.springframework.mail.MailPreparationException: Could not prepare mail; nested exception is java.lang.ClassCastException: java.lang.String
Caused by: java.lang.ClassCastException: java.lang.String
        at org.alfresco.repo.action.executer.MailActionExecuter$1.prepare(MailActionExecuter.java:251)
        at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:344)
        at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:336)
        at org.alfresco.repo.action.executer.MailActionExecuter.executeImpl(MailActionExecuter.java:336)
        at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:127)
        at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:591)
        at org.alfresco.repo.action.executer.CompositeActionExecuter.executeImpl(CompositeActionExecuter.java:72)
        at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:127)
        at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:591)
        at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:528)
        at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1.execute(AsynchronousActionExecutionQueueImpl.java:371)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:294)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:209)
        at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper.run(AsynchronousActionExecutionQueueImpl.java:381)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)

It seems, that the Method

org.alfresco.repo.action.Action#getParameterValue(String name) does not return a List<String> as defined / expected by org.alfresco.repo.action.executer.MailActionExecuter$1.prepare(MailActionExecuter.java:251

Can somebody please help?

Thank you.

Stefan

Note: I also posted this problem to jira, see https://issues.alfresco.com/jira/browse/ALFCOM-2027 and it might also be tied to jira-entry https://issues.alfresco.com/jira/browse/ALFCOM-2028 (my one, again)

Outcomes