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
BedrockMission!

Learn More

View all

Sign in to view all badges

"String is too long" error when attempting to retrieve jcr:data

Avatar

Avatar
Validate 1
Level 2
b7wilso
Level 2

Likes

4 likes

Total Posts

38 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
b7wilso
Level 2

Likes

4 likes

Total Posts

38 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile
b7wilso
Level 2

09-06-2016

    java.lang.IllegalStateException: String is too long: 2318847350793139939 at org.apache.jackrabbit.oak.plugins.segment.Segment.loadString(Segment.java:397) at org.apache.jackrabbit.oak.plugins.segment.Segment.readString(Segment.java:364) at org.apache.jackrabbit.oak.plugins.segment.Segment.readString(Segment.java:358) at org.apache.jackrabbit.oak.plugins.segment.SegmentPropertyState.getValue(SegmentPropertyState.java:174) at org.apache.jackrabbit.oak.plugins.segment.SegmentPropertyState.getValue(SegmentPropertyState.java:165) at org.apache.jackrabbit.oak.plugins.value.ValueImpl.getValue(ValueImpl.java:381) at org.apache.jackrabbit.oak.plugins.value.ValueImpl.getOakString(ValueImpl.java:144) at org.apache.jackrabbit.oak.plugins.value.ValueImpl.getString(ValueImpl.java:287) at org.apache.jackrabbit.oak.jcr.session.PropertyImpl.getString(PropertyImpl.java:273)

I believe this to be a similar question to http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...

So for the situation I am testing I have a file that I am trying to reference in the repository.  I tried this with the "basic" file (two records of 8 lines each) and was unable to reproduce the error in the test regions.  On the other hand I test with the actual file (> 140 records) that I am hoping to reference as soon as I try to pull back the string I get this error.  So for now, I am going to work around this by splitting up the file which should allow me to pull back each file by itself and get what I need from it.

What my actual question is why is there a limit and is there a way to override it for this situation only?  I only ask because the solution I am using currently works fine on my Windows 10 based machine but gets this error in both of our test regions (and I am assuming our Prod region, but I am not going to test that for obvious reasons) which are Linux based.

BTW, we are on AEM 6.1 and have the hotfix installed so we are on Apache Jackrabbit Oak 1.2.14.

Thanks in advance for any help that you can provide.

Brad W.

Replies

Avatar

Avatar
Validate 25
MVP
bsloki
MVP

Likes

182 likes

Total Posts

1,859 posts

Correct Reply

545 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 50
Boost 5
View profile

Avatar
Validate 25
MVP
bsloki
MVP

Likes

182 likes

Total Posts

1,859 posts

Correct Reply

545 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 50
Boost 5
View profile
bsloki
MVP

09-06-2016

Please raise a support ticket to quickly see if they have any workarounds already !

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,128 likes

Total Posts

6,133 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,128 likes

Total Posts

6,133 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

10-06-2016

Please file a day care ticket for this: https://daycare.day.com/home/createaticket.html 

Thanks and Regards

Kautuk Sahni

Avatar

Avatar
Validate 10
Level 2
Tom_Fought
Level 2

Likes

8 likes

Total Posts

55 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 2
Tom_Fought
Level 2

Likes

8 likes

Total Posts

55 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
Tom_Fought
Level 2

17-05-2017

Was an answer to this issue ever provided?

I was running the "debug" option on my oak 1.4.9 repository today and received the same exception.

Exception in thread "main" java.lang.IllegalStateException: String is too long: 2318847148929820343
        at org.apache.jackrabbit.oak.plugins.segment.Segment.loadString(Segment.java:533)

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

17-05-2017

Contact the Support team - there may be a hotfix. 

Avatar

Avatar
Validate 1
Level 1
nafeeskhanp7683
Level 1

Likes

2 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
nafeeskhanp7683
Level 1

Likes

2 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
nafeeskhanp7683
Level 1

09-09-2019

I am facing a similar issue in AEM 6.5.1. Is there any solution for this?

Avatar

Avatar
Validate 1
Level 2
Jean-foxfly
Level 2

Likes

13 likes

Total Posts

18 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Give Back 3
Give Back
Boost 5
Boost 3
View profile

Avatar
Validate 1
Level 2
Jean-foxfly
Level 2

Likes

13 likes

Total Posts

18 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Give Back 3
Give Back
Boost 5
Boost 3
View profile
Jean-foxfly
Level 2

21-07-2020

Hi @nafeeskhanp7683
Probably the problem that you have is the size of file.
To read big .TXT files you will need to open it as Stream and read parts until the EOF (End of File).

This isn't a good code, but is a sample reading by byte.

var csvBin = workflowSession.getSession().getNode(path + "/attachments/csvUpload/" + csvName + "/jcr:content").getProperty("jcr:data").getBinary();
        var csvStream = csvBin.getStream()
        var csv = [];
        while(1) {
            var csvLine = [];
            var endFlag = false;
            while(1) {
                var charCode = csvStream.read();
                if(charCode == -1) {
                    endFlag = true;
                    break;
                }
                var char =  String.fromCharCode(charCode);
                if(char == "\n") break;
                csvLine.push(char);
            }
            if(endFlag == true) break;
            csv.push(csvLine.join(""));
        }