incubator-stanbol-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rupert Westenthaler (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (STANBOL-117) Initialization of the Entityhub sometimes fails during integration tests
Date Mon, 21 Mar 2011 14:50:05 GMT

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

Rupert Westenthaler commented on STANBOL-117:
---------------------------------------------

More details for the reason(s) that cause this Issue:

The reason why the EmbeddedSolrProvider is restarted by the SCR is because it is first activated
with the default value 
org.apache.stanbol.entityhub.yard.solr.embedded.solrDataDir=indexes

and a second time when the sling launchpad parses the configurations the the ConfigurationAdmin
service - this time with the value
org.apache.stanbol.entityhub.yard.solr.embedded.solrDataDir=${user.dir}/sling/entityhub/solrYard/indexes

At the time the sling launchpad parses the configurations a lot of different components are
initialised simultaneously therefore there is a good change that the case described by this
issue occurs.


I think the best solution for this is to remove the functionality of managing the internal
SolrIndex from the EmbeddedSolrProvider to an other separate/new component. This would be
anyway be more modular than the current solution and in addition it would allow to remove
the need to provide any kind of configuration for the EmbeddedSolrProvider.

I plan to start with the necessary changes tomorrow.

> 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

Mime
View raw message