On Thu, May 16, 2013 at 2:27 PM, Vijayaratha Vijayasingam
<[email protected]>wrote:

> Hi hasini;
> we are not calling user.core form our end, we try
> to retrieve user-registry from our end to get the API data for tenants[1];
> Regsitry calls usercore.
> May be the tenant login/creation doesn't  involve in this realmConf
> initialization(im not sure)
>

Tenant creation do involve initialization of tenant realm.

Please note the following line in the stack trace you have printed above:

*at org.wso2.carbon.user.core.common.DefaultRealmService.getTenantUserRealm(
DefaultRealmService.java:169)*

This can not be invoked being in an individual tenant flow.

Thanks,
Hasini.

you can check attached usermsgt.xml with latest APIm pack. Try to login
> from store, you will see the issue.(after publishing api, restart the
> server)
>
>   tenantConfRegistry = ServiceReferenceHolder.getInstance().
>
> getRegistryService().getConfigUserRegistry(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME,
> tenant.getId());
>   tenantRegistry = ServiceReferenceHolder.getInstance().
>
> getRegistryService().getGovernanceUserRegistry(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME,
> tenant.getId());
>
> thansk
>
>
>
> On 16 May 2013 14:19, Hasini Gunasinghe <[email protected]> wrote:
>
>> Hi Ratha,
>>
>> On Thu, May 16, 2013 at 10:43 AM, Vijayaratha Vijayasingam <
>> [email protected]> wrote:
>>
>>> Hi all;
>>> I checked the user.core component to find out the root cause.
>>> When we login from api store to retrieve public apis, we do
>>> an iteration for all tenant's publicAPI. For that we check the
>>> particular tenant's  registry. Registry calls-->usercore-->realmservice,
>>> where we  initialize the relamConfiguration for tenants.
>>>
>>
>> Do you observe this issue only when you go through the aforementioned
>> flow? If so, you need to make sure that it is initiated in the correct
>> tenant scope.
>>
>>  AFAIK, already existing multi tenant operations work fine in the APIM
>> pack - eg: tenant creation, tenant login etc.., where the tenant specific
>> realm initialization work fine without issue. Therefore, IMO, this can not
>> be a generic issue in user.core - rather you might have observed this due
>> to the way you initialize the above flow.
>>
>> Thanks,
>> Hasini.
>>
>>
>>>  When we try to initialize the realm, system couldn't do lookup for the
>>> particular datasource; which is *jdbc/WSO2UM1.* (this datasources we
>>> define for multiple userstore)
>>> The error im getting for this is[1];
>>> But when we start the server, system is able to initialize the realm
>>> configuration properly, that is it is able to do jndi lookup properly. What
>>> might be the issue? (I found some similar issues , but all stating driver
>>> is missing or, entry is wrong etc..but none is relevant to me)
>>>  There is a carbonjira also reported same and resolved, but the reason
>>> provided for the issue looks irrelevant for me[2].
>>> If anybody knows the root cause please reply to the thread.
>>> p.s: attched the uesrmgt+datasourec
>>>
>>> Thanks.
>>>
>>> [2]https://wso2.org/jira/browse/CARBON-11674
>>>
>>> *
>>> *
>>> *[1]*
>>> *
>>> Caused by: javax.naming.NameNotFoundException: Name [jdbc/WSO2UM1] is
>>> not bound in this Context. Unable to find [jdbc].
>>>  at org.apache.naming.NamingContext.lookup(NamingContext.java:820)
>>> at org.apache.naming.NamingContext.lookup(NamingContext.java:168)
>>>  at org.apache.naming.SelectorContext.lookup(SelectorContext.java:158)
>>> at
>>> org.wso2.carbon.context.internal.CarbonContextDataHolder$CarbonInitialJNDIContext.lookup(CarbonContextDataHolder.java:1030)
>>>  at javax.naming.InitialContext.lookup(InitialContext.java:392)
>>> at javax.naming.InitialContext.doLookup(InitialContext.java:265)
>>>  at
>>> org.wso2.carbon.user.core.util.DatabaseUtil.lookupDataSource(DatabaseUtil.java:90)
>>> *
>>> *
>>> *
>>>
>>>
>>>
>>> On 14 May 2013 15:43, Vijayaratha Vijayasingam <[email protected]> wrote:
>>>
>>>> Hi all;
>>>> we are getting above issue in APIManager 1.4.0, with multiple userstore
>>>> configuration.
>>>> What we did is, after publishing/subscribing the API, we allowed the
>>>> store app to session timeout then re login the system. We couldnt see the
>>>> APIs at that time;
>>>> The error we got is.
>>>>
>>>>         ... 32 more
>>>> [2013-05-14 15:35:29,756] ERROR - DefaultRealm Cannot create
>>>> org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager
>>>> java.lang.reflect.InvocationTargetException
>>>>         at
>>>> sun.reflect.GeneratedConstructorAccessor126.newInstance(Unknown Source)
>>>>         at
>>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>>>>         at
>>>> java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>>>>         at
>>>> org.wso2.carbon.user.core.common.DefaultRealm.createObjectWithOptions(DefaultRealm.java:225)
>>>>         at
>>>> org.wso2.carbon.user.core.common.DefaultRealm.initializeObjects(DefaultRealm.java:147)
>>>>         at
>>>> org.wso2.carbon.user.core.common.DefaultRealm.init(DefaultRealm.java:113)
>>>>         at
>>>> org.wso2.carbon.user.core.common.DefaultRealmService.initializeRealm(DefaultRealmService.java:223)
>>>>         at
>>>> org.wso2.carbon.user.core.common.DefaultRealmService.getTenantUserRealm(DefaultRealmService.java:169)
>>>>         at
>>>> org.wso2.carbon.registry.core.session.UserRegistry.init(UserRegistry.java:267)
>>>>         at
>>>> org.wso2.carbon.registry.core.session.UserRegistry.<init>(UserRegistry.java:227)
>>>>         at
>>>> org.wso2.carbon.registry.core.session.UserRegistry.<init>(UserRegistry.java:206)
>>>>         at
>>>> org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getUserRegistry(EmbeddedRegistryService.java:427)
>>>>         at
>>>> org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getSystemRegistry(EmbeddedRegistryService.java:292)
>>>>         at
>>>> org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getLocalRepository(EmbeddedRegistryService.java:481)
>>>>         at
>>>> org.wso2.carbon.deployment.synchronizer.internal.repository.CarbonRepositoryUtils.getLocalRepository(CarbonRepositoryUtils.java:351)
>>>>         at
>>>> org.wso2.carbon.deployment.synchronizer.internal.repository.CarbonRepositoryUtils.getDeploymentSyncConfigurationFromRegistry(CarbonReposito
>>>> ryUtils.java:257)
>>>>
>>>>
>>>>         at java.lang.Thread.run(Thread.java:662)
>>>> Caused by: java.lang.reflect.InvocationTargetException
>>>>         at
>>>> sun.reflect.GeneratedConstructorAccessor126.newInstance(Unknown Source)
>>>>         at
>>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>>>>         at
>>>> java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>>>>         at
>>>> org.wso2.carbon.user.core.common.DefaultRealm.createObjectWithOptions(DefaultRealm.java:225)
>>>>         ... 25 more
>>>> Caused by: java.lang.RuntimeException: Error in looking up data source:
>>>> Name [jdbc/WSO2UM1] is not bound in this Context. Unable to find [jdbc].
>>>>         at
>>>> org.wso2.carbon.user.core.util.DatabaseUtil.lookupDataSource(DatabaseUtil.java:92)
>>>>         at
>>>> org.wso2.carbon.user.core.util.DatabaseUtil.createUserStoreDataSource(DatabaseUtil.java:99)
>>>>         at
>>>> org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager.loadUserStoreSpacificDataSoruce(JDBCUserStoreManager.java:1885)
>>>>         at
>>>> org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager.<init>(JDBCUserStoreManager.java:165)
>>>>         ... 29 more
>>>> Caused by: javax.naming.NameNotFoundException: Name [jdbc/WSO2UM1] is
>>>> not bound in this Context. Unable to find [jdbc].
>>>>         at
>>>> org.apache.naming.NamingContext.lookup(NamingContext.java:820)
>>>>         at
>>>> org.apache.naming.NamingContext.lookup(NamingContext.java:168)
>>>>         at
>>>> org.wso2.carbon.context.internal.CarbonContextDataHolder$CarbonInitialJNDIContext.lookup(CarbonContextDataHolder.java:1030)
>>>>         at javax.naming.InitialContext.lookup(InitialContext.java:392)
>>>>         at javax.naming.InitialContext.doLookup(InitialContext.java:265)
>>>>         at
>>>> org.wso2.carbon.user.core.util.DatabaseUtil.lookupDataSource(DatabaseUtil.java:90)
>>>>         ... 32 more
>>>> [2013-05-14 15:36:15,181] ERROR - DefaultRealmService Cannot initialize
>>>> the realm.
>>>> org.wso2.carbon.user.core.UserStoreException: Cannot initialize the
>>>> realm.
>>>>         at
>>>> org.wso2.carbon.user.core.common.DefaultRealmService.initializeRealm(DefaultRealmService.java:227)
>>>>         at
>>>> org.wso2.carbon.user.core.common.DefaultRealmService.getTenantUserRealm(DefaultRealmService.java:169)
>>>>         at
>>>> org.wso2.carbon.registry.core.session.UserRegistry.init(UserRegistry.java:267)
>>>>         at
>>>> org.wso2.carbon.registry.core.session.UserRegistry.<init>(UserRegistry.java:227)
>>>>         at
>>>> org.wso2.carbon.registry.core.session.UserRegistry.<init>(UserRegistry.java:206)
>>>>         at
>>>> org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getUserRegistry(EmbeddedRegistryService.java:427)
>>>>         at
>>>> org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getSystemRegistry(EmbeddedRegistryService.java:292)
>>>>         at
>>>> org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getLocalRepository(EmbeddedRegistryService.java:481)
>>>>         at
>>>> org.wso2.carbon.deployment.synchronizer.internal.repository.CarbonRepositoryUtils.getLocalRepository(CarbonRepositoryUtils.java:351)
>>>>         at
>>>> org.wso2.carbon.deployment.synchronizer.internal.repository.CarbonRepositoryUtils.getDeploymentSyncConfigurationFromRegistry(CarbonReposito
>>>> ryUtils.java:257)
>>>>         at
>>>> org.wso2.carbon.deployment.synchronizer.internal.repository.CarbonRepositoryUtils.getActiveSynchronizerConfiguration(CarbonRepositoryUtils.
>>>> java:108)
>>>>         at
>>>> org.wso2.carbon.deployment.synchronizer.internal.DeploymentSynchronizerServiceImpl.commit(DeploymentSynchronizerServiceImpl.java:96)
>>>>         at
>>>> org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.deploymentSyncCommit(CarbonDeploymentSchedulerTask.java:175)
>>>>         at
>>>> org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.run(CarbonDeploymentSchedulerTask.java:116)
>>>>         at
>>>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
>>>>          at
>>>> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>>>>         at
>>>> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>>>>         at
>>>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>>>>         at
>>>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
>>>>         at
>>>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
>>>>         at
>>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
>>>>         at
>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
>>>>         at java.lang.Thread.run(Thread.java:662)
>>>> Caused by: org.wso2.carbon.user.core.UserStoreException: nullType class
>>>> java.lang.reflect.InvocationTargetException
>>>>         at
>>>> org.wso2.carbon.user.core.common.DefaultRealm.createObjectWithOptions(DefaultRealm.java:266)
>>>>         at
>>>> org.wso2.carbon.user.core.common.DefaultRealm.initializeObjects(DefaultRealm.java:147)
>>>>         at
>>>> org.wso2.carbon.user.core.common.DefaultRealm.init(DefaultRealm.java:113)
>>>>         at
>>>> org.wso2.carbon.user.core.common.DefaultRealmService.initializeRealm(DefaultRealmService.java:223)
>>>>
>>>
>>>
>>>
>>> --
>>> mobile: (+94)755906608
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>
>
> --
> -Ratha
> mobile: (+94)755906608
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to