Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-6369

Exceptions thrown by reflection API in ModelAdapterFactory#setField() are not logged

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Sling Models API 1.3.0
    • Fix Version/s: Sling Models API 1.3.2
    • Component/s: None
    • Labels:
      None

      Description

      We got the following exception due to "reflection issues"

      06.12.2016 09:36:08.242 *WARN* [172.19.143.86 [1481013368241] GET /[…] HTTP/1.1] org.apache.sling.models.impl.ModelAdapterFactory Could not adapt to model
      org.apache.sling.models.factory.MissingElementsException: Could not inject all required fields into class my.Model
      Could not inject private org.apache.sling.api.adapter.AdapterManager my.Model.adapterManager caused by Could not inject field due to reflection issues
              at org.apache.sling.models.impl.ModelAdapterFactory.createObject(ModelAdapterFactory.java:549)
              at org.apache.sling.models.impl.ModelAdapterFactory.internalCreateModel(ModelAdapterFactory.java:310)
              at org.apache.sling.models.impl.ModelAdapterFactory.getAdapter(ModelAdapterFactory.java:186)
              at org.apache.sling.adapter.internal.AdapterManagerImpl.getAdapter(AdapterManagerImpl.java:147)
              at org.apache.sling.api.adapter.SlingAdaptable.adaptTo(SlingAdaptable.java:104)
              at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.adaptTo(ResourceResolverImpl.java:837)
              at […]
              at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
              at com.adobe.granite.resourceresolverhelper.impl.ResourceResolverHelperImpl.doFilter(ResourceResolverHelperImpl.java:84)
              at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
              at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:129)
              at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
              at org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:151)
              at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:216)
              at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:85)
              at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:79)
              at com.adobe.granite.license.impl.LicenseCheckFilter.doFilter(LicenseCheckFilter.java:308)
              at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
              at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
              at org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:89)
              at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
              at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
              at org.apache.sling.security.impl.ReferrerFilter.doFilter(ReferrerFilter.java:290)
              at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
              at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
              at org.apache.sling.featureflags.impl.FeatureManager.doFilter(FeatureManager.java:116)
              at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
              at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
              at org.apache.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:75)
              at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
              at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
              at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:129)
              at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
              at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
              at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:124)
              at org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:61)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
              at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
              at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
              at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
              at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
              at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
              at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
              at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
              at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
              at org.eclipse.jetty.server.Server.handle(Server.java:499)
              at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
              at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
              at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
              at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
              at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
              at java.lang.Thread.run(Thread.java:745)
      

      Unfortunately, the actual exception, isn't logged, making debugging the issue quite difficult. From the exception message I'm only able to find the place where it is thrown but not what exactly was thrown. My expectation is that the cause is logged as well.

        Attachments

          Activity

            People

            • Assignee:
              kwin Konrad Windszus
              Reporter:
              diru Dirk Rudolph
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: