Posts tagged "IllegalStateException"

CRXDE Lite: IllegalStateException: I18nManager not initialized

Issue

If you have installed a hotfix for CRX you may encounter problems accessing CRXDE Lite accompanied by the following error in the server.log:

*MARK * servletengine: Servlet threw exception:
java.lang.IllegalStateException: I18nManager not initialized
at com.day.crx.i18n.I18nManager.getInstance(I18nManager.java:59)
at org.apache.jsp.de.index_jsp._jspService(index_jsp.java:59)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at com.day.j2ee.servletengine.ServletRuntimeEnvironment.service(ServletRuntimeEnvironment.java:228)
at com.day.j2ee.servletengine.RequestDispatcherImpl.doFilter(RequestDispatcherImpl.java:315)
at com.day.j2ee.servletengine.RequestDispatcherImpl.service(RequestDispatcherImpl.java:334)
at com.day.j2ee.servletengine.RequestDispatcherImpl.service(RequestDispatcherImpl.java:378)
at com.day.j2ee.servletengine.ServletHandlerImpl.execute(ServletHandlerImpl.java:315)
at com.day.j2ee.servletengine.DefaultThreadPool$DequeueThread.run(DefaultThreadPool.java:134)
at java.lang.Thread.run(Thread.java:662)

Reason

This problem is usually caused by a version mis-match in JAR library files which were installed through the CRX hotfix.

Solution

You should check for JAR conflicts with the versions contained in the hotfix as listed in the hotfix release notes.

You may need to copy the JAR files from:

…\crx-quickstart\server\runtime\0\_crx\WEB-INF\lib

to here:

…\crx-quickstart\server\lib\container

If this is a non-quickstart installation, then there are instructions in the HF release notes to manually delete older versions of JAR libs:

“Make sure to delete previous versions of installed Java libraries below <crx-webapp>/WEB-INF/lib to avoid classloading issues.”

reference: (33826)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 10.0/10 (1 vote 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)