[jbosstools-issues] [JBoss JIRA] Updated: (JBIDE-5644) Java bean "srcPath" not being set properly in some situation
Brian Fitzpatrick (JIRA)
jira-events at lists.jboss.org
Tue Jan 12 17:48:54 EST 2010
[ https://jira.jboss.org/jira/browse/JBIDE-5644?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brian Fitzpatrick updated JBIDE-5644:
-------------------------------------
Attachment: xmlNotWorking.zip
I was able to reproduce the issue Tom found also.
My test for XML templating is to:
1) Take CSV input
2) Map to a Java class
3) Output using an XSD template
I'm attaching the zip with the bits used. But I'm getting this when I try to run it:
Exception in thread "main" org.milyn.SmooksException: Failed to filter source.
at org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:72)
at org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:55)
at org.milyn.Smooks._filter(Smooks.java:470)
at org.milyn.Smooks.filterSource(Smooks.java:448)
at org.milyn.Smooks.filterSource(Smooks.java:422)
at org.jboss.tools.smooks.launch.SmooksLauncher.main(SmooksLauncher.java:81)
Caused by: org.milyn.SmooksException: Failed to apply FreeMarker template to fragment 'csv-set'. Resource: Target Profile: [[org.milyn.profile.profile#default_profile]], Selector: [#document], Selector Namespace URI: [null], Resource: [<?xml version="1.0" encoding="UTF-8"?>
<PersonAddr>
<first>${firstName?string}</first>
<last>${lastName?string}</last>
<country>${country?string}</country>
<gender>${gender?string}</gender>
<age>${age?string}</age>
</PersonAddr>], 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:377)
at org.milyn.delivery.sax.SAXHandler.endElement(SAXHandler.java:200)
at org.milyn.csv.CSVReader.parse(CSVReader.java:329)
at org.milyn.delivery.sax.SAXParser.parse(SAXParser.java:50)
at org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:69)
... 5 more
Caused by: freemarker.core.InvalidReferenceException: Expression firstName is undefined on line 3, column 14 in free-marker-template.
at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:134)
at freemarker.core.BuiltIn$stringBI._getAsTemplateModel(BuiltIn.java:358)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
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)
... 12 more
> Java bean "srcPath" not being set properly in some situation
> ------------------------------------------------------------
>
> Key: JBIDE-5644
> URL: https://jira.jboss.org/jira/browse/JBIDE-5644
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: smooks
> Reporter: Tom Fennelly
> Assignee: Xue Peng
> Fix For: 3.1.0.CR2
>
> Attachments: xmlNotWorking.zip
>
>
> In some situations, the java bean srcPath is not being worked out properly. See the following flash: http://www.screencast.com/t/MDcyN2Nh
> I've tried other examples that work OK. The only difference I can see is that in the case of the example shown in the flash, there's just a single bean in the model. Perhaps it's something to do with the fact that it's the "root" bean?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbosstools-issues
mailing list