Spring surf form extension give me java.io.FileNotFoundException: Template

cancel
Showing results for 
Search instead for 
Did you mean: 
4535992
Established Member II

Spring surf form extension give me java.io.FileNotFoundException: Template

Jump to solution

Hi i writed a simple extensions file xml for a alfresco 5.1 (communitiy-201707), it's always worked but now for some unknow reason it's keep to tell me is not find my customize template ftl. i don' have changed anything on code of alfresco, and it's start to give me nuts.

HERE THE CODE OF THE EXTENSION:

<extension>
    <modules>
        <module>
            <id>signed-as-aruba</id>
            <version>${project.version}</version>
            <auto-deploy>true</auto-deploy>
            <configurations>
                
                <config evaluator="string-compare" condition="DocumentLibrary">
                    <indicators>                       
                        <indicator id="it.abd.indicator.isSigned"
                            icon="signed-doc-16.png"
                            index="100"
                            label="it.abd.indicator.isSigned.label">
                            <evaluator>it.abd.alfresco.evaluator.isSignable</evaluator>
                        </indicator>
                    </indicators>
                    
                    <toolbar-actions>
                          <action type="action-link" id="it.abd.doclib.action.signedAsAruba" label="menu.selected-items.signedAsAruba" />
                      </toolbar-actions>
                      
                      <multi-select>
                         <action type="action-link" id="onActionSignAsAruba" label="menu.selected-items.signedAsAruba" />
                      </multi-select>
                </config>
                
                <config evaluator="string-compare" condition="DocLibActions">
                    <actions>
                        <!-- Add a Document Library action of the type javascript,
                             meaning it will execute client side JavaScript code.
                             In this case the action will call an Out-of-the-box
                             action JavaScript function called onActionFormDialog, which
                             will assume you want to display a form collecting some
                             data that should then be passed on to a repo action
                             invokation. -->
                             <!-- signed-doc-16.png -->
                        <action id="it.abd.doclib.action.signedAsAruba"
                            icon="sign"                             
                            type="javascript"
                            label="it.abd.doclib.action.signedAsAruba.label">
                            <param name="function">onActionFormDialog</param>
                            <param name="itemKind">action</param>
                            <param name="itemId">signed-as-aruba</param> <!-- Repository action id = Spring Bean id -->
                            <param name="mode">create</param>
                            <param name="destination">{node.nodeRef}</param>
                            <param name="successMessage">it.abd.sign.doclib.action.signed.msg.success</param>
                            <param name="failureMessage">it.abd.sign.doclib.action.signed.msg.failure</param>
                            <evaluator>it.abd.alfresco.evaluator.isSignable</evaluator>
                        </action>

                        <!-- Add a Document Library action of the type javascript,
                             meaning it will execute client side JavaScript code.
                             In this case it will call a custom JavaScript function that
                             invokes a Web Script-->
                        <action id="it.abd.sign.doclib.action.callWebScript"
                                icon="callws"
                                type="javascript"
                                label="it.abd.sign.doclib.action.callWebScript.label">
                            <param name="active">true</param>
                            <param name="function">onActionCallWebScript</param>
                            <param name="successMessage">it.abd.sign.doclib.action.callWebScript.msg.success</param>
                            <param name="failureMessage">it.abd.sign.doclib.action.callWebScript.msg.failure</param>
                        </action>
                    </actions>

                    <actionGroups>
                        <!-- We want the doclib actions to be visible in the
                             document-browse and document-details views. -->
                        <actionGroup id="document-browse">
                            <action index="400" id="it.abd.doclib.action.signedAsAruba" />
                        </actionGroup>
                        <actionGroup id="document-details">
                            <action index="400" id="it.abd.doclib.action.signedAsAruba" />
                        </actionGroup>

                        <!-- The Go To Aruba action will be visible also in Folder browse view -->
                        <actionGroup id="folder-browse">
                            <action index="400" id="it.abd.doclib.action.signedAsAruba" />
                        </actionGroup>
                    </actionGroups>
                </config>
                
                <!-- Bring in custom JavaScript functions called by the callWebScript and showCustomMessage
                     DocLib actions defined above -->
                <config evaluator="string-compare" condition="DocLibCustom">
                    <dependencies>
                        <js src="components/documentlibrary/custom-doclib-actions.js" />
                    </dependencies>
                </config>

                <!-- ====== -->
                <!-- FORMS  -->
                <!-- ====== -->
                
                <!-- Signed-as-Aruba DocLib action form.
                     It matches the fields used by the signed-as-aruba Repository action -->
                <config evaluator="string-compare" condition="signed-as-aruba"> <!-- ID for the Repository Action that this form is associated with -->
                    <forms>                  
                        <form>        
                            <!--                  
                             <dependencies>
                                <js src="/components/js/hideBySignType.js" />
                            </dependencies>
                            -->
                            <edit-form template="/2-column-edit-form.ftl" />
                            <field-visibility>
                                <show id="firmaProfilo"/>
                                <show id="firmaTipoProfilo"/>
                                <show id="firmaTipo"/>
                              
                                <show id="firmaOtp"/>
                                <show id="firmaLuogo"/>
                                <show id="firmaMotivo"/>   
                                <show id="firmaFirmatario"/>                 
                                <show id="firmaUsername"/>
                                <show id="firmaPassword"/>
                                <!--                                                         
                                <show id="fileOverride"/>
                                <show id="fileAttach"/>
                                <show id="fileParentId"/>    
                                <show id="fileCreateOnAlfresco"/>    
                                <show id="firmaFile"/>    
                                <show id="firmaLevelBes"/>
                                -->
                            </field-visibility>
                            <appearance>
                            
                                <field id="firmaProfilo" label-id="property.form.sign.firma.profilo">
                                      <control template="/org/alfresco/components/form/controls/profiloFirmaSelectOne.ftl"/>    
                                    <!-- <control-param name="options">0|Firma con Aruba</control-param> -->                                    
                                  </field>
                                  
                                  <field id="firmaTipoProfilo" label-id="property.form.sign.firma.tipo.profilo">
                           <control template="/org/alfresco/components/form/controls/tipoProfiloTipoFirmaSelectOne.ftl"/>    
                                    <!--  <control-param name="options">0|,1|LOCALE,2|REMOTA</control-param> -->                                    
                                  </field>
                            
                              
                                   <field id="firmaTipo" label-id="property.form.sign.firma.tipo">
                                      <control template="/org/alfresco/components/form/controls/tipoFirmaSelectOne.ftl"/>    
                                    <!-- <control-param name="options">0|PADES,1|CADES,2|DETACHED</control-param> -->                                                
                                  </field>
                            
                                  <field id="firmaOtp" label-id="property.form.sign.firma.otp">
                                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
                                  </field>    
                                  <field id="firmaLuogo" label-id="property.form.sign.firma.luogo">
                                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
                                  </field>                                                        
                                  <field id="firmaMotivo" label-id="property.form.sign.firma.motivo">
                                    <control template="/org/alfresco/components/form/controls/textarea.ftl" />
                                  </field>
                                  <field id="firmaFirmatario" label-id="property.form.sign.firma.firmatario">
                                    <control template="/org/alfresco/components/form/controls/textfield.ftl" />
                                  </field>                            
                                 <field id="firmaUsername" label-id="property.form.sign.firma.username">
                                    <control template="/org/alfresco/components/form/controls/textfield.ftl" />
                                 </field>
                                  <field id="firmaPassword" label-id="property.form.sign.firma.password">
                                    <control template="/org/alfresco/components/form/controls/textfield.ftl" />
                                  </field>
                            </appearance>
                        </form>
                    </forms>
                </config>  
            </configurations>
        </module>
    </modules>
