Return-Path: Delivered-To: apmail-incubator-stanbol-commits-archive@minotaur.apache.org Received: (qmail 14637 invoked from network); 21 Mar 2011 12:43:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Mar 2011 12:43:46 -0000 Received: (qmail 45578 invoked by uid 500); 21 Mar 2011 12:43:46 -0000 Delivered-To: apmail-incubator-stanbol-commits-archive@incubator.apache.org Received: (qmail 45543 invoked by uid 500); 21 Mar 2011 12:43:46 -0000 Mailing-List: contact stanbol-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stanbol-dev@incubator.apache.org Delivered-To: mailing list stanbol-commits@incubator.apache.org Received: (qmail 45531 invoked by uid 99); 21 Mar 2011 12:43:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Mar 2011 12:43:46 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Mar 2011 12:43:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id BAD1E4024B2 for ; Mon, 21 Mar 2011 12:43:05 +0000 (UTC) Date: Mon, 21 Mar 2011 12:43:05 +0000 (UTC) From: "Rupert Westenthaler (JIRA)" To: stanbol-commits@incubator.apache.org Message-ID: <269489172.512.1300711385761.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1411316252.286.1300702025862.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (STANBOL-117) Initialization of the Entityhub sometimes fails during integration tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/STANBOL-117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13009116#comment-13009116 ] Rupert Westenthaler commented on STANBOL-117: --------------------------------------------- > In this case, does the state become stable later? yes ... actually it is also "unstable" for 2-3ms > > If yes, the simplest is probably for the tests to retry until this stable state is reached. The problem is that the SolrServerProviderManager uses @Reference( referenceInterface=SolrServerProvider.class, strategy=ReferenceStrategy.EVENT, policy=ReferencePolicy.DYNAMIC, cardinality=ReferenceCardinality.MANDATORY_MULTIPLE, bind="addSolrProvider",unbind="removeSolrProvider") private Map> solrServerProviders = Collections.synchronizedMap(new EnumMap>(Type.class)); So with the current design it is not possible to define something like a "stable" and an "unstable" state. For some milliseconds there is just a state where the Manager is not able to create an EmbeddedSolrServer because no SolrServerProvider for that type is registered. To define the state as "unstable" when no SolrServerProvider for Type.EMBEDDED is present I would need to change the design. e.g. by directly declaring references to the two SolrServerProvider implementations. best Rupert > 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