Skip to main content

I'm getting a weird error while using the XMLTemplater. 

JSONTemplater(XMLTemplaterFactory): The following error occurred near line 5, column 49 of the query:

JSONTemplater(XMLTemplaterFactory): invalid expression: syntax error, unexpected "{", expecting "external" or ":="

JSONTemplater(XMLTemplaterFactory): An error occurred while parsing the ROOT template

JSONTemplater(XMLTemplaterFactory): A fatal error has occurred. Check the logfile above for details

Very simple template, in fact I can reduce it to only "{}" and still get the error. It seems to be the same error as is talked about here:

https://knowledge.safe.com/questions/3947/xmltempl...

and mentioned by @pwittle (another post?) in the comments.

I don't remember a problem with this workbench before when we were at version 10.0 of ArcGIS Desktop (now at 10.3.1) if that helps. Underlying RDBMS on our geodatabase is Oracle 11g on the source data.

Version: FME Desktop 2015.0 Build 15250

Is this a documented bug that I'm not finding with the search engine?

Thanks,

~jess~

Could you post your template here, if it isn't too big?


{
        "routeNo" : fme:get-attribute("PLOW_ROUTE_SHORT"),
        "priority" : fme:get-attribute("PLOW_PRIORITY")
}

...But I can get the same error message using only "{}" as my template. Same when loading from textfile vs from an expression.


{
        "routeNo" : fme:get-attribute("PLOW_ROUTE_SHORT"),
        "priority" : fme:get-attribute("PLOW_PRIORITY")
}

As you probably already know, there is nothing obviously wrong with your template.

I would try deleting the JSONTemplater from your workspace and to re-create it, to see if there are some weird settings stuck in there.


{
        "routeNo" : fme:get-attribute("PLOW_ROUTE_SHORT"),
        "priority" : fme:get-attribute("PLOW_PRIORITY")
}

Something is weird, though. The error message above states that problem lies on line 5, column 49, which does not exist in this template.


As you probably already know, there is nothing obviously wrong with your template.

I would try deleting the JSONTemplater from your workspace and to re-create it, to see if there are some weird settings stuck in there.

Thanks for your responses @david_r

I'm going to try re-creating the workspace from scratch. My thinking is the same as yours on this. Ditto for your comment on the "line 5, column 49" - obviously there is a memory overflow or data mismatch or something strange going on with this workspace.


UPDATE: Completely rebuilt the workbench but the problem remains. I can avoid the error by removing the JSONTemplater/XMLTemplater from the workflow (both produce this error).


As you probably already know, there is nothing obviously wrong with your template.

I would try deleting the JSONTemplater from your workspace and to re-create it, to see if there are some weird settings stuck in there.

Starting to think its more to do with the transformer itself...


Certainly a problem with the ESRI ArcSDE reader. Works fine with a creator as source data, but as soon as I bring data from SDE, even with a blank {} template, same error. Now I just need to figure out which program (or both) needs to be re-installed... Any help Safe?


Certainly a problem with the ESRI ArcSDE reader. Works fine with a creator as source data, but as soon as I bring data from SDE, even with a blank {} template, same error. Now I just need to figure out which program (or both) needs to be re-installed... Any help Safe?

Maybe try inserting an AttributeKeeper just before the JSONTemplater so you do not get any unwanted attributes from the ArcSDE reader. Be sure to only select the attributes you really need.


UPDATE: Completely rebuilt the workbench but the problem remains. I can avoid the error by removing the JSONTemplater/XMLTemplater from the workflow (both produce this error).

That is strange. If the AttributeKeeper (see below) doesn't work, consider sending a minimalist workspace to reproduce the problem to Safe support.


That is strange. If the AttributeKeeper (see below) doesn't work, consider sending a minimalist workspace to reproduce the problem to Safe support.

Yeah that's where I am. Thanks for you help! I'll post back if a) AttributeKeeper works or b) Safe gets back to me with a fix.


Could you post your template here, if it isn't too big?

Maybe post a screenshot of the transformer dialog - with all options for brace matching, spaces/tabs, etc turned on? Also, do you get the same error if you just attach a Creator transformer instead of incoming data?


Maybe try inserting an AttributeKeeper just before the JSONTemplater so you do not get any unwanted attributes from the ArcSDE reader. Be sure to only select the attributes you really need.

Tried it, same behavior. Error occurs when ESRI ArcSDE reader is in the workspace at all, even unconnected.


Hi,
I've been working with @jess via our customer support channel and we have found that this was an issue present in the FME 2015.0 release and has since been fixed with 2015.1+. The problem was tied to how the JSONTemplater populates the root document with parameters from each reader and one of these parameters was causing this error message to occur. Sorry for any inconvenience that this issue may have caused.


Hi,
I've been working with @jess via our customer support channel and we have found that this was an issue present in the FME 2015.0 release and has since been fixed with 2015.1+. The problem was tied to how the JSONTemplater populates the root document with parameters from each reader and one of these parameters was causing this error message to occur. Sorry for any inconvenience that this issue may have caused.

Thanks Brian and Safe!


Reply