</extension>

for make sure the ftl is found i put on the extensions standard folder:

amp/config/alfresco/web-extension/site-webscripts/org/alfresco/components/form/controls/profiloFirmaSelectOne.ftl

and on the share default location:

amp/config/alfresco/site-webscripts/org/alfresco/components/form/controls/profiloFirmaSelectOne.ftl

they are correctely writed on the folder of the share application, so the installations of the amps seem to be good.

HERE THE FULL EXCEPTION OF THE ERROR:

2017-09-28 09:51:02,994 ERROR [freemarker.runtime] [http-apr-8080-exec-5] Error executing FreeMarker template FreeMarker template error: Error reading included file "org/alfresco/components/form/controls/tipoProfiloTipoFirmaSelectOne.ftl": Template "org/alfresco/components/form/controls/tipoProfiloTipoFirmaSelectOne.ftl" not found. The failing instruction (FTL stack trace): ---------- ==> #include "\${field.control.template}" [in template "org/alfresco/components/form/form.lib.ftl" in macro "renderField" at line 91, column 7] @renderField field=form.fields[item.id] [in template "org/alfresco/components/form/form.lib.ftl" in macro "renderSet" at line 122, column 13] #else [in template "org/alfresco/components/form/form.lib.ftl" in macro "renderSet" at line 121, column 10] #else [in template "org/alfresco/components/form/form.lib.ftl" in macro "renderSet" at line 117, column 4] @formLib.renderSet set=item [in template "org/alfresco/components/form/form.get.html.ftl" at line 39, column 28] #if item.kind == "set" [in template "org/alfresco/components/form/form.get.html.ftl" at line 37, column 22] #nested [in template "org/alfresco/components/form/form.lib.ftl" in macro "renderFormContainer" at line 64, column 10] @formLib.renderFormContainer formId=f... [in template "org/alfresco/components/form/form.get.html.ftl" at line 35, column 16] #else [in template "org/alfresco/components/form/form.get.html.ftl" at line 30, column 13] #elseif form?exists [in template "org/alfresco/components/form/form.get.html.ftl" at line 20, column 10] @uniqueIdDiv [in template "org/alfresco/components/form/form.get.html.ftl" at line 15, column 7] @markup id="html" [in template "org/alfresco/components/form/form.get.html.ftl" at line 14, column 4] @standalone [in template "org/alfresco/components/form/form.get.html.ftl" at line 1, column 1] ---------- Java stack trace (for programmers): ---------- freemarker.core._MiscTemplateException: [... Exception message was already printed; see it above ...] at freemarker.core.Include.accept(Include.java:168) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.MixedContent.accept(MixedContent.java:93) at freemarker.core.Environment.visitByHiddingParent(Environment.java:286) at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:86) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.Macro$Context.runMacro(Macro.java:209) at freemarker.core.Environment.visit(Environment.java:694) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:116) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.IfBlock.accept(IfBlock.java:84) at freemarker.core.Environment.visitByHiddingParent(Environment.java:286) at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:193) at freemarker.core.Environment.visitIteratorBlock(Environment.java:509) at freemarker.core.IteratorBlock.accept(IteratorBlock.java:103) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.IfBlock.accept(IfBlock.java:84) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.MixedContent.accept(MixedContent.java:93) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.Macro$Context.runMacro(Macro.java:209) at freemarker.core.Environment.visit(Environment.java:694) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:116) at freemarker.core.Environment.visitByHiddingParent(Environment.java:286) at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:86) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.IfBlock.accept(IfBlock.java:84) at freemarker.core.Environment.visitByHiddingParent(Environment.java:286) at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:193) at freemarker.core.Environment.visitIteratorBlock(Environment.java:509) at freemarker.core.IteratorBlock.accept(IteratorBlock.java:103) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.Environment.visit(Environment.java:487) at freemarker.core.BodyInstruction.accept(BodyInstruction.java:93) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.MixedContent.accept(MixedContent.java:93) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.Macro$Context.runMacro(Macro.java:209) at freemarker.core.Environment.visit(Environment.java:694) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:116) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.MixedContent.accept(MixedContent.java:93) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.IfBlock.accept(IfBlock.java:84) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.MixedContent.accept(MixedContent.java:93) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.IfBlock.accept(IfBlock.java:84) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.MixedContent.accept(MixedContent.java:93) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.Environment$1.render(Environment.java:313) at org.springframework.extensions.surf.extensibility.impl.DefaultExtensibilityDirectiveData.render(DefaultExtensibilityDirectiveData.java:119) at org.springframework.extensions.surf.extensibility.impl.ExtensibilityModelImpl.merge(ExtensibilityModelImpl.java:414) at org.springframework.extensions.surf.extensibility.impl.AbstractExtensibilityDirective.merge(AbstractExtensibilityDirective.java:170) at org.springframework.extensions.surf.extensibility.impl.AbstractExtensibilityDirective.execute(AbstractExtensibilityDirective.java:137) at freemarker.core.Environment.visit(Environment.java:341) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:136) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.Environment$1.render(Environment.java:313) at org.springframework.extensions.surf.extensibility.impl.DefaultExtensibilityDirectiveData.render(DefaultExtensibilityDirectiveData.java:119) at org.springframework.extensions.surf.extensibility.impl.ExtensibilityModelImpl.merge(ExtensibilityModelImpl.java:414) at org.springframework.extensions.surf.extensibility.impl.AbstractExtensibilityDirective.merge(AbstractExtensibilityDirective.java:170) at org.springframework.extensions.surf.extensibility.impl.AbstractExtensibilityDirective.execute(AbstractExtensibilityDirective.java:137) at freemarker.core.Environment.visit(Environment.java:341) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:136) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.MixedContent.accept(MixedContent.java:93) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.Environment$1.render(Environment.java:313) at org.springframework.extensions.surf.extensibility.impl.DefaultExtensibilityDirectiveData.render(DefaultExtensibilityDirectiveData.java:119) at org.springframework.extensions.surf.extensibility.impl.ExtensibilityModelImpl.merge(ExtensibilityModelImpl.java:414) at org.springframework.extensions.surf.extensibility.impl.AbstractExtensibilityDirective.merge(AbstractExtensibilityDirective.java:170) at org.springframework.extensions.surf.extensibility.impl.AbstractExtensibilityDirective.execute(AbstractExtensibilityDirective.java:137) at freemarker.core.Environment.visit(Environment.java:341) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:136) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.Environment.process(Environment.java:243) at org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:192) at org.springframework.extensions.webscripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:946) at org.springframework.extensions.webscripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:267) at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:147) at org.springframework.extensions.webscripts.PresentationContainer.executeScript(PresentationContainer.java:70) at org.springframework.extensions.webscripts.LocalWebScriptRuntimeContainer.executeScript(LocalWebScriptRuntimeContainer.java:239) at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:378) at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209) at org.springframework.extensions.webscripts.servlet.mvc.WebScriptView.renderMergedOutputModel(WebScriptView.java:104) at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:264) at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1216) at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1001) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:867) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844) at javax.servlet.http.HttpServlet.service(HttpServlet.java:620) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:411) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338) at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:213) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:171) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.alfresco.web.site.servlet.SecurityHeadersFilter.doFilter(SecurityHeadersFilter.java:182) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.alfresco.web.site.servlet.CSRFFilter.doFilter(CSRFFilter.java:322) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:447) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) at org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:2403) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)

