You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by "Bertrand Delacretaz (JIRA)" <ji...@apache.org> on 2011/03/21 11:15:05 UTC

[jira] [Commented] (STANBOL-117) Initialization of the Entityhub sometimes fails during integration tests

    [ https://issues.apache.org/jira/browse/STANBOL-117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13009086#comment-13009086 ] 

Bertrand Delacretaz commented on STANBOL-117:
---------------------------------------------

> The important thing would be to understand why the EmbeddedSolrServerProvider gets unregistered in (3) 
> and than registered again in (6). 

This happens sometimes with SCR services, the framework tries to start one, finds out that some dependencies are missing and stops and restarts to try again later.

In this case, does the state become stable later? 

If yes, the simplest is probably for the tests to retry until this stable state is reached.


> Initialization of the Entityhub sometimes fails during integration tests
> ------------------------------------------------------------------------
>
>                 Key: STANBOL-117
>                 URL: https://issues.apache.org/jira/browse/STANBOL-117
>             Project: Stanbol
>          Issue Type: Bug
>         Environment: Integration tests on hudson 
>            Reporter: Rupert Westenthaler
>            Assignee: Rupert Westenthaler
>
> Sometimes the initialization of the Entityhub based on the default configuration provided by the full launcher of the Stanbol Enhancer fails.
> The reason for that is that the EmbeddedSolrServerProvider is not available at the time when the SolrYard instances do request an SolrServer with the type EMBEDDED.
> However note that the EmbeddedSolrServerProvider is already registered before but get the unregistered shortly before the SolerServer instance is activated.
> The complete log is available at: https://builds.apache.org/hudson/job/stanbol-trunk-1.6/org.apache.stanbol$org.apache.stanbol.enhancer.integration-tests/ws/sling/logs/error.log
> Here the interesting sections of the log.
> (1)  Time: 02:36:42.670
> Bot the DefaultSolrServerProvider and the EmbeddedSolrServerProvider get registered with the EmbeddedSolrServerProvider
> 21.03.2011 02:36:42.668 *INFO* [SCR Component Actor] org.apache.felix.scr Running task: Enable Component: org.apache.stanbol.entityhub.yard.solr.provider.SolrServerProviderManager (6)
> 21.03.2011 02:36:42.669 *INFO* [SCR Component Actor] org.apache.stanbol.entityhub.yard.solr.provider.SolrServerProviderManager add SolrProvider org.apache.stanbol.entityhub.yard.solr.embedded.EmbeddedSolrPorovider@6f947b types [EMBEDDED]
> 21.03.2011 02:36:42.670 *INFO* [SCR Component Actor] org.apache.stanbol.entityhub.yard.solr.provider.SolrServerProviderManager add SolrProvider org.apache.stanbol.entityhub.yard.solr.impl.DefaultSolrServerProvider@15ad1da types [HTTP, STREAMING, LOAD_BALANCE]
> (2) Time: 02:36:42.945
> SolrYard (configured to use an EmbeddedSolrServer) activates
> 21.03.2011 02:36:42.945 *INFO* [Configuration Updater] org.apache.stanbol.entityhub.yard.solr.impl.SolrYard in class org.apache.stanbol.entityhub.yard.solr.impl.SolrYard activate with context org.apache.felix.scr.impl.manager.ComponentContextImpl@157211f
> (3) Time: 21.03.2011 02:36:42.945
> In the same millisecond the EmbeddedSolrServerProvider gets unregistered form the SolrServerProviderManager
> 21.03.2011 02:36:42.945 *INFO* [SCR Component Actor] org.apache.stanbol.entityhub.yard.solr.provider.SolrServerProviderManager remove SolrProvider org.apache.stanbol.entityhub.yard.solr.embedded.EmbeddedSolrPorovider@6f947b types [EMBEDDED]
> 21.03.2011 02:36:42.945 *INFO* [SCR Component Actor] org.apache.stanbol.entityhub.yard.solr Service [org.apache.stanbol.entityhub.yard.solr.embedded.EmbeddedSolrPorovider,40] ServiceEvent UNREGISTERING
> (4) Time 02:36:42.946
> 1ms later the SolrServerProviderManager throws an Exception because no SolrServerProvider for the type EMBEDDED is available
> 21.03.2011 02:36:42.946 *ERROR* [Configuration Updater] org.apache.stanbol.entityhub.yard.solr [org.apache.stanbol.entityhub.yard.solr.impl.SolrYard] The activate method has thrown an exception (java.lang.IllegalArgumentException: No Provider for type EMBEDDED available) java.lang.IllegalArgumentException: No Provider for type EMBEDDED available
> 	at org.apache.stanbol.entityhub.yard.solr.provider.SolrServerProviderManager.getSolrServer(SolrServerProviderManager.java:98)
>         ...
> (5) 02:36:42.946
> Now the second configured SolrYard activates and fails because there is still no SolrServerProvider for the type EMBEDDED
> 21.03.2011 02:36:42.946 *INFO* [Configuration Updater] org.apache.stanbol.entityhub.yard.solr.impl.SolrYard in class org.apache.stanbol.entityhub.yard.solr.impl.SolrYard activate with context org.apache.felix.scr.impl.manager.ComponentContextImpl@82c23d
> 21.03.2011 02:36:42.947 *ERROR* [Configuration Updater] org.apache.stanbol.entityhub.yard.solr [org.apache.stanbol.entityhub.yard.solr.impl.SolrYard] The activate method has thrown an exception (java.lang.IllegalArgumentException: No Provider for type EMBEDDED available) java.lang.IllegalArgumentException: No Provider for type EMBEDDED available
> 	at org.apache.stanbol.entityhub.yard.solr.provider.SolrServerProviderManager.getSolrServer(SolrServerProviderManager.java:98)
>         ...
> (6) 02:36:42.948
> 2ms later the EmbeddedSolrPorovider is added again to the SolrServerProviderManager
> 21.03.2011 02:36:42.948 *INFO* [SCR Component Actor] org.apache.stanbol.entityhub.yard.solr.provider.SolrServerProviderManager add SolrProvider org.apache.stanbol.entityhub.yard.solr.embedded.EmbeddedSolrPorovider@8917a2 types [EMBEDDED]
> The important thing would be to understand why the EmbeddedSolrServerProvider gets unregistered in (3) and than registered again in (6).
> Also note that there are two threads ([SCR Component Actor] and [Configuration Updater]) working at the same time.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira