Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

String is too long: 2319129930345378533

Malarvizhi_Sara
Level 2
Level 2

I'm getting this error, May I know the cause of it and how to resolve the issue.Screen Shot 2018-02-20 at 3.30.33 PM.png

1 Accepted Solution
Hemant_arora
Correct answer by
Level 8
Level 8

Refer to https://forums.adobe.com/thread/2325595 It seems for some reason it is retrieving a BINARY property as a String.  So there is hight probability you might have wrong index defnition

View solution in original post

0 Replies
Hemant_arora
Level 8
Level 8

Can you elaborate the problem and share STR ?

Malarvizhi_Sara
Level 2
Level 2

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.

Screen Shot 2018-02-26 at 4.00.00 PM.png

I'm trying to hit a java class from a servlet, following are my code samples

Servlet class

Screen Shot 2018-02-26 at 4.01.39 PM.png

Retrieval Java class

Screen Shot 2018-02-26 at 4.02.46 PM.png

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

Screen Shot 2018-02-26 at 4.05.47 PM.png

It is because of the some larger string length,Can you please help me to get this issue to be fixed?

Thanks in Advance

Hemant_arora
Correct answer by
Level 8
Level 8

Refer to https://forums.adobe.com/thread/2325595 It seems for some reason it is retrieving a BINARY property as a String.  So there is hight probability you might have wrong index defnition

View solution in original post

Hemant_arora
Level 8
Level 8

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

Malarvizhi_Sara
Level 2
Level 2

Retrieving the binary property value as string is the cause for the problem..It got resolved

Thanks again!!