Caused by: java.io.FileNotFoundException: Template "org/alfresco/components/form/controls/tipoProfiloTipoFirmaSelectOne.ftl" not found. at freemarker.template.Configuration.getTemplate(Configuration.java:742) at freemarker.core.Environment.getTemplateForInclusion(Environment.java:1694) at freemarker.core.Include.accept(Include.java:159) ... 136 more 2017-09-28 09:51:03,005 ERROR [extensions.webscripts.AbstractRuntime] [http-apr-8080-exec-5] Exception from executeScript - redirecting to status template error: 08280001 Failed to process template org/alfresco/components/form/form.get.html.ftl org.springframework.extensions.webscripts.WebScriptException: 08280001 Failed to process template org/alfresco/components/form/form.get.html.ftl at org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:196) at org.springframework.extensions.webscripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:946) at org.springframework.extensions.webscripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:267) at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:147) at org.springframework.extensions.webscripts.PresentationContainer.executeScript(PresentationContainer.java:70) at org.springframework.extensions.webscripts.LocalWebScriptRuntimeContainer.executeScript(LocalWebScriptRuntimeContainer.java:239) at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:378) at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209) at org.springframework.extensions.webscripts.servlet.mvc.WebScriptView.renderMergedOutputModel(WebScriptView.java:104) at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:264) at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1216) at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1001) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:867) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844) at javax.servlet.http.HttpServlet.service(HttpServlet.java:620) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:411) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338) at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:213) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:171) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.alfresco.web.site.servlet.SecurityHeadersFilter.doFilter(SecurityHeadersFilter.java:182) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.alfresco.web.site.servlet.CSRFFilter.doFilter(CSRFFilter.java:322) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:447) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) at org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:2403) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)

