title: Calling Java function via XSLT in JBoss throws transformer exception (works in tomcat)
body: <p>I have a public static 0 argument function in Java that I am trying to call through XSLT in a webapp.  When I run it in tomcat (5.5.34), it works fine, but when I run it in JBoss (6.1 final) I get the error</p>
  
  <pre><code>TransformerException: Instance method call to method getScoreXMLTagClass requires an
  Object instance as first argument
  </code></pre>
  
  <p>I'm wondering if JBoss is using a different XSLT parser - I believe I want to use Xalan, and I've heard that Saxon (which is used in some parts of this webapp) can have compatibility issues with this kind of thing. Is there a way to tell which it's using/force it to use a different one?  Apologies if I've missed some vital information here, this is not my area of expertise - let me know if some other info is needed.</p>
  
  <p><strong>edit:</strong>
  To show how this is being used, here's the code</p>
  
  <pre><code>&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
  ...
  xmlns:resources="java:com.example.MyResources"
  &lt;xmlns:rclass="java:com.example.MyClass"&gt;
      &lt;xsl:template name="scoreString"&gt;
      &lt;xsl:param name="string" /&gt;
      &lt;xsl:value-of select="resources:getString(rclass:getData(),$string,null)"/&gt;
  &lt;/xsl:template&gt;
  
  &lt;xsl:template match="/"&gt;
  &lt;xsl:if test="normalize-space(.)"&gt;
  &lt;div&gt;
  &lt;xsl:for-each select="s:scores/s:score"&gt;
  &lt;xsl:for-each select="s:net"&gt;
  &lt;dl&gt;
  &lt;dt&gt;
      &lt;xsl:call-template name="scoreString"&gt;
      &lt;xsl:with-param name="string"&gt;network&lt;/xsl:with-param&gt;
          &lt;/xsl:call-template&gt;
      &lt;xsl:value-of select="@id"/&gt;
  &lt;/dt&gt;
  ...
  </code></pre>
  
  <p>I've shortened the class names to simplify it.  The equivalent error would be   </p>
  
  <pre><code>TransformerException: Instance method call to method getData requires an
  Object instance as first argument
  </code></pre>
  
  <p><strong>edit 2</strong></p>
  
  <p>the method is  </p>
  
  <pre><code>public static final Class getData()
  {
      return MyClass.class;
  }
  </code></pre>