Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-7309

Testing a direct-to-source mapping errors out

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Critical Critical
    • LATER
    • 3.2.0.Beta2
    • smooks
    • None
    • Hide

      If the connections are added in the correct order ... parent first, then child... this issue does not arise. Some of the mappers do accomodate removing od child connections on addition of a parent collection connection, but because there are so many impls of this TreeNodeEditPart... I didn't catch them all.

      Show
      If the connections are added in the correct order ... parent first, then child... this issue does not arise. Some of the mappers do accomodate removing od child connections on addition of a parent collection connection, but because there are so many impls of this TreeNodeEditPart... I didn't catch them all.

      While playing with some ideas, I tried using the Smooks Run Configuration for testing a XML-to-XML mapping. And I don't think I've done anything too wacky, but I'm getting some interesting results when I try to test the configuration.

      Any ideas? I'll attach the config, input, and output XML files...

      Oct 11, 2010 12:22:58 PM freemarker.log.JDK14LoggerFactory$JDK14Logger error
      SEVERE:

      Error on line 4, column 15 in free-marker-template
      Expecting a string, date or number here, Expression .vars["PERIODIC_TABLE"]["ATOM/NAME"] is instead a freemarker.ext.dom.NodeListModel
      The problematic instruction:
      ----------
      ==> ${.vars["PERIODIC_TABLE"]["ATOM/NAME"]} [on line 4, column 13 in free-marker-template]
      ----------

      Java backtrace for programmers:
      ----------
      freemarker.core.NonStringException: Error on line 4, column 15 in free-marker-template
      Expecting a string, date or number here, Expression .vars["PERIODIC_TABLE"]["ATOM/NAME"] is instead a freemarker.ext.dom.NodeListModel
      at freemarker.core.Expression.getStringValue(Expression.java:126)
      at freemarker.core.Expression.getStringValue(Expression.java:93)
      at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
      at freemarker.core.Environment.visit(Environment.java:208)
      at freemarker.core.MixedContent.accept(MixedContent.java:92)
      at freemarker.core.Environment.visit(Environment.java:208)
      at freemarker.core.Environment.process(Environment.java:188)
      at freemarker.template.Template.process(Template.java:232)
      at org.milyn.templating.freemarker.FreeMarkerTemplateProcessor.applyTemplate(FreeMarkerTemplateProcessor.java:356)
      at org.milyn.templating.freemarker.FreeMarkerTemplateProcessor.applyTemplate(FreeMarkerTemplateProcessor.java:349)
      at org.milyn.templating.freemarker.FreeMarkerTemplateProcessor.visitAfter(FreeMarkerTemplateProcessor.java:327)
      at org.milyn.delivery.sax.SAXHandler.visitAfter(SAXHandler.java:389)
      at org.milyn.delivery.sax.SAXHandler.endElement(SAXHandler.java:204)
      at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
      at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      at org.milyn.delivery.sax.SAXParser.parse(SAXParser.java:57)
      at org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:75)
      at org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:61)
      at org.milyn.Smooks._filter(Smooks.java:519)
      at org.milyn.Smooks.filterSource(Smooks.java:488)
      at org.milyn.Smooks.filterSource(Smooks.java:462)
      at org.jboss.tools.smooks.launch.SmooksLauncher.main(SmooksLauncher.java:81)
      Exception in thread "main" org.milyn.SmooksException: Failed to filter source.
      at org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:86)
      at org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:61)
      at org.milyn.Smooks._filter(Smooks.java:519)
      at org.milyn.Smooks.filterSource(Smooks.java:488)
      at org.milyn.Smooks.filterSource(Smooks.java:462)
      at org.jboss.tools.smooks.launch.SmooksLauncher.main(SmooksLauncher.java:81)
      Caused by: org.milyn.SmooksException: Failed to apply FreeMarker template to fragment 'PERIODIC_TABLE'. Resource: Target Profile: [org.milyn.profile.profile#default_profile], Selector: document, Selector Namespace URI: [null], Resource: [<?xml version="1.0" encoding="UTF-8"?>
      <html>
      <section>
      <h1>${.vars["PERIODIC_TABLE"]["ATOM/NAME"]}</h1>
      <p>${.vars["PERIODIC_TABLE"]["ATOM/SYMBOL"]}</p>
      <p>${.vars["PERIODIC_TABLE"]["ATOM/ATOMIC_NUMBER"]}</p>
      <p>${.vars["PERIODIC_TABLE"]["ATOM/ATOMIC_WEIGHT"]}</p>
      </section>
      </html>], Num Params: [4]
      at org.milyn.templating.freemarker.FreeMarkerTemplateProcessor.applyTemplate(FreeMarkerTemplateProcessor.java:359)
      at org.milyn.templating.freemarker.FreeMarkerTemplateProcessor.applyTemplate(FreeMarkerTemplateProcessor.java:349)
      at org.milyn.templating.freemarker.FreeMarkerTemplateProcessor.visitAfter(FreeMarkerTemplateProcessor.java:327)
      at org.milyn.delivery.sax.SAXHandler.visitAfter(SAXHandler.java:389)
      at org.milyn.delivery.sax.SAXHandler.endElement(SAXHandler.java:204)
      at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
      at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      at org.milyn.delivery.sax.SAXParser.parse(SAXParser.java:57)
      at org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:75)
      ... 5 more
      Caused by: freemarker.core.NonStringException: Error on line 4, column 15 in free-marker-template
      Expecting a string, date or number here, Expression .vars["PERIODIC_TABLE"]["ATOM/NAME"] is instead a freemarker.ext.dom.NodeListModel
      at freemarker.core.Expression.getStringValue(Expression.java:126)
      at freemarker.core.Expression.getStringValue(Expression.java:93)
      at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
      at freemarker.core.Environment.visit(Environment.java:208)
      at freemarker.core.MixedContent.accept(MixedContent.java:92)
      at freemarker.core.Environment.visit(Environment.java:208)
      at freemarker.core.Environment.process(Environment.java:188)
      at freemarker.template.Template.process(Template.java:232)
      at org.milyn.templating.freemarker.FreeMarkerTemplateProcessor.applyTemplate(FreeMarkerTemplateProcessor.java:356)
      ... 19 more

        1. smooks-config.xml
          1 kB
        2. smooks-config.xml
          1 kB
        3. smooks.txt
          5 kB
        4. PeriodicTableOutput.xml
          0.3 kB
        5. PeriodicTable.xml
          0.8 kB

            bfitzpat_rh Brian Fitzpatrick (Inactive)
            bfitzpat_rh Brian Fitzpatrick (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: