Wicket.Ajax.Call.failure: error parsing response: object required

I just spent several hours of my life debugging this problem. I am documenting it here for others.

Question:

I get the following error when trying to click on AjaxLink in Internet Explorer:

Wicket: ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Object required

It works great in all other browsers; just IE busted.

+3
ajax wicket
Jun 01 '11 at 20:35
source share
2 answers

Make sure your HTML is 100% syntactically correct. Ajax responses are returned to the browser inside the CDATA section, and if the payload does not have the correct form, IE sometimes suffocates.

In my case, I forgot to close the <link> in the <head> section. Just closing the link tag did everything possible.

Also: if you encounter a difficult problem to solve the problem in Wicket, it would be nice to create a quickstart project that reproduces your question. It can be a lot of work to boil things, but you often find the source of the problem.

+6
Jun 01 2018-11-11T00:
source share

I want to point out another potential cause of the problem with Wicket AJAX in IE. This may help someone who is facing a similar problem.

In my case, I got the following error message in IE:

 Wicket: ERROR: Wicket.Ajax.Call.failure: Error while parsing response: could not find root <ajax-response> element 

The reason was an incorrect Content-Type AJAX response. I used AbstractTransformerBehavior and there was a bug in Wicket 1.4.x, so this behavior rewrote the Content-Type response with the text / html. IE does not parse a response like XML.

0
Apr 24 '13 at 8:39
source share



All Articles