Caused by: freemarker.core._MiscTemplateException: Error reading included file "org/alfresco/components/form/controls/tipoProfiloTipoFirmaSelectOne.ftl": Template "org/alfresco/components/form/controls/tipoProfiloTipoFirmaSelectOne.ftl" not found. The failing instruction (print stack trace for 12 more): ==> #include "\${field.control.template}" [in template "org/alfresco/components/form/form.lib.ftl" in macro "renderField" at line 91, column 7] at freemarker.core.Include.accept(Include.java:168) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.MixedContent.accept(MixedContent.java:93) at freemarker.core.Environment.visitByHiddingParent(Environment.java:286) at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:86) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.Macro$Context.runMacro(Macro.java:209) at freemarker.core.Environment.visit(Environment.java:694) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:116) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.IfBlock.accept(IfBlock.java:84) at freemarker.core.Environment.visitByHiddingParent(Environment.java:286) at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:193) at freemarker.core.Environment.visitIteratorBlock(Environment.java:509) at freemarker.core.IteratorBlock.accept(IteratorBlock.java:103) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.IfBlock.accept(IfBlock.java:84) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.MixedContent.accept(MixedContent.java:93) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.Macro$Context.runMacro(Macro.java:209) at freemarker.core.Environment.visit(Environment.java:694) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:116) at freemarker.core.Environment.visitByHiddingParent(Environment.java:286) at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:86) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.IfBlock.accept(IfBlock.java:84) at freemarker.core.Environment.visitByHiddingParent(Environment.java:286) at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:193) at freemarker.core.Environment.visitIteratorBlock(Environment.java:509) at freemarker.core.IteratorBlock.accept(IteratorBlock.java:103) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.Environment.visit(Environment.java:487) at freemarker.core.BodyInstruction.accept(BodyInstruction.java:93) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.MixedContent.accept(MixedContent.java:93) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.Macro$Context.runMacro(Macro.java:209) at freemarker.core.Environment.visit(Environment.java:694) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:116) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.MixedContent.accept(MixedContent.java:93) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.IfBlock.accept(IfBlock.java:84) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.MixedContent.accept(MixedContent.java:93) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.IfBlock.accept(IfBlock.java:84) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.MixedContent.accept(MixedContent.java:93) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.Environment$1.render(Environment.java:313) at org.springframework.extensions.surf.extensibility.impl.DefaultExtensibilityDirectiveData.render(DefaultExtensibilityDirectiveData.java:119) at org.springframework.extensions.surf.extensibility.impl.ExtensibilityModelImpl.merge(ExtensibilityModelImpl.java:414) at org.springframework.extensions.surf.extensibility.impl.AbstractExtensibilityDirective.merge(AbstractExtensibilityDirective.java:170) at org.springframework.extensions.surf.extensibility.impl.AbstractExtensibilityDirective.execute(AbstractExtensibilityDirective.java:137) at freemarker.core.Environment.visit(Environment.java:341) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:136) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.Environment$1.render(Environment.java:313) at org.springframework.extensions.surf.extensibility.impl.DefaultExtensibilityDirectiveData.render(DefaultExtensibilityDirectiveData.java:119) at org.springframework.extensions.surf.extensibility.impl.ExtensibilityModelImpl.merge(ExtensibilityModelImpl.java:414) at org.springframework.extensions.surf.extensibility.impl.AbstractExtensibilityDirective.merge(AbstractExtensibilityDirective.java:170) at org.springframework.extensions.surf.extensibility.impl.AbstractExtensibilityDirective.execute(AbstractExtensibilityDirective.java:137) at freemarker.core.Environment.visit(Environment.java:341) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:136) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.MixedContent.accept(MixedContent.java:93) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.Environment$1.render(Environment.java:313) at org.springframework.extensions.surf.extensibility.impl.DefaultExtensibilityDirectiveData.render(DefaultExtensibilityDirectiveData.java:119) at org.springframework.extensions.surf.extensibility.impl.ExtensibilityModelImpl.merge(ExtensibilityModelImpl.java:414) at org.springframework.extensions.surf.extensibility.impl.AbstractExtensibilityDirective.merge(AbstractExtensibilityDirective.java:170) at org.springframework.extensions.surf.extensibility.impl.AbstractExtensibilityDirective.execute(AbstractExtensibilityDirective.java:137) at freemarker.core.Environment.visit(Environment.java:341) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:136) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.Environment.process(Environment.java:243) at org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:192) ... 58 more

