sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konrad Windszus <konra...@gmx.de>
Subject JBake Build has error java.lang.ArrayIndexOutOfBoundsException: 3 for downloads.html
Date Tue, 19 Jun 2018 14:44:35 GMT
When building locally the Sling Site I get the following error:

...
[ERROR] Rendering [/Users/konradwindszus/git/sling-site/target/sling-site-0.1-SNAPSHOT/downloads.html]...
failed!
org.jbake.template.RenderingException: java.lang.ArrayIndexOutOfBoundsException: 3
    at org.jbake.template.GroovyMarkupTemplateEngine.renderDocument (GroovyMarkupTemplateEngine.java:53)
    at org.jbake.template.DelegatingTemplateEngine.renderDocument (DelegatingTemplateEngine.java:65)
    at org.jbake.app.Renderer.render (Renderer.java:209)
    at org.jbake.render.DocumentsRenderer.render (DocumentsRenderer.java:25)
    at org.jbake.app.Oven.bake (Oven.java:151)
    at org.jbake.maven.GenerateMojo.reRender (GenerateMojo.java:95)
    at org.jbake.maven.WatchMojo.executeInternal (WatchMojo.java:87)
    at org.jbake.maven.GenerateMojo.execute (GenerateMojo.java:67)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 3
    at org.codehaus.groovy.runtime.BytecodeInterface8.objectArrayGet (BytecodeInterface8.java:363)
    at downloads$_run_closure3$_closure5$_closure6$_closure7$_closure12$_closure31$_closure32$_closure33.doCall
(downloads.tpl:389)
    at downloads$_run_closure3$_closure5$_closure6$_closure7$_closure12$_closure31$_closure32$_closure33.call
(downloads.tpl)
    at groovy.text.markup.BaseTemplate.writeBody (BaseTemplate.java:277)
    at groovy.text.markup.BaseTemplate.methodMissing (BaseTemplate.java:253)
    at downloads$_run_closure3$_closure5$_closure6$_closure7$_closure12$_closure31$_closure32.doCall
(downloads.tpl)
    at downloads$_run_closure3$_closure5$_closure6$_closure7$_closure12$_closure31$_closure32.call
(downloads.tpl)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.each (DefaultGroovyMethods.java:2040)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.each (DefaultGroovyMethods.java:2025)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.each (DefaultGroovyMethods.java:2066)
    at downloads$_run_closure3$_closure5$_closure6$_closure7$_closure12$_closure31.doCall
