Grails Runtime Exception

Error Details

Error 500: Error applying layout : publicLayout
Servlet: grails
URI: /grails/ajutsPublic/showPublicacion.dispatch
Exception Message: Error applying layout : publicLayout
Caused by: Error applying layout : publicLayout
Class: CopiaAutenticaTagLib
At Line: [0]
Code Snippet:

Stack Trace

org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error applying layout : publicLayout

at grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter.doFilter(GrailsAnonymousAuthenticationFilter.java:53)
at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:62)
at grails.plugin.springsecurity.web.SecurityRequestHolderFilter.doFilter(SecurityRequestHolderFilter.java:59)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error processing GroovyPageView: Error executing tag <g:render>: Error executing tag <g:pdfLink>: String index out of range: -1
... 4 more
Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <g:render>: Error executing tag <g:pdfLink>: String index out of range: -1
at gsp_seuE11_layoutspublicLayout_gsp.run(gsp_seuE11_layoutspublicLayout_gsp.groovy:22)
... 4 more
Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <g:pdfLink>: String index out of range: -1
at gsp_seuE11_layouts_personalitzacions_esparreguera_gsp$_run_closure2.doCall(gsp_seuE11_layouts_personalitzacions_esparreguera_gsp.groovy:343)
at gsp_seuE11_layouts_personalitzacions_esparreguera_gsp.run(gsp_seuE11_layouts_personalitzacions_esparreguera_gsp.groovy:934)
... 5 more
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1960)
at seue10.CopiaAutenticaTagLib$_closure2.doCall(CopiaAutenticaTagLib.groovy:33)
... 7 more