Caused by: java.io.FileNotFoundException: Template "org/alfresco/components/form/controls/tipoProfiloTipoFirmaSelectOne.ftl" not found. at freemarker.template.Configuration.getTemplate(Configuration.java:742) at freemarker.core.Environment.getTemplateForInclusion(Environment.java:1694) at freemarker.core.Include.accept(Include.java:159) ... 136 more

Any help is more than welcome.

Greeetings,

1 Solution

Accepted Solutions
Highlighted
kalpesh_c2
Senior Member

Re: Spring surf form extension give me java.io.FileNotFoundException: Template

Jump to solution

Hi, Marco 

Make sure the file tipoProfiloTipoFirmaSelectOne.ftl is available in folder location
tomcat\shared\classes\alfresco\web-extension\site-webscripts\org\alfresco\components\form\controls\

else you have to create tipoProfiloTipoFirmaSelectOne.ftl file in above location.

if you are using sdk then path YOUR_PROJECT\src\main\amp\config\alfresco\web-extension\site-webscripts\org\alfresco\components\form\controls\

else you to have create tipoProfiloTipoFirmaSelectOne.ftl file in above location.

 

Thanks,
Kalpesh

ContCentric

4 Replies
douglascrp
Advanced II

Re: Spring surf form extension give me java.io.FileNotFoundException: Template

