Skip to main content

Prerequisites

  • A powersheet document with server-rendered properties configured
  • Access to Polarion server logs
  • Familiarity with Velocity template syntax

Step 1: Recognize the Error Marker

When a Velocity template evaluation fails, Powersheet displays #SERVER_RENDER_ERROR in the affected cell instead of the computed value. This is a constant error marker that indicates a template configuration problem. diagram

Step 2: Check Polarion Server Logs

The three most common exception types appear in the Polarion server logs when a template fails:
Exception TypeCauseExample
ParseErrorExceptionInvalid Velocity syntaxMissing #end, unbalanced quotes
MethodInvocationExceptionMethod call on null or wrong type$item.getTitle() when $item is null
ResourceNotFoundExceptionReferenced resource not foundMissing include or macro
Open the Polarion server log file and search for these exception names to find the exact error message and line number.

Step 3: Validate Template Syntax

Common Velocity syntax errors that cause ParseErrorException:
# WRONG: Missing #end
serverRender: "#if($item.title)$item.title"

# CORRECT: Properly closed block
serverRender: "#if($item.title)$item.title#end"
# WRONG: Unescaped special characters
serverRender: "$item.title & $item.status"

# CORRECT: Escaped or avoided
serverRender: "$item.title and $item.status"
Server-rendered expressions are typically single-line strings in YAML. Multi-line Velocity logic must be compressed into one line or use Velocity’s inline syntax.

Step 4: Add Null Checks

MethodInvocationException commonly occurs when accessing properties on null objects. Always guard against nulls:
# WRONG: Assumes $module is always available
serverRender: "$module.moduleName"

# CORRECT: Null check first
serverRender: "#if($module)$module.moduleName#else N/A#end"
Key variables that can be null:
  • $module — null when entity is not document-scoped
  • $wi — null when entity is not a work item
  • Custom field values — null when not set on the work item
Always wrap service calls and property access in #if checks: #if($var && $var.method())$var.method()#else default#end

Step 5: Test with Simple Expressions First

When debugging a complex template, simplify to isolate the problem:
  1. Replace your template with a constant: serverRender: "test" — verify rendering works at all
  2. Add one variable: serverRender: "$item.id" — verify context is available
  3. Add the failing expression piece by piece until the error reappears

Step 6: Verify Property Configuration

Ensure the property hosting the server-rendered expression is correctly configured:
properties:
  computedField:
    serverRender: "$item.title"
    readable: true      # Must be true to display
    updatable: false     # Always false for server-rendered
Some Polarion service methods may behave differently across versions. If a method call in your template causes errors, verify the method signature against your Polarion installation’s API documentation.

Common Error Patterns

SymptomLikely CauseFix
All rows show errorTemplate syntax errorCheck for missing #end or bad directive
Some rows show errorNull data on specific itemsAdd null checks for optional fields
Error after Polarion upgradeAPI change in service methodUpdate method calls to new API
Error on document entities only$wi used on non-work-itemUse $item instead or add type check

Verify

After fixing template errors:
  1. Open the powersheet document in Polarion
  2. You should now see computed values in all cells that previously showed #SERVER_RENDER_ERROR
  3. Test with work items that have empty or null fields to confirm null checks work
  4. Verify that the Polarion server logs no longer show template-related exceptions

See Also

Source Code
  • ServerRenderer.java
  • HttpErrorInfo.java
  • prod-powersheet-src/com.nextedy.powersheet.client/src/modules/Powersheet/Powersheet.tsx
  • Property.java
  • ControllerServlet.java