Posts tagged "CQSE"

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)