Symptoms

When I configure the LinkCheckerTask proxy settings, I get the following error.

xx.xx.xxxx xx:xx:xx.xxx ERROR [127.0.0.1 [1265094098803] POST /var/linkchecker HTTP/1.1] org.apache.sling.engine.impl.SlingMainServlet service: Uncaught SlingException java.lang.NullPointerException
at org.apache.jsp.libs.linkchecker.POST_jsp._jspService(POST_jsp.java:94)
at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:394)
at org.apache.sling.scripting.jsp.JspServletWrapperAdapter.service(JspServletWrapperAdapter.java:59)

and initialization of the task fails with an error like this:

xx.xx.xxxx xx:xx:xx.xxx ERROR [SCR Component Actor] com.day.cq.cq-rewriter [com.day.cq.rewriter.linkchecker.impl.LinkCheckerTask] The activate method has thrown an exception (java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer) java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
at com.day.cq.rewriter.linkchecker.impl.LinkCheckerTask.activate(LinkCheckerTask.java:146)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Cause

The related scr property wasn't set properly in the source code for the connection timeout value.

Resolution

Each time after changing the LinkCheckerTask configuration

  • stop CQ5
  • edit

crx-quickstart/launchpad/config/com/day/cq/rewriter/linkchecker/impl/LinkCheckerTask.config

  • remove the line setting containing connection.timeout
  • restart the CQ5 instance
  • verify that the LinkCheckerTask component is active

Applies to

CQ 5.2/5.2.1

Esta obra está licenciada sob uma licença não adaptada da Creative Commons Attribution-Noncommercial-Share Alike 3.0  As publicações do Twitter™ e do Facebook não são cobertas pelos termos do Creative Commons.

Avisos legais   |   Política de privacidade online