Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    mail.templateRoot is not considered

    hi,

    the parameter "mail.templateRoot" (found here: http://www.smartclient.com/smartgwtee/server/javadoc/com/isomorphic/mail/MailMessage.html) in the server.properties is not considered.

    server.properties:
    Code:
    # Base mail template directory
    mail.templateRoot: $webRoot/mailTemplates
    I get a "java.io.FileNotFoundException" exception if I do NOT specify the fully qualified templateFile.

    did not work (snippet from ..ds.xml):
    Code:
    <mail 
    to="xxx@xyz.com" 
    from="yyy@xyz.com" 
    subject="Password Request (SmartClient Secure Application Example)" 
    templateFile="tmp1">
    </mail>
    did work (snippet from ..ds.xml):
    Code:
    <mail 
    to="xxx@xyz.com" 
    from="yyy@xyz.com" 
    subject="Password Request (SmartClient Secure Application Example)" 
    templateFile="mailTemplates/tmp1">
    </mail>
    Is this a bug or a mistake in the documentation?

    i used: SNAPSHOT_v9.0d_2013-05-16/PowerEdition Deployment 2013-05-16

    best regards,
    mirko

    #2
    Please show the complete server log for the request that leads to the exception (please remember to always do this - it's required).

    Comment


      #3
      Code:
      === 2013-08-07 23:21:19,850 [l0-2] INFO  DSResponse - [builtinApplication.null] DSResponse: List with 6 items
      === 2013-08-07 23:21:19,851 [l0-2] DEBUG SQLDriver - Freeing SQLDriver dbConnection 1318809231
      === 2013-08-07 23:21:19,851 [l0-2] DEBUG SQLConnectionManager - About to close PoolableConnection with hashcode "1318809231"
      === 2013-08-07 23:21:19,851 [l0-2] DEBUG PoolableSQLConnectionFactory - Executing pingTest 'select 1 from dual' on connection 1318809231
      === 2013-08-07 23:21:24,893 [l0-2] DEBUG SQLConnectionManager - About to close PoolableConnection with hashcode "1624730145"
      === 2013-08-07 23:21:24,893 [l0-2] DEBUG PoolableSQLConnectionFactory - Executing pingTest 'select 1 from dual' on connection 1624730145
      === 2013-08-07 23:21:24,920 [l0-2] INFO  MailMessage - trying to connect to smtp.xxx.com
      Loading javamail.default.providers from jar:file:/Development/workspace/testappvp/war/WEB-INF/lib/mail.jar!/META-INF/javamail.default.providers
      DEBUG: loading new provider protocol=imap, className=com.sun.mail.imap.IMAPStore, vendor=Sun Microsystems, Inc, version=null
      DEBUG: loading new provider protocol=imaps, className=com.sun.mail.imap.IMAPSSLStore, vendor=Sun Microsystems, Inc, version=null
      DEBUG: loading new provider protocol=smtp, className=com.sun.mail.smtp.SMTPTransport, vendor=Sun Microsystems, Inc, version=null
      DEBUG: loading new provider protocol=smtps, className=com.sun.mail.smtp.SMTPSSLTransport, vendor=Sun Microsystems, Inc, version=null
      DEBUG: loading new provider protocol=pop3, className=com.sun.mail.pop3.POP3Store, vendor=Sun Microsystems, Inc, version=null
      DEBUG: loading new provider protocol=pop3s, className=com.sun.mail.pop3.POP3SSLStore, vendor=Sun Microsystems, Inc, version=null
      DEBUG: getProvider() returning provider protocol=smtp; type=javax.mail.Provider$Type@4b98d319; class=com.sun.mail.smtp.SMTPTransport; vendor=Sun Microsystems, Inc
      DEBUG SMTP: useEhlo true, useAuth true
      DEBUG SMTP: useEhlo true, useAuth true
      DEBUG SMTP: trying to connect to host "smtp.xxx.com", port 25, isSSL false
      220 smtp.xxx.com ESMTP RZmta 31.37 ready (mo38)
      DEBUG SMTP: connected to host "smtp.xxx.com", port: 25
      
      EHLO pro.fritz.box
      250-smtp.xxx.com greets 11.222.333.4444
      250-ENHANCEDSTATUSCODES
      250-8BITMIME
      250-PIPELINING
      250-DELIVERBY
      250-SIZE 104857600
      250-AUTH SCRAM-SHA-1 DIGEST-MD5 CRAM-MD5 LOGIN PLAIN
      250-STARTTLS
      250 HELP
      DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
      DEBUG SMTP: Found extension "8BITMIME", arg ""
      DEBUG SMTP: Found extension "PIPELINING", arg ""
      DEBUG SMTP: Found extension "DELIVERBY", arg ""
      DEBUG SMTP: Found extension "SIZE", arg "104857600"
      DEBUG SMTP: Found extension "AUTH", arg "SCRAM-SHA-1 DIGEST-MD5 CRAM-MD5 LOGIN PLAIN"
      DEBUG SMTP: Found extension "STARTTLS", arg ""
      DEBUG SMTP: Found extension "HELP", arg ""
      STARTTLS
      220 Ready to start TLS
      EHLO pro.fritz.box
      250-smtp.xxx.com greets 11.222.333.4444
      250-ENHANCEDSTATUSCODES
      250-8BITMIME
      250-PIPELINING
      250-DELIVERBY
      250-SIZE 104857600
      250-AUTH SCRAM-SHA-1 DIGEST-MD5 CRAM-MD5 LOGIN PLAIN
      250 HELP
      DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
      DEBUG SMTP: Found extension "8BITMIME", arg ""
      DEBUG SMTP: Found extension "PIPELINING", arg ""
      DEBUG SMTP: Found extension "DELIVERBY", arg ""
      DEBUG SMTP: Found extension "SIZE", arg "104857600"
      DEBUG SMTP: Found extension "AUTH", arg "SCRAM-SHA-1 DIGEST-MD5 CRAM-MD5 LOGIN PLAIN"
      DEBUG SMTP: Found extension "HELP", arg ""
      DEBUG SMTP: Attempt to authenticate
      DEBUG SMTP: check mechanisms: LOGIN PLAIN DIGEST-MD5 
      AUTH LOGIN
      334 VXNxERl222cmxx5hbrrWU6
      dmFsaWRhdGlv2bxxxnBvcnRhbEBx1bmlmaEXRzLmNvbQ==
      334 UGFzc3dvcmQ6
      YjUwUm04RzR0N3VF
      235 2.7.0 OK Authenticated +TRIAL_MODE
      NOOP
      250 2.0.0 NOOP OK
      === 2013-08-07 23:21:25,972 [l0-2] WARN  RequestContext - dsRequest.execute() failed: 
      java.io.FileNotFoundException: /Development/workspace/testappvp/war/tmp1 (No such file or directory)
      	at java.io.FileInputStream.open(Native Method)
      	at java.io.FileInputStream.<init>(FileInputStream.java:120)
      	at com.isomorphic.io.ISCFile.getInputStream(ISCFile.java:360)
      	at com.isomorphic.io.ISCFile.getReader(ISCFile.java:344)
      	at com.isomorphic.io.ISCFile.getAsString(ISCFile.java:351)
      	at com.isomorphic.velocity.Velocity.evaluateTemplateFile(Velocity.java:104)
      	at com.isomorphic.velocity.Velocity.evaluateTemplateFileAsString(Velocity.java:121)
      	at com.isomorphic.mail.TemplatedMailMessage.mergeTemplate(TemplatedMailMessage.java:624)
      	at com.isomorphic.mail.TemplatedMailMessage.processMessageText(TemplatedMailMessage.java:367)
      	at com.isomorphic.mail.MailMessage.buildMessage(MailMessage.java:360)
      	at com.isomorphic.mail.TemplatedMailMessage.buildMessage(TemplatedMailMessage.java:266)
      	at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:2768)
      	at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:215)
      	at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:172)
      	at com.testappvp.server.servlets.PublicIDACall.processRequest(PublicIDACall.java:29)
      	at com.isomorphic.servlet.IDACall.doPost(IDACall.java:73)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
      	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097)
      	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343)
      	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
      	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
      	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
      	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
      	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
      	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
      	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
      	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
      	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
      	at com.testappvp.server.authentication.testappvpConcurrentSessionFilter.doFilter(testappvpConcurrentSessionFilter.java:80)
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
      	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149)
      	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
      	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
      	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
      	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
      	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
      	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
      	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      	at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
      	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      	at org.mortbay.jetty.Server.handle(Server.java:324)
      	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
      	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
      	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
      	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
      	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
      	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
      	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
      === 2013-08-07 23:21:25,974 [l0-2] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
      === 2013-08-07 23:21:25,974 [l0-2] DEBUG RPCManager - non-DMI response, dropExtraFields: false
      === 2013-08-07 23:21:25,976 [l0-2] INFO  Compression - /testappvp/testappvp/sc/PublicIDACall: 201 -> 174 bytes
      === 2013-08-07 23:21:25,977 [l0-2] DEBUG ExceptionTranslationFilter - Chain processed normally
      === 2013-08-07 23:21:25,977 [l0-2] DEBUG SecurityContextPersistenceFilter - SecurityContextHolder now cleared, as request processing completed

      Comment


        #4
        OK, thanks, we'll take a look and post back on this thread

        Comment


          #5
          This is now fixed. Please try with tomorrow's nightly build of 9.1d

          Comment


            #6
            thank you.
            Please fix the bug in version 9.0 too. The version 9.1 is still too new for production.

            Comment

            Working...
            X