Jump to solution

How are you packaging your project into an AMP file?

Are you using the Alfresco SDK? If yes, which version?

If you check the following link you will see a sample project containing two custom form controls.

alfresco-value-assistance/alfresco-value-assistance-share/alfresco-value-assistance-share/src/main/a... 

I hope that helps you finding what is wrong with your project.

Highlighted
kalpesh_c2
Senior Member

Re: Spring surf form extension give me java.io.FileNotFoundException: Template

Jump to solution

Hi, Marco 

Make sure the file tipoProfiloTipoFirmaSelectOne.ftl is available in folder location
tomcat\shared\classes\alfresco\web-extension\site-webscripts\org\alfresco\components\form\controls\

else you have to create tipoProfiloTipoFirmaSelectOne.ftl file in above location.

if you are using sdk then path YOUR_PROJECT\src\main\amp\config\alfresco\web-extension\site-webscripts\org\alfresco\components\form\controls\

else you to have create tipoProfiloTipoFirmaSelectOne.ftl file in above location.

 

Thanks,
Kalpesh

ContCentric

4535992
Established Member II

Re: Spring surf form extension give me java.io.FileNotFoundException: Template

Jump to solution

ty i solved it was a strange error of my applicative nothing to do with alfresco

4535992
Established Member II

Re: Spring surf form extension give me java.io.FileNotFoundException: Template

Jump to solution

ty i solved it was a strange error of my applicative nothing to do with alfresco.