Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
Sling Models Implementation 1.0.6
Description
the implementation of unbindInjectAnnotationProcessorFactory has a severe copy & paste error - it tries to write the wrong collection into the corresponding array, which leads to errors in integration test (although no test fails because it happens on shutdown):
Date: 2014-08-29 13:15:47.161 Class: org.apache.sling.models.impl Method: ? Level: SEVERE Thread: qtp2129100224-42 File: ?:? Logger name: Unknown Message: [org.apache.sling.models.impl.ModelAdapterFactory(129)] The unbindInjectAnnotationProcessorFactory method has thrown an exception (java.lang.ArrayStoreException: org.apache.sling.models.impl.injectors.ResourceResolverInjector) java.lang.ArrayStoreException: org.apache.sling.models.impl.injectors.ResourceResolverInjector at java.util.AbstractCollection.toArray(AbstractCollection.java:188) at org.apache.sling.models.impl.ModelAdapterFactory.unbindInjectAnnotationProcessorFactory(ModelAdapterFactory.java:976) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:231) at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:39) at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:624) at org.apache.felix.scr.impl.helper.BaseMethod$NotResolved.invoke(BaseMethod.java:583) at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:508) at org.apache.felix.scr.impl.helper.BindMethod.invoke(BindMethod.java:37) at org.apache.felix.scr.impl.manager.DependencyManager.invokeUnbindMethod(DependencyManager.java:1717) at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeUnbindMethod(SingleComponentManager.java:404) at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.removedService(DependencyManager.java:376) at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.removedService(DependencyManager.java:304) at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1506) at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1401) at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.untrack(ServiceTracker.java:1261) at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1440) at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:943) at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:794) at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:544) at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4445) at org.apache.felix.framework.Felix.access$000(Felix.java:77) at org.apache.felix.framework.Felix$1.serviceChanged(Felix.java:404) at org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegistry.java:153) at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:128) at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.unregister(AbstractComponentManager.java:1011) at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.unregister(AbstractComponentManager.java:992) at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:141) at org.apache.felix.scr.impl.manager.AbstractComponentManager.unregisterService(AbstractComponentManager.java:1054) at org.apache.felix.scr.impl.manager.AbstractComponentManager.doDeactivate(AbstractComponentManager.java:900) at org.apache.felix.scr.impl.manager.AbstractComponentManager.deactivateInternal(AbstractComponentManager.java:883) at org.apache.felix.scr.impl.manager.AbstractComponentManager.dispose(AbstractComponentManager.java:580) at org.apache.felix.scr.impl.config.ConfigurableComponentHolder.disposeComponents(ConfigurableComponentHolder.java:406) at org.apache.felix.scr.impl.BundleComponentActivator.dispose(BundleComponentActivator.java:335) at org.apache.felix.scr.impl.Activator.disposeComponents(Activator.java:313) at org.apache.felix.scr.impl.Activator.access$300(Activator.java:45) at org.apache.felix.scr.impl.Activator$ScrExtension.destroy(Activator.java:198) at org.apache.felix.utils.extender.AbstractExtender$2.run(AbstractExtender.java:290) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at org.apache.felix.utils.extender.AbstractExtender.destroyExtension(AbstractExtender.java:312) at org.apache.felix.utils.extender.AbstractExtender.bundleChanged(AbstractExtender.java:186) at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:869) at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:790) at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:515) at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4429) at org.apache.felix.framework.Felix.stopBundle(Felix.java:2528) at org.apache.felix.framework.Felix.uninstallBundle(Felix.java:2640) at org.apache.felix.framework.BundleImpl.uninstall(BundleImpl.java:1043) at org.apache.felix.webconsole.internal.core.BundlesServlet.doPost(BundlesServlet.java:400) at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:526) at org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:450) at org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:339) at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:300) at org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:93) at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:50) at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31) at org.apache.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:75) at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108) at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80) at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46) at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31) at org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:76) at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:49) at org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:370) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494) at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) at java.lang.Thread.run(Thread.java:722) Marked: false
patch attached.
Attachments
Attachments
Issue Links
- relates to
-
SLING-3683 Sling Models: ModelAdapterFactory mixes up annotationProcessor in injectFieldOrMethod method
- Closed