All forms and previews for a particular table won't render. "No preview available" when previewing from List view.


Description

All of the records of a particular table will not render form or preview views.  When reproducing the issue, something like the following error can be found in the node logs:

2019-11-20 07:34:43 (810) Default-thread-2 B822A2E81B510810CA2F65F8BC4BCB88 txid=baf462ec1b51 SEVERE *** ERROR *** null:-1:-1: <null> Could not parse Jelly script
org.apache.commons.jelly.JellyException: null:-1:-1: <null> Could not parse Jelly script
at com.glide.ui.jelly.GlideJellyContext.compileScript(GlideJellyContext.java:1002)
at com.glide.ui.jelly.GlideJellyContext.getCompiledScript(GlideJellyContext.java:940)
at com.glide.ui.jelly.GlideJellyContext.runScript(GlideJellyContext.java:738)
at com.glide.ui.jelly.GlideJellyContext.runScript(GlideJellyContext.java:708)
at com.glide.ui.GlideFormPhase2.generate(GlideFormPhase2.java:49)
at com.glide.ui.GlideForm.generatePopulatedForm(GlideForm.java:719)
at com.glide.ui.GlideForm.generatePopulatedForm(GlideForm.java:694)
at com.glide.ui.GlideForm.populateForm(GlideForm.java:686)
at com.glide.ui.GlideForm.getRenderedPage(GlideForm.java:230)
at com.glide.ui.GlideForm.getRenderedPage(GlideForm.java:156)
at com.glide.ui.Popup.getPopup(Popup.java:31)
at com.glide.processors.PopupProcessor.doPopup(PopupProcessor.java:159)
at com.glide.processors.PopupProcessor.process(PopupProcessor.java:109)
at com.glide.processors.AProcessor.runProcessor(AProcessor.java:553)
at com.glide.processors.AProcessor.processTransaction(AProcessor.java:240)
at com.glide.processors.ProcessorRegistry.process0(ProcessorRegistry.java:177)
at com.glide.processors.ProcessorRegistry.process(ProcessorRegistry.java:166)
at com.glide.ui.GlideServletTransaction.process(GlideServletTransaction.java:31)
at com.glide.sys.Transaction.run(Transaction.java:2203)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.xml.sax.SAXException: Runtime Exception: org.apache.commons.jelly.JellyException: null:-1:-1: <null> Unable to create expression: jvar_parentage[0
org.apache.commons.jelly.JellyException: null:-1:-1: <null> Unable to create expression: jvar_XYZ[0
at org.apache.commons.jelly.parser.XMLParser.endElement(XMLParser.java:735)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.commons.jelly.parser.XMLParser.parse(XMLParser.java:340)
at com.glide.ui.jelly.GlideJellyContext.compileScript(GlideJellyContext.java:996)
... 21 more
Caused by: org.apache.commons.jelly.JellyException: null:-1:-1: <null> Unable to create expression: jvar_XYZ[0
at com.glide.ui.jelly.GlideExpressionWrapper.parseExpression(GlideExpressionWrapper.java:147)
at com.glide.ui.jelly.GlideExpressionWrapper.<init>(GlideExpressionWrapper.java:127)
at com.glide.ui.jelly.GlideExpressionFactory.createExpression(GlideExpressionFactory.java:34)
at org.apache.commons.jelly.expression.CompositeExpression.createCompositeExpression(CompositeExpression.java:293)
at org.apache.commons.jelly.expression.CompositeExpression.parse(CompositeExpression.java:173)
at org.apache.commons.jelly.parser.XMLParser.addTextScript(XMLParser.java:1121)
at org.apache.commons.jelly.parser.XMLParser.compileText(XMLParser.java:744)
at org.apache.commons.jelly.parser.XMLParser.endElement(XMLParser.java:723)
... 32 more
Caused by: org.apache.commons.jexl.parser.ParseException: Encountered " "[" "[ "" at line 1, column 15.
Was expecting one of:
"||" ...
"or" ...
"&&" ...
"and" ...
"|" ...
"^" ...
"&" ...
"==" ...
"eq" ...
"!=" ...
"ne" ...
"<" ...
"lt" ...
">" ...
"gt" ...
"<=" ...
"le" ...
">=" ...
"ge" ...
"+" ...
"-" ...
"*" ...
"/" ...
"div" ...
"%" ...
"mod" ...
";" ...
";" ...
";" ...
";" ...
";" ...
";" ...
";" ...
";" ...
";" ...

Cause

The keyword to extract from the above error is the jvar_XYZ' where 'XYZ' is the name of their jelly variable. This can happen when the form has a custom formatter or other UI Macro implementing some Jelly. You should be able to confirm the issue goes away by removing the custom elements from the form.

Resolution

Perform a Script search in [Scripts - Background] Module for the jvar_XYZ name.  It should return all the records referencing this in script.  The user likely has a Jelly syntax or processing error in relation to this variable they need to refactor in order to resolve the issue.