[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-7309) Testing a direct-to-source mapping errors out

Brian Fitzpatrick (JIRA) jira-events at lists.jboss.org
Tue Dec 14 12:48:52 EST 2010


    [ https://issues.jboss.org/browse/JBIDE-7309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570085#comment-12570085 ] 

Brian Fitzpatrick commented on JBIDE-7309:
------------------------------------------

I think this is fixed. Jiri, please reopen if that's not the case.

> Testing a direct-to-source mapping errors out 
> ----------------------------------------------
>
>                 Key: JBIDE-7309
>                 URL: https://issues.jboss.org/browse/JBIDE-7309
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: smooks
>    Affects Versions: 3.2.0.Beta2
>            Reporter: Brian Fitzpatrick
>            Assignee: Tom Fennelly
>            Priority: Critical
>             Fix For: 3.2.0.CR1
>
>         Attachments: PeriodicTable.xml, PeriodicTableOutput.xml, smooks-config.xml
>
>   Original Estimate: 0 minutes
>  Remaining Estimate: 0 minutes
>
> 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

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list