CQ5.5: SlingException running workflowreport.html

Issue

If you are using the workflow report under /etc/reports/workflowreport.html it may return with an error 500 in the browser and the following exception:

org.apache.sling.api.SlingException:
    at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.handleJspExceptionInternal(JspServletWrapper.java:686)
    at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:603)
    at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:528)
    at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:447)

Caused by: org.apache.sling.api.SlingException: An exception occurred processing JSP page /libs/cq/workflow/components/report/report.jsp at line 132
… 74 more
Caused by: java.lang.NullPointerException
    at org.apache.jsp.libs.cq.workflow.components.report.report_jsp._jspService(report_jsp.java:309)
    at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:497)
… 97 more

Reason

This problem can occur when a workflow model is deleted, but that workflow model had been used to start multiple processes, and therefore workflow statistics for that model exist.  This is a product issue and has been addressed in CQ5.6.

Workaround

As a workaround you can use the attached overlay for
/apps/cq/workflow/components/report/report.jsp
instead of the problematic
/libs/cq/workflow/components/report/report.jsp

workflow_report_overlay_40332-1.0.zip

The workaround will resolve the NullPointerException and the workflow report will display as expected, but there are still some unresolved exceptions in the server log. These will be resolved with the full product fix.

reference: (40332/CQ5-23798)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 0.0/10 (0 votes cast)

CQ5.5 SP2.1: IllegalArgumentException: Servlet must not be null

Issue

If you are updating your CQ5.5 installation to SP2.1 on an application server you may notice the following exception in the logs:

12.11.2012 03:20:21.683 *ERROR* [CQSE HTTP Service] org.apache.felix.http.whiteboard Failed to register servlet
java.lang.IllegalArgumentException: Servlet must not be null
    at org.apache.felix.http.base.internal.service.HttpServiceImpl.registerServlet(HttpServiceImpl.java:88)
    at org.apache.felix.http.whiteboard.internal.manager.ServletMapping.register(ServletMapping.java:54)
    at org.apache.felix.http.whiteboard.internal.manager.ExtenderManager.registerAll(ExtenderManager.java:235)
    at org.apache.felix.http.whiteboard.internal.manager.ExtenderManager.setHttpService(ExtenderManager.java:195)
    at org.apache.felix.http.whiteboard.internal.tracker.HttpServiceTracker.added(HttpServiceTracker.java:37)

After restarting the server you may notice the following errors in the log:

12.11.2012 03:22:14.621 *ERROR* [Thread-1] org.apache.sling.servlets.resolver.internal.SlingServletResolver bindServlet: Unexpected problem initializing component com.day.cq.opensocial.gadgets.servlet.ConcatProxyServlet com.google.inject.ProvisionException: Guice provision errors:
1) Error injecting method, java.lang.IllegalStateException: Servlet already initialized
    at org.apache.shindig.gadgets.servlet.ConcatProxyServlet.setConcatUriManager(ConcatProxyServlet.java:90)
    while locating com.day.cq.opensocial.gadgets.servlet.ConcatProxyServlet
Caused by: java.lang.IllegalStateException: Servlet already initialized
    at com.google.common.base.Preconditions.checkState(Preconditions.java:145)
    at org.apache.shindig.common.servlet.InjectedServlet.checkInitialized(InjectedServlet.java:59)
    at org.apache.shindig.gadgets.servlet.ConcatProxyServlet.setConcatUriManager(ConcatProxyServlet.java:90)

12.11.2012 03:23:10.151 *ERROR* [FelixStartLevel] com.day.cq.wcm.cq-wcm-mobile-core [com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter] The bindStats method has thrown an exception (java.lang.NullPointerException) java.lang.NullPointerException
    at com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter.bindStats(RedirectFilter.java:173)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:227)
    at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:38)
    at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:591)

Reason

These errors occur due to the files for the CQ Servlet Engine which are still deployed.  These files should not be included when deploying CQ to an application server, and there is a step in the SP2.1 release notes describing this.

Solution

  1. Go to /crx/explorer and open the Content Explorer
  2. Go to /libs/system/install, delete the cqse-httpservice-4.1.32.jar node and save your changes
  3. Restart the instance

These steps are listed in the release notes for SP2.1 when deploying to an application server:

http://dev.day.com/docs/en/cq/current/release_notes_service_pack_2.html

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 7.0/10 (2 votes cast)