Invalid JSON response

Invalid JSON response

sartvillesartville Posts: 1Questions: 1Answers: 0

Hello, when i use server-side processing i've got this error in a spring webservice "Invalid JSON response" my JSON response is "PD9waHAKCi8qCiAqIERhdGFUYWJsZXMgZXhhbXBsZSBzZXJ2ZXItc2lkZSBwcm9jZXNzaW5nIHNjcmlwdC4KICoKICogUGxlYXNlIG5vdGUgdGhhdCB0aGlzIHNjcmlwdCBpcyBpbnRlbnRpb25hbGx5IGV4dHJlbWVseSBzaW1wbHkgdG8gc2hvdyBob3cKICogc2VydmVyLXNpZGUgcHJvY2Vzc2luZyBjYW4gYmUgaW1wbGVtZW50ZWQsIGFuZCBwcm9iYWJseSBzaG91bGRuJ3QgYmUgdXNlZCBhcwogKiB0aGUgYmFzaXMgZm9yIGEgbGFyZ2UgY29tcGxleCBzeXN0ZW0uIEl0IGlzIHN1aXRhYmxlIGZvciBzaW1wbGUgdXNlIGNhc2VzIGFzCiAqIGZvciBsZWFybmluZy4KICoKICogU2VlIGh0dHA6Ly9kYXRhdGFibGVzLm5ldC91c2FnZS9zZXJ2ZXItc2lkZSBmb3IgZnVsbCBkZXRhaWxzIG9uIHRoZSBzZXJ2ZXItCiAqIHNpZGUgcHJvY2Vzc2luZyByZXF1aXJlbWVudHMgb2YgRGF0YVRhYmxlcy4KICoKICogQGxpY2Vuc2UgTUlUIC0gaHR0cDovL2RhdGF0YWJsZXMubmV0L2xpY2Vuc2VfbWl0CiAqLwoKLyogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqCiAqIEVhc3kgc2V0IHZhcmlhYmxlcwogKi8KCi8vIERCIHRhYmxlIHRvIHVzZQokdGFibGUgPSAnQ09NUFRFJzsKCi8vIFRhYmxlJ3MgcHJpbWFyeSBrZXkKJHByaW1hcnlLZXkgPSAnQ1BUX09SRFJFJzsKCi8vIEFycmF5IG9mIGRhdGFiYXNlIGNvbHVtbnMgd2hpY2ggc2hvdWxkIGJlIHJlYWQgYW5kIHNlbnQgYmFjayB0byBEYXRhVGFibGVzLgovLyBUaGUgYGRiYCBwYXJhbWV0ZXIgcmVwcmVzZW50cyB0aGUgY29sdW1uIG5hbWUgaW4gdGhlIGRhdGFiYXNlLCB3aGlsZSB0aGUgYGR0YAovLyBwYXJhbWV0ZXIgcmVwcmVzZW50cyB0aGUgRGF0YVRhYmxlcyBjb2x1bW4gaWRlbnRpZmllci4gSW4gdGhpcyBjYXNlIHNpbXBsZQovLyBpbmRleGVzCiRjb2x1bW5zID0gYXJyYXkoCiAgICBhcnJheSggJ2RiJyA9PiAnUEVSU19JRCcsICdkdCcgPT4gMCApLAogICAgYXJyYXkoICdkYicgPT4gJ0NQVF9MT0dJTicsICAnZHQnID0+IDEgKSwKICAgIGFycmF5KCAnZGInID0+ICdDUFRfRU1BSUwnLCAgJ2R0JyA9PiAyICksCiAgICBhcnJheSgKICAgICAgICAnZGInICAgICAgICA9PiAnRF9NT0RJRklDQVRJT04nLAogICAgICAgICdkdCcgICAgICAgID0+IDMsCiAgICAgICAgJ2Zvcm1hdHRlcicgPT4gZnVuY3Rpb24oICRkLCAkcm93ICkgewogICAgICAgICAgICByZXR1cm4gZGF0ZSggJ2pTIE0geScsIHN0cnRvdGltZSgkZCkpOwogICAgICAgIH0KICAgICksCiAgICBhcnJheSgKICAgICAgICAnZGInICAgICAgICA9PiAnQ1BUX0NSWVBURScsCiAgICAgICAgJ2R0JyAgICAgICAgPT4gNCwKICAgICAgICAnZm9ybWF0dGVyJyA9PiBmdW5jdGlvbiggJGQsICRyb3cgKSB7CiAgICAgICAgICAgIHJldHVybiBudW1iZXJfZm9ybWF0KCRkKTsKICAgICAgICB9CiAgICApLAogICAgYXJyYXkoCiAgICAgICAgJ2RiJyAgICAgICAgPT4gJ0NQVF9NT0RJRklDQVRFVVInLAogICAgICAgICdkdCcgICAgICAgID0+IDUsCiAgICAgICAgJ2Zvcm1hdHRlcicgPT4gZnVuY3Rpb24oICRkLCAkcm93ICkgewogICAgICAgICAgICByZXR1cm4gbnVtYmVyX2Zvcm1hdCgkZCk7CiAgICAgICAgfQogICAgKQopOwoKLy8gU1FMIHNlcnZlciBjb25uZWN0aW9uIGluZm9ybWF0aW9uCiRzcWxfZGV0YWlscyA9IGFycmF5KAogICAgJ3VzZXInID0+ICdncmh1bScsCiAgICAncGFzcycgPT4gJ3NwcjNpb3UnLAogICAgJ2RiJyAgID0+ICdqZWZ5dGVzdCcsCiAgICAnaG9zdCcgPT4gJ29yYWNsZTIuY3JpLnVsbToxNTIxJwopOwoKCi8qICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKgogKiBJZiB5b3UganVzdCB3YW50IHRvIHVzZSB0aGUgYmFzaWMgY29uZmlndXJhdGlvbiBmb3IgRGF0YVRhYmxlcyB3aXRoIFBIUAogKiBzZXJ2ZXItc2lkZSwgdGhlcmUgaXMgbm8gbmVlZCB0byBlZGl0IGJlbG93IHRoaXMgbGluZS4KICovCgpyZXF1aXJlKCAnc3NwLmNsYXNzLnBocCcgKTsKCmVjaG8ganNvbl9lbmNvZGUoCiAgICBTU1A6OnNpbXBsZSggJF9HRVQsICRzcWxfZGV0YWlscywgJHRhYmxlLCAkcHJpbWFyeUtleSwgJGNvbHVtbnMgKQopOwo="

When i tried without my webservice it's ok but with spring it doesn't work... any idea ?
thanks

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @sartville ,

    Yep, looks like invalid JSON to me - it would be something to do with your webservice, rather than DataTables, so you should check the logs and access there.

    Cheers,

    Colin

This discussion has been closed.