Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-2561

Included XSL files' URI not being resolved for actions with result type="xslt"

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.11.1
    • Fix Version/s: 2.5.8
    • Component/s: None
    • Labels:
      None
    • Environment:

      Windows XP/SP2; WebSphere Application Server v6.1.0.7.

    • Flags:
      Important

      Description

      Make Struts action e.g:

      <action name="DealList" class="DealSheetAction">
      	<result type="xslt" name="success">
      		<param name="exposedValue">{deals}</param>
      		<param name="location">/WEB-INF/xsl/dealList.xsl</param>
      	</result>
      </action>
      

      Supply any XML by including some code like this in action class:

      public String[] getMonths(){
              String months[] =
              {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
               "July", "Aug", "Sep", "Oct", "Nov", "Dec"};
              return months;
          }
      

      Supply the XSL file, sort of this:

      <?xml version="1.0" encoding="UTF-8"?>
      <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      	<xsl:include href="/WEB-INF/xsl/pageHeader.xsl"/>
      	<xsl:include href="/WEB-INF/xsl/pageFooter.xsl"/>
      <xsl:output method="html" encoding="UTF-8" indent="no"/>
      
      <xsl:template match="result">
        <html>
        <body>
        <xsl:call-template name="pageheader"/>
        <br/>
        There are following months in a year:<br></br>
        <xsl:for-each select="//item[position() &gt; 0 and position() &lt; 13]">
        		<xsl:value-of select="."/>,
        </xsl:for-each>
        <xsl:call-template name="pagefooter"/>
        </body>
        </html>
      </xsl:template>
      </xsl:stylesheet>
      

      At a run time it will generate the error:

      [3/24/08 10:05:03:927 EDT] 0000001e SystemErr     R SystemId Unknown; Line #3; Column #51; Had IO Exception with stylesheet file: /WEB-INF/xsl/pageFooter.xsl
      [3/24/08 10:05:03:927 EDT] 0000001e SystemErr     R SystemId Unknown; Line #19; Column #41; javax.xml.transform.TransformerException: ElemTemplateElement error: pagefooter
      

      with the following stack:

      java.lang.NullPointerException
      	at org.apache.struts2.views.xslt.XSLTResult.execute(XSLTResult.java:325)
      	at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
      	at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)
      	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      	at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      	at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)
      	at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)
      	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      	at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      	at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      	at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:167)
      	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      	at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      	at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      	at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      	at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      	at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      	at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:207)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      	at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      	at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:74)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      	at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      	at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:127)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      	at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      	at org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:107)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      	at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      	at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:206)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      	at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      	at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:115)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      	at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      	at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:143)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      	at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      	at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:121)
      	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      	at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      	at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      	at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      	at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:123)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      	at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      	at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
      	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
      	at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
      	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
      	at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
      	at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504)
      	at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
      	at com.tss.admin.revreal.web.RRDispatcher.doFilter(RRDispatcher.java:68)
      	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:761)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:688)
      	at com.ibm.ws.wswebcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:96)
      	at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilters(DefaultExtensionProcessor.java:737)
      	at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:697)
      	at com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:113)
      	at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3184)
      	at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:254)
      	at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
      	at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
      	at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:111)
      	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)
      	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:383)
      	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:263)
      	at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
      	at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
      	at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
      	at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
      	at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
      	at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
      	at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
      	at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
      	at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
      	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
      

      None of the <xsl:include> directive variations ("../filename", "WEB-INF/filename" etc) don't work.

      Short analysis:

      • the URIResolver method in XSLTResult class is accessing the action context to get the realPath and use it as a base for included XSL file:
      protected URIResolver getURIResolver () {
           return new ServletURIResolver (
               ServletActionContext.getServletContext());
      }
      

      Path returned during the test was correct, like C:\Projects\DealApplication\WebContent. The XSL file existed and was well formed.

      Suggestion: the base might be ignored and not applied to URI.

        Issue Links

          Activity

          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build Struts-JDK7-master #553 (See https://builds.apache.org/job/Struts-JDK7-master/553/)
          WW-2561 Throws a Struts exception when there is a bad character in (lukaszlenart: rev ef2939ffd0663f8a5d86fafa105deb7183e2ac2d)

          • (edit) core/src/test/java/org/apache/struts2/views/xslt/XSLTResultTest.java
          • (edit) core/src/main/java/org/apache/struts2/views/xslt/XSLTResult.java
          • (add) core/src/test/resources/XSLTResultTest.bad.character.xsl
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Struts-JDK7-master #553 (See https://builds.apache.org/job/Struts-JDK7-master/553/ ) WW-2561 Throws a Struts exception when there is a bad character in (lukaszlenart: rev ef2939ffd0663f8a5d86fafa105deb7183e2ac2d) (edit) core/src/test/java/org/apache/struts2/views/xslt/XSLTResultTest.java (edit) core/src/main/java/org/apache/struts2/views/xslt/XSLTResult.java (add) core/src/test/resources/XSLTResultTest.bad.character.xsl
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit ef2939ffd0663f8a5d86fafa105deb7183e2ac2d in struts's branch refs/heads/master from Lukasz Lenart
          [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=ef2939f ]

          WW-2561 Throws a Struts exception when there is a bad character in template

          Show
          jira-bot ASF subversion and git services added a comment - Commit ef2939ffd0663f8a5d86fafa105deb7183e2ac2d in struts's branch refs/heads/master from Lukasz Lenart [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=ef2939f ] WW-2561 Throws a Struts exception when there is a bad character in template
          Hide
          mrdon Don Brown added a comment -

          "I repeat: just rename any existing template and run. You may keep your include statement referring to any XSL file, existing or not,
          as long as it does not have a declaration for that template. "

          What do you mean by that? We already have a test for a non-existent XSLT, and the exception is handled correctly. I'm working off trunk, so if you could perhaps create a unit test to replicate the error, it would really help.

          Show
          mrdon Don Brown added a comment - "I repeat: just rename any existing template and run. You may keep your include statement referring to any XSL file, existing or not, as long as it does not have a declaration for that template. " What do you mean by that? We already have a test for a non-existent XSLT, and the exception is handled correctly. I'm working off trunk, so if you could perhaps create a unit test to replicate the error, it would really help.
          Hide
          voronv Victor Voronenko added a comment -

          I believe the transformer may not look for included non-existing file until it fails to locate some object (e.g. template) in main XSL file.
          That's why the easiest way to trigger an exception for me was to call the non-existing XSL template.

          BTW the EOF character was breaking the transformation for me when it was coming with the source XML.
          In your tests you've been including it in templates.

          I repeat: just rename any existing template and run. You may keep your include statement referring to any XSL file, existing or not,
          as long as it does not have a declaration for that template.

          (I cannot exclude of course a possibility that you are working with different version of XSLTResult - better than mine. How can I get
          yours to compare?)

          Show
          voronv Victor Voronenko added a comment - I believe the transformer may not look for included non-existing file until it fails to locate some object (e.g. template) in main XSL file. That's why the easiest way to trigger an exception for me was to call the non-existing XSL template. BTW the EOF character was breaking the transformation for me when it was coming with the source XML. In your tests you've been including it in templates. I repeat: just rename any existing template and run. You may keep your include statement referring to any XSL file, existing or not, as long as it does not have a declaration for that template. (I cannot exclude of course a possibility that you are working with different version of XSLTResult - better than mine. How can I get yours to compare?)
          Hide
          mrdon Don Brown added a comment -

          I'm afraid I still can't reproduce this one. I've tried putting the EOF character in the main template (template parse exception), include (process exception), and included a non-existent file (process exception). If you know of something else to try, please reopen this.

          Show
          mrdon Don Brown added a comment - I'm afraid I still can't reproduce this one. I've tried putting the EOF character in the main template (template parse exception), include (process exception), and included a non-existent file (process exception). If you know of something else to try, please reopen this.
          Hide
          voronv Victor Voronenko added a comment - - edited

          Actually I was not correct: the right notation for <xsl:include> in Struts is:
          <xsl:include href="response:/WEB-INF/xsl/applicationUtils.xsl"/>.

          But it does not change a thing and this thread is not quite about a problem with <xsl:include>
          That was just one way to provoke uncatchable exception.

          There are still others. For example, transformer breaks when source XML includes illegal characters like this one:

          &#x1a;
          

          or EOF.

          But I already reported this issue somewhere else on this site.

          Show
          voronv Victor Voronenko added a comment - - edited Actually I was not correct: the right notation for <xsl:include> in Struts is: <xsl:include href="response:/WEB-INF/xsl/applicationUtils.xsl"/>. But it does not change a thing and this thread is not quite about a problem with <xsl:include> That was just one way to provoke uncatchable exception. There are still others. For example, transformer breaks when source XML includes illegal characters like this one: &#x1a; or EOF . But I already reported this issue somewhere else on this site.
          Hide
          voronv Victor Voronenko added a comment -

          Sorry, but this issue IS NOT QUITE RESOLVED.

          It still generates the error for <xsl:include> in the latest XSLTResult.java class with enchanced error handling added by Don.

          The error occurrs in execute() method right BEFORE Don's code that would set the transformer.setErrorListener:

          if (location != null) {
          templates = getTemplates(location);
          transformer = templates.newTransformer(); // <---------- here (java.lang.NullPointerException)
          } else
          transformer = TransformerFactory.newInstance().newTransformer();

          The error message is:
          ERROR [com.tss.admin.revreal.transform.XSLTResult] - Unable to render XSLT Template, '/WEB-INF/xsl/dealSheet.xsl'
          java.lang.NullPointerException

          SystemErr R (Location of error unknown)Cannot handle procotol of resource /WEB-INF/xsl/applicationUtils.xsl

          This misspelled word from the message can serve as a marker to find the origin of an error: "p r o c o t o l " ("proCoTol" instead of "proToCol").

          Googling this issue may bring a very old advice from Don to add the "request:" prefix to the included URL, that is:
          <xsl:include href="request:/WEB-INF/xsl/applicationUtils.xsl"/>

          Unfortunately, does not work for me.

          Show
          voronv Victor Voronenko added a comment - Sorry, but this issue IS NOT QUITE RESOLVED. It still generates the error for <xsl:include> in the latest XSLTResult.java class with enchanced error handling added by Don. The error occurrs in execute() method right BEFORE Don's code that would set the transformer.setErrorListener: if (location != null) { templates = getTemplates(location); transformer = templates.newTransformer(); // <---------- here (java.lang.NullPointerException) } else transformer = TransformerFactory.newInstance().newTransformer(); The error message is: ERROR [com.tss.admin.revreal.transform.XSLTResult] - Unable to render XSLT Template, '/WEB-INF/xsl/dealSheet.xsl' java.lang.NullPointerException SystemErr R (Location of error unknown)Cannot handle procotol of resource /WEB-INF/xsl/applicationUtils.xsl This misspelled word from the message can serve as a marker to find the origin of an error: "p r o c o t o l " ("proCoTol" instead of "proToCol"). Googling this issue may bring a very old advice from Don to add the "request:" prefix to the included URL, that is: <xsl:include href="request:/WEB-INF/xsl/applicationUtils.xsl"/> Unfortunately, does not work for me.
          Hide
          voronv Victor Voronenko added a comment -

          It looks like this was a clone of the previously reported and resolved (as it says) issue: WW-2334 (XSLTResult does not work with stylesheets that use xsl:include or xsl:import).

          Fix version to be 2.1.1.

          If this is true then current issue can be closed.

          Show
          voronv Victor Voronenko added a comment - It looks like this was a clone of the previously reported and resolved (as it says) issue: WW-2334 (XSLTResult does not work with stylesheets that use xsl:include or xsl:import). Fix version to be 2.1.1. If this is true then current issue can be closed.

            People

            • Assignee:
              lukaszlenart Lukasz Lenart
              Reporter:
              voronv Victor Voronenko
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development