You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Tobias Bocanegra (JIRA)" <ji...@apache.org> on 2008/01/28 01:05:35 UTC
[jira] Created: (SLING-206) servlet not picked up by resolver
unless i restart my bundle
servlet not picked up by resolver unless i restart my bundle
------------------------------------------------------------
Key: SLING-206
URL: https://issues.apache.org/jira/browse/SLING-206
Project: Sling
Issue Type: Bug
Components: ServletResolver
Reporter: Tobias Bocanegra
i have a servlet that is registered with a primary type of a node.
just after startup, a request to a node with that primary type shows
the dump of the default servlet. after i restart my bundle that
contains the servlet (stop/start) the next request is then handled by
my servlet.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-206) servlet not picked up by resolver
unless i restart my bundle
Posted by "Tobias Bocanegra (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12563034#action_12563034 ]
Tobias Bocanegra commented on SLING-206:
----------------------------------------
debugging shows, that the 'componentContext' is NULL:
protected void bindResourceProvider(ServiceReference reference) {
String[] roots = OsgiUtil.toStringArray(reference.getProperty(ResourceProvider.ROOTS));
if (roots != null && roots.length > 0) {
---> ResourceProvider provider = (ResourceProvider) componentContext.locateService(
"ResourceProvider", reference);
> servlet not picked up by resolver unless i restart my bundle
> ------------------------------------------------------------
>
> Key: SLING-206
> URL: https://issues.apache.org/jira/browse/SLING-206
> Project: Sling
> Issue Type: Bug
> Components: ServletResolver
> Reporter: Tobias Bocanegra
> Attachments: config_status.txt
>
>
> i have a servlet that is registered with a primary type of a node.
> just after startup, a request to a node with that primary type shows
> the dump of the default servlet. after i restart my bundle that
> contains the servlet (stop/start) the next request is then handled by
> my servlet.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (SLING-206) servlet not picked up by resolver
unless i restart my bundle
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger resolved SLING-206.
-------------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0
Fixed in Rev. 616254 by delaying the actual binding of ResourceProviders until after the JcrResourceResolverFactoryImpl component is activated and the ComponentContext is available.
Please close this issue if this fixes your problem. Thanks.
> servlet not picked up by resolver unless i restart my bundle
> ------------------------------------------------------------
>
> Key: SLING-206
> URL: https://issues.apache.org/jira/browse/SLING-206
> Project: Sling
> Issue Type: Bug
> Components: ServletResolver
> Reporter: Tobias Bocanegra
> Assignee: Felix Meschberger
> Fix For: 2.0.0
>
> Attachments: config_status.txt
>
>
> i have a servlet that is registered with a primary type of a node.
> just after startup, a request to a node with that primary type shows
> the dump of the default servlet. after i restart my bundle that
> contains the servlet (stop/start) the next request is then handled by
> my servlet.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SLING-206) servlet not picked up by resolver
unless i restart my bundle
Posted by "Tobias Bocanegra (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tobias Bocanegra updated SLING-206:
-----------------------------------
Attachment: config_status.txt
configuration status dump of sling cosole
> servlet not picked up by resolver unless i restart my bundle
> ------------------------------------------------------------
>
> Key: SLING-206
> URL: https://issues.apache.org/jira/browse/SLING-206
> Project: Sling
> Issue Type: Bug
> Components: ServletResolver
> Reporter: Tobias Bocanegra
> Attachments: config_status.txt
>
>
> i have a servlet that is registered with a primary type of a node.
> just after startup, a request to a node with that primary type shows
> the dump of the default servlet. after i restart my bundle that
> contains the servlet (stop/start) the next request is then handled by
> my servlet.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (SLING-206) servlet not picked up by resolver unless
i restart my bundle
Posted by "Tobias Bocanegra (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tobias Bocanegra closed SLING-206.
----------------------------------
> servlet not picked up by resolver unless i restart my bundle
> ------------------------------------------------------------
>
> Key: SLING-206
> URL: https://issues.apache.org/jira/browse/SLING-206
> Project: Sling
> Issue Type: Bug
> Components: ServletResolver
> Reporter: Tobias Bocanegra
> Assignee: Felix Meschberger
> Fix For: 2.0.0
>
> Attachments: config_status.txt
>
>
> i have a servlet that is registered with a primary type of a node.
> just after startup, a request to a node with that primary type shows
> the dump of the default servlet. after i restart my bundle that
> contains the servlet (stop/start) the next request is then handled by
> my servlet.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-206) servlet not picked up by resolver
unless i restart my bundle
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12563076#action_12563076 ]
Felix Meschberger commented on SLING-206:
-----------------------------------------
Thanks for helping sort this issue out. I imagined, that it has to do with the start order of the bundle. And you are right, the bindeResourceProvider method should postpone actualy binding until after the component has been activated.
> servlet not picked up by resolver unless i restart my bundle
> ------------------------------------------------------------
>
> Key: SLING-206
> URL: https://issues.apache.org/jira/browse/SLING-206
> Project: Sling
> Issue Type: Bug
> Components: ServletResolver
> Reporter: Tobias Bocanegra
> Assignee: Felix Meschberger
> Attachments: config_status.txt
>
>
> i have a servlet that is registered with a primary type of a node.
> just after startup, a request to a node with that primary type shows
> the dump of the default servlet. after i restart my bundle that
> contains the servlet (stop/start) the next request is then handled by
> my servlet.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-206) servlet not picked up by resolver
unless i restart my bundle
Posted by "Tobias Bocanegra (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12563033#action_12563033 ]
Tobias Bocanegra commented on SLING-206:
----------------------------------------
i'm getting this all over the log file:
28.01.2008 00:47:14 *ERROR* o.a.s.j.resource: [org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl] DependencyManager : exception while invoking bindResourceProvider() (java.lang.reflect.InvocationTargetException)
java.lang.reflect.InvocationTargetException
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:585)
at org.apache.felix.scr.impl.DependencyManager.invokeBindMethod(DependencyManager.java:873)
at org.apache.felix.scr.impl.DependencyManager.bind(DependencyManager.java:655)
at org.apache.felix.scr.impl.ImmediateComponentManager.createImplementationObject(ImmediateComponentManager.java:204)
at org.apache.felix.scr.impl.ImmediateComponentManager.createComponent(ImmediateComponentManager.java:134)
at org.apache.felix.scr.impl.AbstractComponentManager.activateInternal(AbstractComponentManager.java:402)
at org.apache.felix.scr.impl.AbstractComponentManager.access$100(AbstractComponentManager.java:36)
at org.apache.felix.scr.impl.AbstractComponentManager$2.run(AbstractComponentManager.java:112)
at org.apache.felix.scr.impl.ComponentActorThread.run(ComponentActorThread.java:85)
Caused by: java.lang.NullPointerException
at org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl.bindResourceProvider(JcrResourceResolverFactoryImpl.java:455)
... 12 common frames omitted
i guess that could be the problem.
> servlet not picked up by resolver unless i restart my bundle
> ------------------------------------------------------------
>
> Key: SLING-206
> URL: https://issues.apache.org/jira/browse/SLING-206
> Project: Sling
> Issue Type: Bug
> Components: ServletResolver
> Reporter: Tobias Bocanegra
> Attachments: config_status.txt
>
>
> i have a servlet that is registered with a primary type of a node.
> just after startup, a request to a node with that primary type shows
> the dump of the default servlet. after i restart my bundle that
> contains the servlet (stop/start) the next request is then handled by
> my servlet.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (SLING-206) servlet not picked up by resolver
unless i restart my bundle
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger reassigned SLING-206:
---------------------------------------
Assignee: Felix Meschberger
> servlet not picked up by resolver unless i restart my bundle
> ------------------------------------------------------------
>
> Key: SLING-206
> URL: https://issues.apache.org/jira/browse/SLING-206
> Project: Sling
> Issue Type: Bug
> Components: ServletResolver
> Reporter: Tobias Bocanegra
> Assignee: Felix Meschberger
> Attachments: config_status.txt
>
>
> i have a servlet that is registered with a primary type of a node.
> just after startup, a request to a node with that primary type shows
> the dump of the default servlet. after i restart my bundle that
> contains the servlet (stop/start) the next request is then handled by
> my servlet.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-206) servlet not picked up by resolver
unless i restart my bundle
Posted by "Tobias Bocanegra (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12563035#action_12563035 ]
Tobias Bocanegra commented on SLING-206:
----------------------------------------
it seems that the bindResourceProvider() is called before the component is activated.
> servlet not picked up by resolver unless i restart my bundle
> ------------------------------------------------------------
>
> Key: SLING-206
> URL: https://issues.apache.org/jira/browse/SLING-206
> Project: Sling
> Issue Type: Bug
> Components: ServletResolver
> Reporter: Tobias Bocanegra
> Attachments: config_status.txt
>
>
> i have a servlet that is registered with a primary type of a node.
> just after startup, a request to a node with that primary type shows
> the dump of the default servlet. after i restart my bundle that
> contains the servlet (stop/start) the next request is then handled by
> my servlet.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.