[ https://issues.apache.org/jira/browse/SLING-2968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13715213#comment-13715213 ]
Carsten Ziegeler commented on SLING-2968: ----------------------------------------- It would be nice if we could come up with a better solution :) startupFinished should mark that the instance is ready and can be used - for this, some topology should already be established as some services might be based on the availability of a topology. So we should try to do this as soon as possible. The topology can change after startupFinished of course > DiscoveryServiceImpl can make HTTP calls before Sling is properly started up > ---------------------------------------------------------------------------- > > Key: SLING-2968 > URL: https://issues.apache.org/jira/browse/SLING-2968 > Project: Sling > Issue Type: Bug > Components: Extensions > Reporter: Robert Munteanu > Assignee: Stefan Egli > Priority: Minor > > If the DiscoveryServiceImpl starts up before the application is completely > initalized, the first requests fail: > {code}03.07.2013 14:24:43.821 *ERROR* [127.0.0.1 [1372850683817] PUT > /libs/sling/topology/connector.40a70c95-c7de-4aea-bfdb-419f6329102b.json > HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl > ServletResolver service missing, cannot service requests , sending status 503 > 03.07.2013 14:24:43.908 *ERROR* [127.0.0.1 [1372850683908] PUT > /libs/sling/topology/connector.40a70c95-c7de-4aea-bfdb-419f6329102b.json > HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl > ServletResolver service missing, cannot service requests , sending status 503 > 03.07.2013 14:24:43.996 *ERROR* [127.0.0.1 [1372850683996] PUT > /libs/sling/topology/connector.40a70c95-c7de-4aea-bfdb-419f6329102b.json > HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl > ServletResolver service missing, cannot service requests , sending status 503 > 03.07.2013 14:24:44.258 *ERROR* [127.0.0.1 [1372850684258] PUT > /libs/sling/topology/connector.40a70c95-c7de-4aea-bfdb-419f6329102b.json > HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl > ServletResolver service missing, cannot service requests , sending status > 503{code} > The solution would be to call the initialization code from inside a > {{StartupListener}}, rather than on component activation. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira