You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Ramon Buckland (JIRA)" <ji...@activemq.org> on 2006/03/21 06:49:25 UTC

[jira] Created: (SM-356) XSL Router
XSL Router <jbi:setOutProperty 
-------------------------------

         Key: SM-356
         URL: http://jira.activemq.org/jira//browse/SM-356
     Project: ServiceMix
        Type: Bug

  Components: servicemix-components  
    Versions: 3.0    
 Environment: Java 1.5.0_01
Linux
    Reporter: Ramon Buckland
    Priority: Minor
     Fix For: 3.0
 Attachments: xslRouterBugSample.zip

When setting the property whilst invoking a service, local variables are not resolvable and cause
a NPE error message to occur.

Attached is a sample config  with a 
hotfolder forwarding to the XSL router, the XSL router setting some properties and invoking the trace component.

(In sample is servicemix.xml, router.xsl and hotfolder with test file to copy)

This is the error message received

INFO - DeliveryChannelImpl.createExchangeFactory(162) | default destination serviceName for filePollerIN = {http://servicemix.com/demo/}xsltRouter
file:/home/rbuckland/projects/xslRouterBugSample/router.xsl; Line #24; Column #21;
        Sending message to foo:trace
        Expecting Properties from foo.trace to show
        property1=GlobalParamValue
        property2=localParamValue
        property3=localParamVariable
file:/home/rbuckland/projects/xslRouterBugSample/router.xsl; Line #35; Column #71; Variable not resolvable: localParam
file:/home/rbuckland/projects/xslRouterBugSample/router.xsl; Line #35; Column #71; java.lang.NullPointerException
file:/home/rbuckland/projects/xslRouterBugSample/router.xsl; Line #36; Column #74; Variable not resolvable: localVariable
file:/home/rbuckland/projects/xslRouterBugSample/router.xsl; Line #36; Column #74; java.lang.NullPointerException
INFO - TraceComponent.onMessageExchange(63) | Exchange: org.apache.servicemix.jbi.messaging.InOnlyImpl@fe315d received IN message: org.apache.servicemix.jbi.messaging.NormalizedMessageImpl@5aebd9{properties: {org.apache.servicemix.file.name=test-file.xml, property1=GlobalParamValue, org.apache.servicemix.file.path=/home/rbuckland/projects/xslRouterBugSample/inHotFolder/test-file.xml}}


This XSL snippet that caused this error message 

   <xsl:param name="globalParam" select="'GlobalParamValue'"/>

   <!-- ========================================================
    | Call foo.trace, showing it doesn't copy
    | the locally create variable
    -->
   <xsl:template match="/*">
       <xsl:param name="localParam" select="'localParamValue'"/>
       <xsl:variable name="localVariable" select="'localParamVariable'"/>

       <xsl:message>
        Sending message to foo:trace
        Expecting Properties from foo.trace to show
        property1=<xsl:value-of select="$globalParam"/>
        property2=<xsl:value-of select="$localParam"/>
        property3=<xsl:value-of select="$localVariable"/>
       </xsl:message>

       <jbi:invoke service="foo:trace">
           <jbi:copyProperties/>
           <jbi:setOutProperty name="property1" select="$globalParam"/>
           <jbi:setOutProperty name="property2" select="$localParam"/>
           <jbi:setOutProperty name="property3" select="$localVariable"/>
           <xsl:call-template name="copy-tree"/>
       </jbi:invoke>
   </xsl:template>




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.activemq.org/jira//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (SM-356) XSL Router Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-356?page=all ]

Guillaume Nodet updated SM-356:
-------------------------------

    Fix Version/s:     (was: 3.0.1)

> XSL Router <jbi:setOutProperty
> ------------------------------
>
>                 Key: SM-356
>                 URL: https://issues.apache.org/activemq/browse/SM-356
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-components
>    Affects Versions: 3.0.1
>         Environment: Java 1.5.0_01
> Linux
>            Reporter: Ramon Buckland
>            Priority: Minor
>         Attachments: xslRouterBugSample.zip
>
>
> When setting the property whilst invoking a service, local variables are not resolvable and cause
> a NPE error message to occur.
> Attached is a sample config  with a 
> hotfolder forwarding to the XSL router, the XSL router setting some properties and invoking the trace component.
> (In sample is servicemix.xml, router.xsl and hotfolder with test file to copy)
> This is the error message received
> INFO - DeliveryChannelImpl.createExchangeFactory(162) | default destination serviceName for filePollerIN = {http://servicemix.com/demo/}xsltRouter
> file:/home/rbuckland/projects/xslRouterBugSample/router.xsl; Line #24; Column #21;
>         Sending message to foo:trace
>         Expecting Properties from foo.trace to show
>         property1=GlobalParamValue
>         property2=localParamValue
>         property3=localParamVariable
> file:/home/rbuckland/projects/xslRouterBugSample/router.xsl; Line #35; Column #71; Variable not resolvable: localParam
> file:/home/rbuckland/projects/xslRouterBugSample/router.xsl; Line #35; Column #71; java.lang.NullPointerException
> file:/home/rbuckland/projects/xslRouterBugSample/router.xsl; Line #36; Column #74; Variable not resolvable: localVariable
> file:/home/rbuckland/projects/xslRouterBugSample/router.xsl; Line #36; Column #74; java.lang.NullPointerException
> INFO - TraceComponent.onMessageExchange(63) | Exchange: org.apache.servicemix.jbi.messaging.InOnlyImpl@fe315d received IN message: org.apache.servicemix.jbi.messaging.NormalizedMessageImpl@5aebd9{properties: {org.apache.servicemix.file.name=test-file.xml, property1=GlobalParamValue, org.apache.servicemix.file.path=/home/rbuckland/projects/xslRouterBugSample/inHotFolder/test-file.xml}}
> This XSL snippet that caused this error message 
>    <xsl:param name="globalParam" select="'GlobalParamValue'"/>
>    <!-- ========================================================
>     | Call foo.trace, showing it doesn't copy
>     | the locally create variable
>     -->
>    <xsl:template match="/*">
>        <xsl:param name="localParam" select="'localParamValue'"/>
>        <xsl:variable name="localVariable" select="'localParamVariable'"/>
>        <xsl:message>
>         Sending message to foo:trace
>         Expecting Properties from foo.trace to show
>         property1=<xsl:value-of select="$globalParam"/>
>         property2=<xsl:value-of select="$localParam"/>
>         property3=<xsl:value-of select="$localVariable"/>
>        </xsl:message>
>        <jbi:invoke service="foo:trace">
>            <jbi:copyProperties/>
>            <jbi:setOutProperty name="property1" select="$globalParam"/>
>            <jbi:setOutProperty name="property2" select="$localParam"/>
>            <jbi:setOutProperty name="property3" select="$localVariable"/>
>            <xsl:call-template name="copy-tree"/>
>        </jbi:invoke>
>    </xsl:template>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira