Product: Confluence
Environment
| Operating System | Linux |
|---|---|
| Affect Version/s | 2.4.3 |
| JVM | |
| Database | MySQL 4.1.x |
| Application Server | Tomcat 5.5.x |
Error Message
2007-04-05 16:11:48,231 ERROR [TP-Processor32] [StandardWrapper[/confluence:css]] invoke Servlet.service() for servlet css threw exception javax.servlet.ServletException: couldn't find resource '/pages/null/s/705/1/1/_/styles/main-action.css' at com.atlassian.confluence.servlet.CssServlet.service(CssServlet.java:47)
Symptom
Diagnostics/Test
Utilized Hibernate logging, testing with Theme Builder, received assistance from adaptivist.
Also wrote a patch with developer's assistance for additional logging to capture problem.
Checking the error message and the source code, it was found that these problems lie within the webresource package.
Root Cause
The problem causing the stylesheet to fail was a null value parsed through the getContextPath method in the ConfluenceWebResourceIntegration.
With the modified classes, it was found that the cause we insufficient PermGen memory. Refer to error message below:
2007-05-16 23:51:51,948 ERROR [TP-Processor122] [confluence.util.velocity.VelocityUtils] getRenderedTemplate Error occurred rendering template: /decorators/main.vmd
– url: /confluence/login.action | userName: anonymous
org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getGlobalCssResourcePrefix' in class $Proxy56 threw exception class java.lang.OutOfMemoryError : PermGen space
at org.apache.velocity.runtime.parser.node.PropertyExecutor.execute(PropertyExecutor.java:188)
Solution
With assistance from a developer, the DefaultConfluenceWebResourceManager and ConfluenceWebResourceIntegration classes was patched to include additional logging. The aim was to capture exactly where a null value is parsed through the getContextPath, which is utilized by the getGlobalCssResourcePrefix and getSpaceCssResourcePrefix methods for determining the location of css resources.
Increasing the PermGen space resolved this issue.
