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

MethodResolver.convert converts CharSequence into Double

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.7
    • None
    • Xalan
    • None
    • all

    Description

      When using AggregateTransformer to convert xml results to html the exception below is encountered. This is due to the convertedArgs being incorrectly converted for the method String.replace(CharSequence,CharSequence). Right now MethodResolver.convert only can convert for types String, Object, Character, Boolean, and Number. Please add support for CharSequence.

      Thanks,

      Brian

      javax.xml.transform.TransformerException: java.lang.IllegalArgumentException: argument type mismatch
      at org.apache.xalan.extensions.ExtensionHandlerJavaPackage.callFunction(ExtensionHandlerJavaPackage.java:420)
      at org.apache.xalan.extensions.ExtensionHandlerJavaPackage.callFunction(ExtensionHandlerJavaPackage.java:438)
      at org.apache.xalan.extensions.ExtensionsTable.extFunction(ExtensionsTable.java:220)
      at org.apache.xalan.transformer.TransformerImpl.extFunction(TransformerImpl.java:473)
      at org.apache.xpath.functions.FuncExtFunction.execute(FuncExtFunction.java:206)
      at org.apache.xpath.Expression.executeCharsToContentHandler(Expression.java:311)
      at org.apache.xalan.templates.ElemValueOf.execute(ElemValueOf.java:272)
      at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
      at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:392)
      at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:246)
      at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
      at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
      at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
      at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:392)
      at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:246)
      at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:393)
      at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:176)
      at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
      at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
      at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
      at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:126)
      at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
      at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
      at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:393)
      at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:176)
      at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
      at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
      at org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.java:423)
      at org.apache.xalan.templates.ElemForEach.execute(ElemForEach.java:263)
      at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
      at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:392)
      at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:246)
      at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
      at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
      at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
      at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
      at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:393)
      at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:176)
      at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
      at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2281)
      at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1367)
      at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:709)
      at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1284)
      at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1262)
      at org.apache.tools.ant.taskdefs.optional.junit.Xalan2Executor.execute(Xalan2Executor.java:85)
      at org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer.transform(AggregateTransformer.java:146)
      at test.AppletRunner$1.run(AppletRunner.java:88)
      at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.IllegalArgumentException: argument type mismatch
      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.ExtensionHandlerJavaPackage.callFunction(ExtensionHandlerJavaPackage.java:402)
      ... 47 more

      Attachments

        Activity

          People

            minchau@ca.ibm.com Brian Minchau
            btknorr Brian Knorr
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: