Hi

@Nuwan
The build.xml file is in the super tenant's
server/synapse-configs/default/sequences and if I log in as a tenant admin,
this file gets created in tenant's synapse-configs/default/sequences folder
as well.
both super user's and tenant admin's carbon admin console's Service Bus ->
Sequences show the build sequence


when I use following scenario, The configurations get created without any
error

first create a tenant domain 'x' and login to it using admin console. then
again without restarting, create another tenant domain 'y' and without
login to admin console, call my method (here no other basic authentication
happens. Only the method with TenantAxisUtils.getTenantAxisConfiguration()
gets called). This time no error occurs and all the configurations get
created in the tenant folder

Only when I go through following scenario, The error occurs

Restart the server again and create a tenant domain 'a' and without login
in to carbon console, call my method (with
TenantAxisUtils.getTenantAxisConfiguration()). This time the error is
thrown and without restarting the server if i create a new tenant domain
'b' and tries to log in to it's carbon console, This error is thrown again
(my method is not called this time and only basic auth login is happening)


I guess there is a system wide configuration gets created for tenants
related to the axis configurations when Tenant admin logs in using basic
authentication ( login method in this[1] class is called ) which is not
happening if I call TenantAxisUtils without any other implementation.

Any idea on what i'm missing or should I initialize any other things before
using TenantAxisUtils

[1]
https://svn.wso2.org/repos/wso2/carbon/kernel/branches/4.2.0/patches/patch0004/core/org.wso2.carbon.core.services/4.2.0/src/main/java/org/wso2/carbon/core/services/authentication/AuthenticationAdmin.java

Thanks in advance
Chamila.


On Fri, Sep 19, 2014 at 2:54 PM, Nuwan Dias <[email protected]> wrote:

