title: Grails 3.3: Rending Plugin 2.0.3: UnknownTemplateException Could not find template for 'template' on production
body: <p>I am attempting to generate a PDF in Grails using the <a href="https://github.com/gpc/rendering" rel="nofollow noreferrer">grails rending plugin</a>.</p>
  
  <p>The following will work when running <code>gradle bootRun</code></p>
  
  <pre><code>class DocumentService {
  
     def generatePdf() {
  
       // ...
  
         ByteArrayOutputStream stream = pdfRenderingService.render(
              template    : 'template_name',
              model       : [ name : 'taylor' ],
              controller  : 'controllerName'
         )
  
     }
  }
  </code></pre>
  
  <p>However, when deployed on tomcat8.</p>
  
  <pre><code> grails.plugins.rendering.document.UnknownTemplateException: Could not find template for 'template_name'
  at grails.plugins.rendering.document.XhtmlDocumentService.createTemplate(XhtmlDocumentService.groovy:102)
  at grails.plugins.rendering.document.XhtmlDocumentService$_generateXhtml_closure1.doCall(XhtmlDocumentService.groovy:66)
  at grails.plugins.rendering.document.RenderEnvironment.with(RenderEnvironment.groovy:70)
  at grails.plugins.rendering.document.RenderEnvironment.with(RenderEnvironment.groovy:60)
  at grails.plugins.rendering.document.XhtmlDocumentService.generateXhtml(XhtmlDocumentService.groovy:65)
  at grails.plugins.rendering.document.XhtmlDocumentService.createDocument(XhtmlDocumentService.groovy:35)
  at grails.plugins.rendering.RenderingService.render(RenderingService.groovy:36)
  at grails.plugins.rendering.RenderingService.render(RenderingService.groovy:35)
  </code></pre>