CQ5.2.X: Images broken due to "Unable to compile servlet." error

Symptoms

Images on the site do not appear and/or you get an exception similar to the following javax.servlet.ServletException: Unable to compile servlet.. Please note that the occurrence of this issue is very infrequent and random.

29.06.2009 15:42:56.560 *ERROR* [127.0.0.1 [1246282976544] GET /content/geometrixx/en/services.navimage.png HTTP/1.1]  
com.day.cq.wcm.core.impl.WCMDebugFilter Error during include of SlingRequestPathInfo:  
path='/content/geometrixx/en/services/jcr:content',  
selectorString='navimage', 
 extension='png', suffix='null' org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: javax.servlet.ServletException: Unable to compile servlet. 
 at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:239) 
 at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:520) 
 at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:45) 
 at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:59) 
 at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilterWithErrorHandling(WCMDebugFilter.java:181) 
 at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:148) 
 at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:57) 
 at com.day.cq.wcm.core.impl.WCMRequestFilter.doFilter(WCMRequestFilter.java:222) 
 at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:57) 
 at org.apache.sling.engine.impl.SlingMainServlet.processRequest(SlingMainServlet.java:406) 
 at org.apache.sling.engine.impl.SlingMainServlet.includeContent(SlingMainServlet.java:387) 
 at org.apache.sling.engine.impl.request.SlingRequestDispatcher.dispatch(SlingRequestDispatcher.java:175) 
 at org.apache.sling.engine.impl.request.SlingRequestDispatcher.include(SlingRequestDispatcher.java:69) 
 at com.day.cq.wcm.core.impl.ProxyServlet.service(ProxyServlet.java:70) 
 at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:520) 
 at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:45) 
 at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:59) 
 at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:145) 
 at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:57) 
 at com.day.cq.wcm.core.impl.WCMRequestFilter.filterRootInclude(WCMRequestFilter.java:311) 
 at com.day.cq.wcm.core.impl.WCMRequestFilter.doFilter(WCMRequestFilter.java:149) 
 at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:57) 
 at org.apache.sling.engine.impl.SlingMainServlet.processRequest(SlingMainServlet.java:406) 
 at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:48) 
 at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:59) 
 at org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:59) 
 at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:57) 
 at com.day.cq.rewriter.filter.RewriterFilter.doFilter(RewriterFilter.java:74) 
 at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:57) 
 at com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet.doFilter(FormsHandlingServlet.java:192) 
 at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:57) 
 at com.day.cq.theme.impl.ThemeResolverFilter.doFilter(ThemeResolverFilter.java:67) 
 at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:57) 
 at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:96) 
 at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:57) 
 at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:296) 
 at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:183) 
 at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90) 
 at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:109) 
 at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:75) 
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
 at org.apache.sling.launchpad.base.webapp.SlingServletDelegate.service(SlingServletDelegate.java:276) 
 at org.apache.sling.launchpad.webapp.SlingServlet.service(SlingServlet.java:127) 
 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.FilterChainImpl.doFilter(FilterChainImpl.java:74) 
 at com.day.crx.launchpad.filters.CRXLaunchpadLicenseFilter.doFilter(CRXLaunchpadLicenseFilter.java:96) 
 at com.day.j2ee.servletengine.FilterChainImpl.doFilter(FilterChainImpl.java:72) 
 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:313) 
 at com.day.j2ee.servletengine.DefaultThreadPool$DequeueThread.run(DefaultThreadPool.java:134) 
 at java.lang.Thread.run(Thread.java:613) 
Caused by: org.apache.sling.api.SlingServletException: javax.servlet.ServletException: Unable to compile servlet. 
 at org.apache.sling.scripting.java.ServletWrapper.service(ServletWrapper.java:153) 
 at org.apache.sling.scripting.java.JavaScriptEngineFactory.callServlet(JavaScriptEngineFactory.java:175) 
 at org.apache.sling.scripting.java.JavaScriptEngineFactory.access$000(JavaScriptEngineFactory.java:61) 
 at org.apache.sling.scripting.java.JavaScriptEngineFactory$JavaScriptEngine.eval(JavaScriptEngineFactory.java:266) 
 at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:135) 
 at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:106) 
 at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:225) 
 ... 52 more 
Caused by: javax.servlet.ServletException: Unable to compile servlet. 
 at org.apache.sling.scripting.java.ServletWrapper.getServlet(ServletWrapper.java:112) 
 at org.apache.sling.scripting.java.ServletWrapper.service(ServletWrapper.java:209) 
 at org.apache.sling.scripting.java.ServletWrapper.service(ServletWrapper.java:146) 
 ... 58 more 

Cause

This is due to an issue where the org.apache.sling.jcr.classloader.internal.RepositoryClassLoaderProviderImpl service loses reference to the JCR repository.

Resolution

  1. Login to http://<host>:<port>/system/console/components
  2. Restart the service org.apache.sling.jcr.classloader.internal.RepositoryClassLoaderProviderImpl

Applies to

CQ 5.2.X

 Adobe

Receba ajuda com mais rapidez e facilidade

Novo usuário?

Adobe MAX 2024

Adobe MAX:
a conferência da criatividade

14 a 16 de outubro, Miami Beach e online

Adobe MAX

A conferência da criatividade

14 a 16 de outubro, Miami Beach e online

Adobe MAX 2024

Adobe MAX:
a conferência da criatividade

14 a 16 de outubro, Miami Beach e online

Adobe MAX

A conferência da criatividade

14 a 16 de outubro, Miami Beach e online