(downloads.tpl:384)
    at downloads$_run_closure3$_closure5$_closure6$_closure7$_closure12$_closure31.call (downloads.tpl)
    at groovy.text.markup.BaseTemplate.writeBody (BaseTemplate.java:277)
    at groovy.text.markup.BaseTemplate.methodMissing (BaseTemplate.java:253)
    at downloads$_run_closure3$_closure5$_closure6$_closure7$_closure12.doCall (downloads.tpl:382)
    at downloads$_run_closure3$_closure5$_closure6$_closure7$_closure12.call (downloads.tpl)
    at groovy.text.markup.BaseTemplate.writeBody (BaseTemplate.java:277)
    at groovy.text.markup.BaseTemplate.methodMissing (BaseTemplate.java:253)
    at downloads$_run_closure3$_closure5$_closure6$_closure7.doCall (downloads.tpl:380)
    at downloads$_run_closure3$_closure5$_closure6$_closure7.call (downloads.tpl)
    at groovy.text.markup.BaseTemplate.writeBody (BaseTemplate.java:277)
    at groovy.text.markup.BaseTemplate.methodMissing (BaseTemplate.java:253)
    at downloads$_run_closure3$_closure5$_closure6.doCall (downloads.tpl)
    at downloads$_run_closure3$_closure5$_closure6.call (downloads.tpl)
    at groovy.text.markup.BaseTemplate.writeBody (BaseTemplate.java:277)
    at groovy.text.markup.BaseTemplate.methodMissing (BaseTemplate.java:253)
    at downloads$_run_closure3$_closure5.doCall (downloads.tpl)
    at downloads$_run_closure3$_closure5.call (downloads.tpl)
    at groovy.text.markup.BaseTemplate.writeBody (BaseTemplate.java:277)
    at groovy.text.markup.BaseTemplate.methodMissing (BaseTemplate.java:253)
    at downloads$_run_closure3.doCall (downloads.tpl)
    at downloads$_run_closure3.doCall (downloads.tpl)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.groovy.reflection.CachedMethod.invoke (CachedMethod.java:93)
    at groovy.lang.MetaMethod.doMethodInvoke (MetaMethod.java:325)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod (ClosureMetaClass.java:294)
    at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:1022)
    at groovy.lang.Closure.call (Closure.java:414)
    at groovy.text.markup.BaseTemplate$1.call (BaseTemplate.java:446)
    at groovy.text.markup.BaseTemplate.methodMissing (BaseTemplate.java:238)
    at main$_run_closure1$_closure2$_closure3.doCall (main.tpl:28)
    at main$_run_closure1$_closure2$_closure3.call (main.tpl)
    at groovy.text.markup.BaseTemplate.writeBody (BaseTemplate.java:277)
    at groovy.text.markup.BaseTemplate.methodMissing (BaseTemplate.java:253)
    at main$_run_closure1$_closure2.doCall (main.tpl:10)
    at main$_run_closure1$_closure2.call (main.tpl)
    at groovy.text.markup.BaseTemplate.writeBody (BaseTemplate.java:277)
    at groovy.text.markup.BaseTemplate.methodMissing (BaseTemplate.java:253)
    at main$_run_closure1.doCall (main.tpl:6)
    at main$_run_closure1.call (main.tpl)
    at groovy.text.markup.BaseTemplate.writeBody (BaseTemplate.java:277)
    at groovy.text.markup.BaseTemplate.methodMissing (BaseTemplate.java:253)
    at main.run (main.tpl:2)
    at groovy.text.markup.BaseTemplate.writeTo (BaseTemplate.java:471)
    at groovy.text.markup.BaseTemplate.layout (BaseTemplate.java:417)
    at downloads.run (downloads.tpl:291)
    at groovy.text.markup.BaseTemplate.writeTo (BaseTemplate.java:471)
    at org.jbake.template.GroovyMarkupTemplateEngine.renderDocument (GroovyMarkupTemplateEngine.java:51)
    at org.jbake.template.DelegatingTemplateEngine.renderDocument (DelegatingTemplateEngine.java:65)
    at org.jbake.app.Renderer.render (Renderer.java:209)
    at org.jbake.render.DocumentsRenderer.render (DocumentsRenderer.java:25)
    at org.jbake.app.Oven.bake (Oven.java:151)
    at org.jbake.maven.GenerateMojo.reRender (GenerateMojo.java:95)
    at org.jbake.maven.WatchMojo.executeInternal (WatchMojo.java:87)
    at org.jbake.maven.GenerateMojo.execute (GenerateMojo.java:67)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)


This happens also on our Jenkins: https://builds.apache.org/view/S-Z/view/Sling/job/sling-site/job/master/71/consoleFull
but unfortunately didn't lead to breaking the build.
You can also see that the page is broken in the Deprecated section currently: http://sling.apache.org/downloads.cgi

The actual issue is in line https://github.com/apache/sling-site/blob/406e11bbe5b4dfd9f1054a7168dcaa4d53eb349a/src/main/jbake/templates/downloads.tpl#L249
which does not contain the right amount of separators.
Does anyone have any clue why this doesn't lead to a build failure?

I fixed the issue meanwhile, but I really want to prevent that from happening in the future.
Does anyone know if one can tweak the maven plugin further to make the build fail in those
circumstances?
Thanks, Konrad


Mime
View raw message