Hi
I suspect there is a syntax error in your JSONTemplater, possibly on line 211 or 212 ;-)
Sorry, it is near impossible to give you a more precise answer without more details...
Can you put your template on e.g. pastebin.com and post the link here?
David
Thanks David for your reply!
In the JSONTemplater, in the ROOT Template Expression I only have 53 lines. That is the problem. In other cases that I have had a syntax error as you say I solved it with the error description... but in this case it it is meaningless.
I have tested the JSONTemplater with only one sentence and the error is equal. :S. So I'm testing again the outputs of the custom transformer outputs.
Thanks again!
I have identified the problem but I don't find a reason...
Originally in the custom transformer I have been using a private parameter in order to store a constant value. I retrieved the value with a ParameterFetcher transformer storing the value in a new attribute. Then, the attribute value was used in a temporal variable (VariableSetter transformer).
Now I don`t use a private parameter (therefore I do not use "ParameterFetcher") and I set manually the value in the VariableSetter transformer. When I use the custom transformer in the process that generate the json content, no errors are registered.
I do not know why, but it is a "solution"... The problem is that I use the same value in several VariableSetter transformers and if someday I have to change the value...
I'm having a similar problem with the FMEServerEmailGenerator. It works fine if you use a Creator but as soon as you add a reader (Oracle in this case) it fails with the invalid expression error. The reader is not even connected to the transformers; it is simply in the workspace.
Did you manage to find a better solution in the end?
Cheers,
Paul
Hello piwittle,
Sorry but I have not found a better solution to the problem ...
Are you still stuck?
hi I'm getting the same problem.
I cut the root template down to a single line of hard coded json
{'testing' : 'test' }
and I get the error below...
Loaded module 'XMLTemplaterFactory' from file 'D:\FME\plugins/XMLTemplaterFactory.dll'
FME API version of module 'XMLTemplaterFactory' matches current internal version (3.7 20141021)
JSONTemplater(XMLTemplaterFactory): The following error occurred near line 16, column 51 of the query:
JSONTemplater(XMLTemplaterFactory): invalid expression: syntax error, unexpected "{", expecting "external" or ":="
could this be a bug....?
fme desktop 2015.0 (build 15250)(32-bit)
Just had a really useful chat with Aaron and Xiaomeng via the safe live chat widget - thanks for your support - you were great!
We didn't get to the bottom of it but we got a bit further in the debugging.
I managed to get the JSONTemplater working with on a fresh blank canvas,(proving it's not a bug in the templater per-se) but then when i either copied that transformer onto my existing canvas or copied the transformer/readers/writers to my new blank canvas I got the error i describe above.
i.e. something in my old (fme 2011 based) workbench logic is causing the JSONTemplater to flake out.
Luckily it's quite a simple workbench so i'm going to start from scratch and keep testing the jsontempalter as i build.
Just had a really useful chat with Aaron and Xiaomeng via the safe live chat widget - thanks for your support - you were great!
We didn't get to the bottom of it but we got a bit further in the debugging.
I managed to get the JSONTemplater working with on a fresh blank canvas,(proving it's not a bug in the templater per-se) but then when i either copied that transformer onto my existing canvas or copied the transformer/readers/writers to my new blank canvas I got the error i describe above.
i.e. something in my old (fme 2011 based) workbench logic is causing the JSONTemplater to flake out.
Luckily it's quite a simple workbench so i'm going to start from scratch and keep testing the jsontempalter as i build.
So it seems the ESRI 'GEODATABASE_SDE' Reader and Writer cause this issue in my workbench. (the new ones, nothing to do with 2011)
I deleted stuff until it worked - then re added until it stopped working, it was very repeatable.
So it seems the ESRI 'GEODATABASE_SDE' Reader and Writer cause this issue in my workbench. (the new ones, nothing to do with 2011)
I deleted stuff until it worked - then re added until it stopped working, it was very repeatable.
@nrich please do send the workspaces in to support@safe.com so we can dig in. Seems ... inconceivable...
It does seem very odd.
I've stripped the workbench down to the bare bones though and it worked, didn't work, worked, didn't work - you get the picture!
I've sent this test workbench to Xiaomeng via the live chat thingy-ma-bob.
In the mean time I've reverted back to sde30 and the JSONtemplatar works like a charm.
It does seem very odd.
I've stripped the workbench down to the bare bones though and it worked, didn't work, worked, didn't work - you get the picture!
I've sent this test workbench to Xiaomeng via the live chat thingy-ma-bob.
In the mean time I've reverted back to sde30 and the JSONtemplatar works like a charm.
perhaps the geodatabase reader/writer is loading a conflicting xml/json module...