Uploaded image for project: 'XalanJ2'
  1. XalanJ2
  2. XALANJ-1887

xalan 2.6.0 is broken when using rhino1_5R5 js.jar

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 2.6
    • 2.7
    • None
    • Operating System: Windows XP
      Platform: PC
    • 29500

    Description

      I cannot use JavaScript extensions with xalan 2.6.0 and rhino1_5R5 - js.jar.
      Even without any javascipt and only the simple Xalan elements in the XSLT (
      <xalan:component prefix="date-ext" functions="formatdate">
      <xalan:script lang="javascript">
      </xalan:script>
      </xalan:component>) to define the extension, the following
      stack trace occurs. When you go back to rhino15R1, everything works fine.

      C:\Documents and Settings\mark.meninger.WLOO\My Documents\Plano Docs\XML
      documents\xalan>java -cp xercesImpl.jar;xml-api
      s.jar;xalan.jar;js.jar;bsf.jar org.apache.xalan.xslt.Process -in -xsl -out
      Missing argument for option: -IN
      Missing argument for option: -XSL
      Missing argument for option: -OUT
      Error: No stylesheet or input xml is specified. Run this command without any
      option for usage instructions.

      C:\Documents and Settings\mark.meninger.WLOO\My Documents\Plano Docs\XML
      documents\xalan>xalan.bat adt_with_data.xml adt
      _with_data_js_ext.xsl myxml.xml

      C:\Documents and Settings\mark.meninger.WLOO\My Documents\Plano Docs\XML
      documents\xalan>SET tmp=xercesImpl.jar;xml-apis
      .jar;xalan.jar;js.jar;bsf.jar

      C:\Documents and Settings\mark.meninger.WLOO\My Documents\Plano Docs\XML
      documents\xalan>java -cp xercesImpl.jar;xml-api
      s.jar;xalan.jar;js.jar;bsf.jar org.apache.xalan.xslt.Process -in
      adt_with_data.xml -xsl adt_with_data_js_ext.xsl -out my
      xml.xml
      java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.apache.xalan.extensions.ExtensionHandlerGeneral.<init>(Unknown
      Source)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
      Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
      Source)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
      Source)
      at java.lang.reflect.Constructor.newInstance(Unknown Source)
      at org.apache.xalan.extensions.ExtensionNamespaceSupport.launch
      (Unknown Source)
      at org.apache.xalan.extensions.ExtensionsTable.<init>(Unknown Source)
      at org.apache.xalan.transformer.TransformerImpl.setExtensionsTable
      (Unknown Source)
      at org.apache.xalan.transformer.TransformerImpl.transformNode(Unknown
      Source)
      at org.apache.xalan.transformer.TransformerImpl.transform(Unknown
      Source)
      at org.apache.xalan.transformer.TransformerImpl.transform(Unknown
      Source)
      at org.apache.xalan.transformer.TransformerImpl.transform(Unknown
      Source)
      at org.apache.xalan.xslt.Process.main(Unknown Source)
      Caused by: com.ibm.bsf.BSFException: JavaScript Error: Internal Error:
      java.lang.IllegalArgumentException: Line number c
      an not be negative:-1
      at com.ibm.bsf.engines.javascript.JavaScriptEngine.handleError
      (JavaScriptEngine.java:182)
      at com.ibm.bsf.engines.javascript.JavaScriptEngine.eval
      (JavaScriptEngine.java:87)
      at com.ibm.bsf.util.BSFEngineImpl.exec(BSFEngineImpl.java:106)
      ... 17 more
      javax.xml.transform.TransformerException:
      java.lang.reflect.InvocationTargetException
      at org.apache.xalan.extensions.ExtensionNamespaceSupport.launch
      (Unknown Source)
      at org.apache.xalan.extensions.ExtensionsTable.<init>(Unknown Source)
      at org.apache.xalan.transformer.TransformerImpl.setExtensionsTable
      (Unknown Source)
      at org.apache.xalan.transformer.TransformerImpl.transformNode(Unknown
      Source)
      at org.apache.xalan.transformer.TransformerImpl.transform(Unknown
      Source)
      at org.apache.xalan.transformer.TransformerImpl.transform(Unknown
      Source)
      at org.apache.xalan.transformer.TransformerImpl.transform(Unknown
      Source)
      at org.apache.xalan.xslt.Process.main(Unknown Source)
      Caused by: java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
      Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
      Source)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
      Source)
      at java.lang.reflect.Constructor.newInstance(Unknown Source)
      ... 8 more
      Caused by: javax.xml.transform.TransformerException: Could not compile
      extension
      at org.apache.xalan.extensions.ExtensionHandlerGeneral.<init>(Unknown
      Source)
      ... 12 more
      Caused by: java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      ... 13 more
      Caused by: com.ibm.bsf.BSFException: JavaScript Error: Internal Error:
      java.lang.IllegalArgumentException: Line number c
      an not be negative:-1
      at com.ibm.bsf.engines.javascript.JavaScriptEngine.handleError
      (JavaScriptEngine.java:182)
      at com.ibm.bsf.engines.javascript.JavaScriptEngine.eval
      (JavaScriptEngine.java:87)
      at com.ibm.bsf.util.BSFEngineImpl.exec(BSFEngineImpl.java:106)
      ... 17 more
      ---------
      java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
      Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
      Source)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
      Source)
      at java.lang.reflect.Constructor.newInstance(Unknown Source)
      at org.apache.xalan.extensions.ExtensionNamespaceSupport.launch
      (Unknown Source)
      at org.apache.xalan.extensions.ExtensionsTable.<init>(Unknown Source)
      at org.apache.xalan.transformer.TransformerImpl.setExtensionsTable
      (Unknown Source)
      at org.apache.xalan.transformer.TransformerImpl.transformNode(Unknown
      Source)
      at org.apache.xalan.transformer.TransformerImpl.transform(Unknown
      Source)
      at org.apache.xalan.transformer.TransformerImpl.transform(Unknown
      Source)
      at org.apache.xalan.transformer.TransformerImpl.transform(Unknown
      Source)
      at org.apache.xalan.xslt.Process.main(Unknown Source)
      Caused by: javax.xml.transform.TransformerException: Could not compile
      extension
      at org.apache.xalan.extensions.ExtensionHandlerGeneral.<init>(Unknown
      Source)
      ... 12 more
      Caused by: java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      ... 13 more
      Caused by: com.ibm.bsf.BSFException: JavaScript Error: Internal Error:
      java.lang.IllegalArgumentException: Line number c
      an not be negative:-1
      at com.ibm.bsf.engines.javascript.JavaScriptEngine.handleError
      (JavaScriptEngine.java:182)
      at com.ibm.bsf.engines.javascript.JavaScriptEngine.eval
      (JavaScriptEngine.java:87)
      at com.ibm.bsf.util.BSFEngineImpl.exec(BSFEngineImpl.java:106)
      ... 17 more

      file:///C:/Documents%20and%20Settings/mark.meninger.WLOO/My%20Documents/Plano%
      20Docs/XML%20documents/xalan/adt_with_data
      _js_ext.xsl; Line #83; Column #67; XSLT Error
      (javax.xml.transform.TransformerException): java.lang.NullPointerException

      Attachments

        Activity

          People

            Unassigned Unassigned
            mmeninger@golden.net Mark Meninger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: