Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tRest using URL with json object: error Illegal character in query at

Hi All;
I'm very new to Talend. and first, thanks for the forum it's really helpful.
I'm really stuck, I'm using the tREST component with an URL. The URL contains json data format 
example : {"analytics":,"options":{"from":"2015-05-18 00:00:00","to":"2015-05-25 17:46:22","utc_offset":2,"range":"daily"}}&export=1
But i'm having always this error : Illegal character in query at index ... it seems that it doesn't like [ et { ... characters ...
Could anyone help please ?
Thanks
Best regards,
Labels (4)
8 Replies
Anonymous
Not applicable
Author

Hi
Try to escape the special characters " included in the URL, for example:
"http://localhost:8088/data={\"name:shong\"}"
If it doesn't still work, please upload a screenshot of component settings.
BR
Shong
Anonymous
Not applicable
Author

Thanks for your quick reply.
I already escaped all the "Characters" in the URL.
I think that what's causing problem is the fact to have the following
i attached the screenshots.
Thank you for your help.
Anonymous
Not applicable
Author

where is your screenshot? Do you have compilation error in the job generated code? Click the Code tab and see if there exist compilation error?
Anonymous
Not applicable
Author

Here is the errors i got : ( PS : i'm not able to attached screenshot )thanks a lots 
Exception in component tREST_1
java.lang.IllegalArgumentException: Illegal character in query at index 94: {"analytics":,"options":{"from":"2015-05-18 00:00:00","to":"2015-05-25 17:46:22","utc_offset":2,"range":"daily"}}&export=1&feeds=43c056de-548b-11e4-9cf0-782bcb074bd1
at java.net.URI.create(URI.java:859)
at com.sun.jersey.api.client.Client.resource(Client.java:402)
at test_alg.trest_extract_0_1.trest_extract.tREST_1Process(trest_extract.java:725)
at test_alg.trest_extract_0_1.trest_extract.tLibraryLoad_1Process(trest_extract.java:391)
at test_alg.trest_extract_0_1.trest_extract.runJobInTOS(trest_extract.java:1103)
at test_alg.trest_extract_0_1.trest_extract.main(trest_extract.java:956)
Caused by: java.net.URISyntaxException: Illegal character in query at index 94: {"analytics":,"options":{"from":"2015-05-18 00:00:00","to":"2015-05-25 17:46:22","utc_offset":2,"range":"daily"}}&export=1&feeds=43c056de-548b-11e4-9cf0-782bcb074bd1
at java.net.URI$Parser.fail(URI.java:2829)
at java.net.URI$Parser.checkChars(URI.java:3002)
at java.net.URI$Parser.parseHierarchical(URI.java:3092)
at java.net.URI$Parser.parse(URI.java:3034)
at java.net.URI.<init>(URI.java:595)
at java.net.URI.create(URI.java:857)
... 5 more
Anonymous
Not applicable
Author

Hi 
Can you paste the full URL? or export the job and send it to via email?
Anonymous
Not applicable
Author

Hi, 
I send you an email to your following email address :  shong@talend.com

Thank you in advance,
Ahmed
Anonymous
Not applicable
Author

Hi,
I sent out the e-mail. 
Any feedbacks?
Thanks in advance
A
Anonymous
Not applicable
Author

Hi, 
As i didn't get answer, should you assume that's impossible to use a url with } ] characters...?
Thanks a lot for your reply,
Best regards,
A