Skip to main content
J_K_23
Oct 16, 2015 2:29 AM UTC
Solved

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

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.
joerghoh
joerghohAccepted solution
Adobe Employee
Oct 16, 2015 2:29 AM UTC

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

J_K_23
J_K_23Author
Oct 16, 2015 2:29 AM UTC

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
Translate
joerghoh
Adobe Employee
joerghohAdobe EmployeeAccepted solution
Adobe Employee
Oct 16, 2015 2:29 AM UTC

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

Translate
smacdonald2008
Level 10
Oct 16, 2015 2:29 AM UTC

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

Translate