I have a html page loaded directly from a local file in a web browser (FF 14.0.1 or Chromium, on Ubuntu 12.04)
The html page includes a local jQuery js file, and then includes a local js file with this method:
function start() {
$.getJSON("http://localhost:8080/app/connect?callback=?", "id=11", function() { alert("win!"); })
.done(function() { alert("done"); })
.fail(function(xhr, request, error) { alert(xhr.status + "<> + request + "<>" + error); }); }
I'm responding to these requests from a JBoss / Restful web server with no special configuration, the method on the server is annotated with @Produces({"application/json"}). Server doesn't show any errors, even gets the id value correctly.
When I trigger this javascript, the fail method is called and I get this alert:
200<>parsererror<>jQuery311391951_513134 was not called
I can see the JSON response when inspecting with Firebug, it looks ok. In Chromium, I can inspect the request / response headers and everything looks ok. I have that text saved, if anyone thinks it might give more insight.
Can anyone tell me what's going on? Why do I get this error?
Thanks in advance!