From 4fa9aa160044fe35dc54d0c3c12fcc6e7d70aea5 Mon Sep 17 00:00:00 2001 From: Hans Bakker Date: Sat, 26 Oct 2024 08:57:06 +0700 Subject: [PATCH] fix: Unable to release Session : Caused by: java.io.NotSerializableException: org.apache.groovy.json.internal.LazyMap --- framework/src/main/java/org/moqui/util/RestClient.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/src/main/java/org/moqui/util/RestClient.java b/framework/src/main/java/org/moqui/util/RestClient.java index 46b389f7c..b2603bad9 100644 --- a/framework/src/main/java/org/moqui/util/RestClient.java +++ b/framework/src/main/java/org/moqui/util/RestClient.java @@ -14,7 +14,7 @@ package org.moqui.util; import groovy.json.JsonBuilder; -import groovy.json.JsonSlurper; +import groovy.json.JsonSlurperClassic; import org.eclipse.jetty.client.HttpClient; import org.eclipse.jetty.client.HttpClientTransport; import org.eclipse.jetty.client.HttpResponseException; @@ -442,7 +442,7 @@ public String text() { /** Parse the response as JSON and return an Object */ public Object jsonObject() { try { - return new JsonSlurper().parseText(text()); + return new JsonSlurperClassic().parseText(text()); } catch (Throwable t) { throw new BaseException("Error parsing JSON response from request to " + rci.uriString, t); }