I'm trying to access the repository to get the nodes and its properties in the same hierarchy in a customized json format using Node JCR API programmatically for node structure with less nodes it works fine but for large one like the below, it throws the error.
I'm trying to hit a java class from a servlet, following are my code samples
Retrieval Java class
Once the servlet hit from the browser, the root node path is sent to the java class and returns the json object to servlet which has the entire node structure with properties in the custom JSON format.I'm trying to store the returned JSON object as string into the local file system, once the call is made to the servlet, it throws the same error
It is because of the some larger string length,Can you please help me to get this issue to be fixed?
Thanks in Advance
public static String readString(InputStream in) throws IOException Read a String. This will first read the length as 4 bytes, and then the UTF-8 encoded string. Parameters: in - the data input stream Returns: the string Throws: IOException - if an IO exception occurred while reading