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.
Step 2: Check Polarion Server Logs
The three most common exception types appear in the Polarion server logs when a template fails:| Exception Type | Cause | Example |
|---|---|---|
| ParseErrorException | Invalid Velocity syntax | Missing #end, unbalanced quotes |
| MethodInvocationException | Method call on null or wrong type | $item.getTitle() when $item is null |
| ResourceNotFoundException | Referenced resource not found | Missing include or macro |
Step 3: Validate Template Syntax
Common Velocity syntax errors that cause ParseErrorException:Step 4: Add Null Checks
MethodInvocationException commonly occurs when accessing properties on null objects. Always guard against nulls:$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
Step 5: Test with Simple Expressions First
When debugging a complex template, simplify to isolate the problem:- Replace your template with a constant:
serverRender: "test"— verify rendering works at all - Add one variable:
serverRender: "$item.id"— verify context is available - 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: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
| Symptom | Likely Cause | Fix |
|---|---|---|
| All rows show error | Template syntax error | Check for missing #end or bad directive |
| Some rows show error | Null data on specific items | Add null checks for optional fields |
| Error after Polarion upgrade | API change in service method | Update method calls to new API |
| Error on document entities only | $wi used on non-work-item | Use $item instead or add type check |
Verify
After fixing template errors:- Open the powersheet document in Polarion
- You should now see computed values in all cells that previously showed
#SERVER_RENDER_ERROR - Test with work items that have empty or null fields to confirm null checks work
- Verify that the Polarion server logs no longer show template-related exceptions
See Also
- Create a Computed Property — setting up server-rendered properties
- Use Velocity Templates — template syntax reference
- Access Polarion Services — platform service usage
- Troubleshooting Guides — general troubleshooting resources
Sources
Sources
Source Code
ServerRenderer.javaHttpErrorInfo.javaprod-powersheet-src/com.nextedy.powersheet.client/src/modules/Powersheet/Powersheet.tsxProperty.javaControllerServlet.java