Yes, you will mostly get into this error once because despite the error the
deployment schedular task will run continuously. But IMO instead of
ignoring this exception (which will be logged), why don't we try out the
2nd solution (get a clone of the deployer map and use that with iteration)
suggested above?

On Thu, Aug 6, 2015 at 10:10 PM, Amila De Silva <[email protected]> wrote:

> Hi,
>
> This issue has been observed again with the last release.
>
> Intention of this mail is to come to a conclusion about this issue, since
> it has been re-opened several times despite the fixes provided. While
> having an offline discussion with KasunG and Supun, got to know that this
> happens when Deployers get added/removed while RepositoryListener iterate
> through the Deployer map, looking for changes in the monitored directories.
>
> CarbonDeploymentSchedulerTask is written in a way, to start its execution
> after all the Deployers get added (if the Deployers are specified through
> component.xml), which would prevent Deployers list getting modified in the
> middle of an execution. But if Deployers are added programmatically, then
> this behaviour cannot be  guaranteed.
>
> After discussing this with KasunG and Sameera, got to know that there are
> several options to solve this issue;
>
> 1. Specifying the Deployer in component.xml
> 2. In RepositoryListener.loadOtherDirectories() method, getting a clone of
> the Deployers map before iterating.
>
>
> To see which option is viable, went through the list of Deployers that
> gets added when server starts up. These are the observations made:
>
> 1. Deployers listed below gets added before ConfigurationContext
> initializes
>
> [2015-08-06 18:33:07,889]  INFO - DeploymentEngine Added Deployed class :
> class org.jaggeryjs.jaggery.deployer.JaggeryDeployer , directory :
> jaggeryapps, extension : zip
> [2015-08-06 18:33:07,889]  INFO - DeploymentEngine Added Deployed class :
> class org.jaggeryjs.jaggery.deployer.JaggeryDeployer , directory :
> jaggeryapps, extension : null
> [2015-08-06 18:33:07,890]  INFO - DeploymentEngine Added Deployed class :
> class
> org.wso2.carbon.identity.user.store.configuration.deployer.UserStoreConfigurationDeployer
> , directory : userstores, extension : xml
> [2015-08-06 18:33:07,891]  INFO - DeploymentEngine Added Deployed class :
> class org.wso2.carbon.webapp.mgt.WebappMetadataDeployer , directory :
> artifactMetafiles/webapp, extension : xml
> [2015-08-06 18:33:07,892]  INFO - DeploymentEngine Added Deployed class :
> class
> org.wso2.carbon.core.persistence.file.deployer.PersistenceMetaDataDeployer
> , directory : servicemetafiles, extension : xml
> [2015-08-06 18:33:07,892]  INFO - DeploymentEngine Added Deployed class :
> class
> org.wso2.carbon.core.persistence.file.deployer.PersistenceMetaDataDeployer
> , directory : modulemetafiles, extension : xml
> [2015-08-06 18:33:07,893]  INFO - DeploymentEngine Added Deployed class :
> class org.wso2.carbon.webapp.deployer.WebappDeployer , directory : webapps,
> extension : war
> [2015-08-06 18:33:07,893]  INFO - DeploymentEngine Added Deployed class :
> class org.wso2.carbon.webapp.deployer.WebappDeployer , directory : webapps,
> extension : null
> [2015-08-06 18:33:07,895]  INFO - DeploymentEngine Added Deployed class :
> class
> org.wso2.carbon.stratos.landing.page.deployer.LandingPageWebappDeployer ,
> directory : stratos_home, extension : null
>
> 2. And the following list gets added after the CC initialisation.
>
> [2015-08-06 18:33:14,683]  INFO - DeploymentEngine Added Deployed class :
> class org.apache.synapse.deployers.ExtensionDeployer , directory :
> /Users/Amila/Tasks/1.9.1/PR/wso2am-1.9.1-SNAPSHOT/repository/deployment/server//mediators,
> extension : xar
> [2015-08-06 18:33:14,683]  INFO - DeploymentEngine Added Deployed class :
> class org.apache.synapse.deployers.ExtensionDeployer , directory :
> /Users/Amila/Tasks/1.9.1/PR/wso2am-1.9.1-SNAPSHOT/repository/deployment/server//extensions,
> extension : xar
> [2015-08-06 18:33:14,683]  INFO - DeploymentEngine Added Deployed class :
> class org.apache.synapse.deployers.ExtensionDeployer , directory :
> /Users/Amila/Tasks/1.9.1/PR/wso2am-1.9.1-SNAPSHOT/repository/deployment/server//mediators,
> extension : jar
> [2015-08-06 18:33:14,683]  INFO - DeploymentEngine Added Deployed class :
> class org.apache.synapse.deployers.ExtensionDeployer , directory :
> /Users/Amila/Tasks/1.9.1/PR/wso2am-1.9.1-SNAPSHOT/repository/deployment/server//extensions,
> extension : jar
> [2015-08-06 18:33:14,684]  INFO - DeploymentEngine Added Deployed class :
> class org.apache.synapse.deployers.ClassMediatorDeployer , directory :
> /Users/Amila/Tasks/1.9.1/PR/wso2am-1.9.1-SNAPSHOT/repository/deployment/server//class-mediators,
> extension : jar
>
> 3. And the following list, gets added, right at the place where exception
> was thrown.
>
> [2015-08-06 18:33:15,638]  INFO - DeploymentEngine Added Deployed class :
> class org.wso2.carbon.application.deployer.CappAxis2Deployer , directory :
> carbonapps, extension : car
> [2015-08-06 18:33:15,645]  INFO - DeploymentEngine Added Deployed class :
> class org.wso2.carbon.localentry.LocalEntryDeployer , directory :
> /Users/Amila/Tasks/1.9.1/PR/wso2am-1.9.1-SNAPSHOT/././repository/deployment/server/synapse-configs/default/local-entries,
> extension : xml
> [2015-08-06 18:33:15,654]  INFO - DeploymentEngine Added Deployed class :
> class org.apache.synapse.deployers.APIDeployer , directory :
> /Users/Amila/Tasks/1.9.1/PR/wso2am-1.9.1-SNAPSHOT/././repository/deployment/server/synapse-configs/default/api,
> extension : xml
> [2015-08-06 18:33:15,663]  INFO - DeploymentEngine Added Deployed class :
> class org.wso2.carbon.sequences.SequenceDeploymentInterceptor , directory :
> /Users/Amila/Tasks/1.9.1/PR/wso2am-1.9.1-SNAPSHOT/././repository/deployment/server/synapse-configs/default/sequences,
> extension : xml
> [2015-08-06 18:33:15,671]  INFO - DeploymentEngine Added Deployed class :
> class org.wso2.carbon.startup.StartupTaskDeployer , directory :
> /Users/Amila/Tasks/1.9.1/PR/wso2am-1.9.1-SNAPSHOT/././repository/deployment/server/synapse-configs/default/tasks,
> extension : xml
>
> Full log can be found at [1].
>
> While going through one of the Deployers that gets added after CC
> initialisation (CappAxis2Deployer), it was observed that component.xml
> for this has been commented out and later I learnt it has been done to fix
> an issue. So this means that specifying Deployers in component.xml is not
> an option in all the cases. So this makes 2nd option the fix to go with.
>
> But later on realised that the entire scheduler operation is wrapped in a
> try catch block, which catches and handles a Throwable. So even a CME
> occurs, while server starts up, if it's not thrown repeatedly, that means,
> the task has succeeded in a subsequent run - Which means that there's no
> impact of a single CME. If that's the case, is it advisable to ignore this
> error?
>
> How should we proceed with this?
>
> [1]
> https://docs.google.com/a/wso2.com/document/d/19Z6Lb_RA_4ivIJwWxTFz8XSLIK77eNOnQ1J2QDiC5R8/edit?usp=sharing
>
>
> On Thu, Jun 19, 2014 at 6:55 PM, Manoj Kumara <[email protected]> wrote:
>
>> Hi,
>>
>> This issue was reported on APIM 1.7.0 and i sent the pull request [1]
>> relevant to the latest fixes. This also contain some fixes on
>> *startup/org.wso2.carbon.startup* module but I couldn't find the
>> relevant git repository for this. Appreciate if someone can guide me on
>> this.
>>
>> [1] https://github.com/wso2-dev/carbon-mediation/pull/20
>>
>> Thanks,
>> Manoj
>>
>>
>> *Manoj Kumara*
>> Software Engineer
>> WSO2 Inc. http://wso2.com/
>> *lean.enterprise.middleware*
>> Mobile: +94713448188
>>
>>
>> On Sun, May 18, 2014 at 1:21 PM, Isuru Udana <[email protected]> wrote:
>>
>>>
>>>
>>>
>>> On Sun, May 18, 2014 at 12:52 PM, Sanjeewa Malalgoda <[email protected]>
>>> wrote:
>>>
>>>> Hi,
>>>> I have created mediation initializer server and aggregate features and
>>>> added required things to chunk 11 components and feature poms.  I think we
>>>> need to update ELB p2 pom as well.
>>>>
>>> Done. Thanks for informing.
>>>
>>>>
>>>> Thanks,
>>>> sanjeewa.
>>>>
>>>>
>>>> On Sat, May 17, 2014 at 11:41 PM, Manoj Kumara <[email protected]> wrote:
>>>>
>>>>> Hi Sanjeewa,
>>>>>
>>>>> The fix relevant to this was added to patch0007 
>>>>> org.wso2.carbon.application.deployer
>>>>> module with r200859 and to org.wso2.carbon.mediation.initializer/4.2.2 
>>>>> with
>>>>> r202047 as mentioned on the jira.
>>>>> I have committed to 4.2.2 version since it was in APIM 1.7.0 product.
>>>>> But seems this was released under chunk-07 [1]. seems like I missed that 
>>>>> at
>>>>> that point.
>>>>>
>>>>> I have reverted this change under r203033 and created the new version
>>>>> 4.2.3 for this under [2] please use this in the product. Sorry about the
>>>>> trouble.
>>>>>
>>>>> [1]
>>>>> https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/product-releases/chunk-07/components/pom.xml
>>>>> [2]
>>>>> https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/mediation-initializer/org.wso2.carbon.mediation.initializer/4.2.3/
>>>>>
>>>>> Thanks,
>>>>> Manoj
>>>>>
>>>>>
>>>>> *Manoj Kumara*
>>>>> Software Engineer
>>>>> WSO2 Inc. http://wso2.com/
>>>>> *lean.enterprise.middleware*
>>>>> Mobile: +94713448188
>>>>>
>>>>>
>>>>> On Sat, May 17, 2014 at 11:13 AM, Sanjeewa Malalgoda <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Hi Manoj,
>>>>>> AFAIK you fixed this issue[1] in patch0007. But it seems this issue
>>>>>> is still there in latest packs. Do you have any idea what went wrong? 
>>>>>> This
>>>>>> is urgent issue that we should fix before release. So really appreciate 
>>>>>> if
>>>>>>  you can have a quick look at.
>>>>>>
>>>>>> [1]https://wso2.org/jira/browse/APIMANAGER-2241
>>>>>>
>>>>>> Thanks,
>>>>>> sanjeewa
>>>>>>
>>>>>> --
>>>>>>
>>>>>> *Sanjeewa Malalgoda*
>>>>>> WSO2 Inc.
>>>>>> Mobile : +94713068779
>>>>>>
>>>>>> <http://sanjeewamalalgoda.blogspot.com/>blog
>>>>>> :http://sanjeewamalalgoda.blogspot.com/
>>>>>> <http://sanjeewamalalgoda.blogspot.com/>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> *Sanjeewa Malalgoda*
>>>> WSO2 Inc.
>>>> Mobile : +94713068779
>>>>
>>>> <http://sanjeewamalalgoda.blogspot.com/>blog
>>>> :http://sanjeewamalalgoda.blogspot.com/
>>>> <http://sanjeewamalalgoda.blogspot.com/>
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> *Isuru Udana*
>>> Senior
>>> * Software Engineer*
>>> WSO2 Inc.; http://wso2.com
>>> email: [email protected] cell: +94 77 3791887
>>> blog: http://mytecheye.blogspot.com/
>>> twitter: http://twitter.com/isudana
>>>
>>
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Amila De Silva*
>
> WSO2 Inc.
> mobile :(+94) 775119302
>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Kishanthan Thangarajah*
Associate Technical Lead,
Platform Technologies Team,
WSO2, Inc.
lean.enterprise.middleware

Mobile - +94773426635
Blog - *http://kishanthan.wordpress.com <http://kishanthan.wordpress.com>*
Twitter - *http://twitter.com/kishanthan <http://twitter.com/kishanthan>*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to