> Chamila, does the _build_.xml sequence get deployed properly in the super
> tenant's space?
>
> On Fri, Sep 19, 2014 at 2:36 PM, Chamila Adhikarinayake <[email protected]
> > wrote:
>
>> Hi,
>>
>> I'm using TenantAxisUtils.getTenantAxisConfiguration to create axis
>> configuration. This notifies the TenantServiceCreator observer in APIM
>> (extended from AbstractAxis2ConfigurationContextObserver) and sets up our
>> configuration
>>
>> following is the code used to call it
>>
>> ConfigurationContext ctx = 
>> ServiceReferenceHolder.getContextService().getServerConfigContext();
>>
>> TenantAxisUtils.getTenantAxisConfiguration(tenantDomain, ctx);
>>
>>
>> But I get an error "TenantServiceCreator Couldn't serialise the initial
>> synapse configuration for the domain : domain.com org.apache.synapse.
>> SynapseException: Unable to find a serializer for mediator :
>> BuilderMediator"  when I use this (full error log is at the end)
>>
>> the error is thrown at
>> serializer.serializeSequence(buildSequence, initialSynCfg, null);
>>
>> As a result of this all the configurations except sequences/_build_.xml
>> is created.
>>
>> following is the code part for this
>>
>> SynapseConfiguration initialSynCfg = SynapseConfigurationBuilder.
>> getDefaultConfiguration();
>>
>> :
>> Registry registry = new WSO2Registry();
>>  initialSynCfg.setRegistry(registry);
>> MultiXMLConfigurationSerializer serializer
>>                 = new MultiXMLConfigurationSerializer
>> (synapseConfigDir.getAbsolutePath());
>>
>> try {
>>     serializer.serializeSequence(buildSequence, initialSynCfg, null);
>> }
>>
>>
>> Is there any way I can change the synapse configuration so that I can
>> load this missing file?
>>
>> following is the error log
>>
>> [2014-09-19 12:30:02,701]  INFO - TenantAxisConfigurator Creating tenant
>> AxisConfiguration for tenant: domain.com[48]
>> [2014-09-19 12:30:02,795]  INFO - UserStoreConfigurationDeployer User
>> Store Configuration Deployer initiated.
>> [2014-09-19 12:30:02,838]  INFO - PermissionUpdater Permission cache
>> updated for tenant 48
>> [2014-09-19 12:30:02,839]  INFO - TenantServiceBusInitializer Intializing
>> the ESB Configuration for the tenant domain : domain.com
>> [2014-09-19 12:30:02,857]  INFO - SynapseControllerFactory Using Synapse
>> home : /home/chamila/Support/wso2am-1.7.0/repository/tenants/48
>> [2014-09-19 12:30:02,857]  INFO - SynapseControllerFactory Using
>> synapse.xml location :
>> /home/chamila/Support/wso2am-1.7.0/repository/tenants/48/synapse-configs/default
>> [2014-09-19 12:30:02,857]  INFO - SynapseControllerFactory Using server
>> name : synapse.domain.com
>> [2014-09-19 12:30:02,857]  INFO - SynapseControllerFactory The timeout
>> handler will run every : 15s
>> [2014-09-19 12:30:02,857]  INFO - Axis2SynapseController Initializing
>> Synapse at : Fri Sep 19 12:30:02 IST 2014
>> [2014-09-19 12:30:02,857]  INFO - CarbonSynapseController Loading the
>> mediation configuration from the file system
>> [2014-09-19 12:30:02,858]  INFO - MultiXMLConfigurationBuilder Building
>> synapse configuration from the synapse artifact repository at :
>> /home/chamila/Support/wso2am-1.7.0/repository/tenants/48/synapse-configs/default
>> [2014-09-19 12:30:02,859]  INFO - SynapseConfigurationBuilder Loaded
>> Synapse configuration from the artifact repository at :
>> /home/chamila/Support/wso2am-1.7.0/repository/tenants/48/synapse-configs/default
>> [2014-09-19 12:30:02,860]  INFO - Axis2SynapseController Loading mediator
>> extensions...
>> [2014-09-19 12:30:02,860]  INFO - Axis2SynapseController Deploying the
>> Synapse service...
>> [2014-09-19 12:30:02,860]  INFO - Axis2SynapseController Deploying Proxy
>> services...
>> [2014-09-19 12:30:02,860]  INFO - Axis2SynapseController Deploying
>> EventSources...
>> [2014-09-19 12:30:02,861]  INFO - ServerManager Server ready for
>> processing...
>> [2014-09-19 12:30:02,865]  WARN - MediationStatisticsServiceComponent
>> Couldn't find the mediation statistics store for tenant id: 48
>> [2014-09-19 12:30:02,998]  WARN - TenantServiceCreator Could not create
>> /home/chamila/Support/wso2am-1.7.0/repository/tenants/48/synapse-configs/default/sequences
>> [2014-09-19 12:30:03,009] ERROR - SequenceMediatorSerializer Unable to
>> find a serializer for mediator : BuilderMediator
>> [2014-09-19 12:30:03,010] ERROR - TenantServiceCreator Couldn't serialise
>> the initial synapse configuration for the domain : domain.com
>> org.apache.synapse.SynapseException: Unable to find a serializer for
>> mediator : BuilderMediator
>>     at
>> org.apache.synapse.config.xml.AbstractMediatorSerializer.handleException(AbstractMediatorSerializer.java:200)
>>     at
>> org.apache.synapse.config.xml.AbstractListMediatorSerializer.serializeChildren(AbstractListMediatorSerializer.java:40)
>>     at
>> org.apache.synapse.config.xml.SequenceMediatorSerializer.serializeSpecificMediator(SequenceMediatorSerializer.java:86)
>>     at
>> org.apache.synapse.config.xml.AbstractMediatorSerializer.serializeMediator(AbstractMediatorSerializer.java:90)
>>     at
>> org.apache.synapse.config.xml.MultiXMLConfigurationSerializer.serializeSequence(MultiXMLConfigurationSerializer.java:425)
>>     at
>> org.wso2.carbon.apimgt.impl.observers.TenantServiceCreator.createTenantSynapseConfigHierarchy(TenantServiceCreator.java:286)
>>     at
>> org.wso2.carbon.apimgt.impl.observers.TenantServiceCreator.createdConfigurationContext(TenantServiceCreator.java:138)
>>     at
>> org.wso2.carbon.core.multitenancy.utils.TenantAxisUtils.createTenantConfigurationContext(TenantAxisUtils.java:344)
>>
>>         :
>>         :
>>
>>
>> [2014-09-19 12:30:03,225]  INFO - DeploymentInterceptor Deploying Axis2
>> service: wso2carbon-sts {domain.com[48]}
>> [2014-09-19 12:30:03,245]  INFO - DeploymentEngine Deploying Web service:
>> org.wso2.carbon.sts -
>> [2014-09-19 12:30:03,247]  INFO - DeploymentInterceptor Deploying Axis2
>> service: wso2carbon-sts {domain.com[48]}
>> [2014-09-19 12:30:03,274]  INFO - TenantAxisUtils Loaded tenant
>> domain.com in 646 ms
>> [2014-09-19 12:30:17,810]  INFO - SequenceDeployer Sequence named
>> '_auth_failure_handler_' has been deployed from file :
>> /home/chamila/Support/wso2am-1.7.0/repository/tenants/48/synapse-configs/default/sequences/_auth_failure_handler_.xml
>> [2014-09-19 12:30:17,812]  INFO - SequenceDeployer Sequence named
>> '_production_key_error_' has been deployed from file :
>> /home/chamila/Support/wso2am-1.7.0/repository/tenants/48/synapse-configs/default/sequences/_production_key_error_.xml
>> [2014-09-19 12:30:17,814]  INFO - SequenceDeployer Sequence named
>> '_sandbox_key_error_' has been deployed from file :
>> /home/chamila/Support/wso2am-1.7.0/repository/tenants/48/synapse-configs/default/sequences/_sandbox_key_error_.xml
>>
>>
>>
>> Thanks,
>> Chamila.
>>
>> On Wed, Sep 17, 2014 at 9:30 AM, Chamila Adhikarinayake <
>> [email protected]> wrote:
>>
>>> Hi all,
>>>
>>> We have a TenantServiceCreator[1] class ( extened from
>>> AbstractAxis2ConfigurationContextObserver) in API manager to load tenant
>>> synapse configuration.
>>>
>>> When tenant user logs in, this is get fired and the synapse configs are
>>> created. But when SSO is enabled, This login does not happen and as a
>>> result this observer doesn't get executed.
>>>
>>> Is there any carbon util or some admin service where I can use to load
>>> the tenant (similar effect to login to the tenant domain ) so that this
>>> observer class will also be executed?
>>>
>>> [1]
>>> https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/apimgt/org.wso2.carbon.apimgt.impl/1.2.3/src/main/java/org/wso2/carbon/apimgt/impl/observers/TenantServiceCreator.java
>>>
>>> Thanks,
>>> Chamila
>>>
>>> --
>>> Regards,
>>> Chamila Adhikarinayake
>>> Software Engineer
>>> WSO2, Inc.
>>> Mobile - +94712346437
>>> Email  - [email protected]
>>>
>>
>>
>>
>> --
>> Regards,
>> Chamila Adhikarinayake
>> Software Engineer
>> WSO2, Inc.
>> Mobile - +94712346437
>> Email  - [email protected]
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Nuwan Dias
>
> Associate Tech Lead - WSO2, Inc. http://wso2.com
> email : [email protected]
> Phone : +94 777 775 729
>



-- 
Regards,
Chamila Adhikarinayake
Software Engineer
WSO2, Inc.
Mobile - +94712346437
Email  - [email protected]
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to