We are getting an error "Error formatting macro: run: java.lang.StackOverflowError" when using the replace and render macro. It works on preview until we select the top 785 but fails with the above error when we save the page. It work both on preview and page save when we only select top 100 or nay lower numbers.
{replace-and-render} {replace-item:%componentsel%}{sql:dataSource=DS|output=html|heading=false|border=0|table=false} select top 1000':''',ccc,''':''',ccc,'''' from ( select distinct component as ccc from releases where date>dateadd([year],-1,GETDATE()) union select distinct component as ccc from installs where expdate >= getdate() ) as c order by ccc asc {sql}{replace-item} {replace-body} {run:autorun=true|replace=component:sysadmin:Select component:select:%componentsel%} {run} {replace-body} {replace-and-render} |
I've got the answer from the developer Bob as follows:
1. Stack overflow errors can occur when using regex patterns that are large or complex. Sometimes this is due to error but in some cases it just requires more stack space.
2. Try increasing your stack space and see if that allows a higher #. If so, keep increasing until it covers your case. For instance, I have used -Xss4096k on a Confluence instance with more complex cases.
So I've increased our stack space on is-testconfluence to -Xss40966k and your script now works fine
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.