PageManager.create(...) causes java.lang.StringIndexOutOfBoundsException error in error.log | Community
Skip to main content
J_K_23
New Participant
October 16, 2015
Solved

PageManager.create(...) causes java.lang.StringIndexOutOfBoundsException error in error.log

  • October 16, 2015
  • 3 replies
  • 1583 views

Hi,

I create set of pages automatically in my AEM6 bundle using create(String parentPath, String pageName, String template, String title) method of PageManager interface. The results is good - the required pages get created, however I see lots of error messages (which are not related to my code) in error.log during the page creation. Stack trace:

23.06.2015 10:14:17.734 *ERROR* [Adobe Granite Offloading job cloner queue processor] com.adobe.granite.offloading.impl.OffloadingJobCloner String index out of range: -1

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(String.java:1911)
    at com.adobe.granite.offloading.impl.util.OffloadingUtil.getJobPathFromJobId(OffloadingUtil.java:119)
    at com.adobe.granite.offloading.impl.util.OffloadingResourceUtil.getJobResourceFromJobNotification(OffloadingResourceUtil.java:96)
    at com.adobe.granite.offloading.impl.OffloadingJobCloner.processEvent(OffloadingJobCloner.java:171)
    at com.adobe.granite.offloading.impl.OffloadingJobCloner.access$200(OffloadingJobCloner.java:74)
    at com.adobe.granite.offloading.impl.OffloadingJobCloner$1.run(OffloadingJobCloner.java:151)
    at java.lang.Thread.run(Thread.java:744)

 

Any idea how to get rid of this nasty error?

Thanks,

Jiri

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by joerghoh

Hi,

In the first line of the exception you can also see the name of thread which has executed the code and failed:

23.06.2015 10:14:17.734 *ERROR* [Adobe Granite Offloading job cloner queue processor] com.adobe.granite.offloading.impl.OffloadingJobCloner String index out of range: -1

In your case it's related to Job Offloading. I don't know if you create your pages inside a Sling job or not, but given this stack trace I don't think, that these 2 aspects are related. Which version of AEM are you using? What is the version number of the bundle "com.adobe.granite.offloading.core"?

kind regards;
Jörg

3 replies

smacdonald2008
New Participant
October 16, 2015

I am trying to recreate your work - are you following a doc or is this a custom implementation? 

joerghoh
joerghohAccepted solution
Employee
October 16, 2015

Hi,

In the first line of the exception you can also see the name of thread which has executed the code and failed:

23.06.2015 10:14:17.734 *ERROR* [Adobe Granite Offloading job cloner queue processor] com.adobe.granite.offloading.impl.OffloadingJobCloner String index out of range: -1

In your case it's related to Job Offloading. I don't know if you create your pages inside a Sling job or not, but given this stack trace I don't think, that these 2 aspects are related. Which version of AEM are you using? What is the version number of the bundle "com.adobe.granite.offloading.core"?

kind regards;
Jörg

J_K_23
J_K_23Author
New Participant
October 16, 2015

Thanks, It's a custom implementation. I'm running it on AEM6.0 with sp2 installed.

Adobe Granite Offloading Core com.adobe.granite.offloading.core
         
Symbolic Namecom.adobe.granite.offloading.core
Version1.0.16