cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kaj Kandler @ mail2" <kajkand...@conficio.com>
Subject WARN ... [sitemap.action.sendmail] (...) TP-Processor2/Sendmail: AddressException:
Date Wed, 03 Apr 2013 02:53:10 GMT
First of all thank you for making 2.1.12 happen. I always decided there
was nothing exciting to go to 2.2 or 3.0 other than tech. And migration
seemed too much of a daunting task. So I'm grateful to the team that
keeps the 2.1 release alive.

Now since my upgrade I lost my dojo that was loading piecemeal - Thanks!
But I have a new issue the I don't understand.

I have a simple question form on many pages and I want it to send an
e-mail and then go to a thank-you page
----------
function question() {
    // create new form
    var form = new Form("resources/forms/question_def.xml");

    // get the calling URL and disect
    var uri = cocoon.request.getRequestURI();
    // call page with form, until content validated
    form.showForm(uri+".page");
    var senderEMail = form.getChild("email").getValue();
    if ("something" == form.getChild("captcha").getValue()) {
        // send e-mail to support
        var mailSender =
cocoon.getComponent("org.apache.cocoon.mail.MailSender");
        try {
            mailSender.setFrom(senderEMail);
            mailSender.setTo(recepientAddress);
            mailSender.setSubject("(...)"+form.getChild("name").getValue());
            mailSender.setBody("Question send from: "+uri+"\n\n"
                                                           
+form.getChild("question").getValue());
            mailSender.send();
        } finally {
            cocoon.releaseComponent(mailSender);
        }
    }
   cocoon.redirectTo("/intro/thank-you", true);
   cocoon.exit(); // don't know if this is necessary
}
-------------
It sends the e-mail and as you see I redirect to the thank-you page, but
it also fails there with the following stack trace.
--------------
Processed by Apache Cocoon 2.1.12 in 319 milliseconds.
WARN  (2013-04-02) 22:50.06:035 [sitemap.action.sendmail]
(/intro/thank-you) TP-Processor2/Sendmail: AddressException:
javax.mail.internet.AddressException: No from address
        at
org.apache.cocoon.mail.MailMessageSender.doSend(MailMessageSender.java:399)
        at
org.apache.cocoon.mail.MailMessageSender.send(MailMessageSender.java:372)
        at org.apache.cocoon.acting.Sendmail.act(Sendmail.java:250)
        at
org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:120)
        at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
        at
org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
        at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
        at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
        at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
        at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
        at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:236)
        at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:178)
        at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254)
        at
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118)
        at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
        at
org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
        at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
        at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
        at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
        at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
        at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:236)
        at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:178)
        at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254)
        at org.apache.cocoon.Cocoon.process(Cocoon.java:699)
        at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1162)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
        at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776)
        at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)
        at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
        at java.lang.Thread.run(Thread.java:679)
INFO  (2013-04-02) 22:50.06:134 [sitemap] (/intro/thank-you)
TP-Processor2/IdGeneratorTransformer: ## Got id
INFO  (2013-04-02) 22:50.06:135 [sitemap] (/intro/thank-you)
TP-Processor2/IdGeneratorTransformer: ## 0 conflicts with
INFO  (2013-04-02) 22:50.06:376 [access] (/intro/thank-you)
TP-Processor2/CocoonServlet: 'intro/thank-you' Processed by Apache
Cocoon 2.1.12 in 348 milliseconds.
------------
As you can see the stack trace comes from the redirected page, not the
page where the form is on (and that is part of the continuation.

Any idea what I might be doing wrong?

Kaj



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message