Hi Jorge,

This is a known issue [1]. This happens when the cryptoUtil class checks
the ServerConfigurationService at the server startup. But at the time the
ndatasource core made a call to cryptoUtil class the
ServerConfigurationService is not set in the carbon.core.util osgi bundle.
But that service is received by the ndatasource component before making the
call. This is now fixed and will be available in the next release. At the
moment, the fix is available via wum only for the already released version
(6.4.0). The stackoverflow issue that you have pointed is due to a
different root cause (where the certs has been changed).

[1] https://github.com/wso2/product-ei/issues/2772

Thanks

On Thu, Nov 29, 2018 at 3:17 AM Jorge <[email protected]> wrote:

> Hi all.
> I found this issue while working with the wso2ei  in windows 10 64bit.
> I follow the answer to this question
> https://stackoverflow.com/questions/36846614/external-datasources-not-working-with-secured-wso2-dss-3-2-2
> but with no success after another restart.
>
>
> [2018-11-28 16:38:42,387] [] ERROR - DataSourceRepository Error in
> updating data source [remove:false] at path
> '/repository/components/org.wso2.carbon.ndatasource/postgresqlLocal': Error
> in updating data source 'postgresqlLocal' from registry [remove:false]:
> Error in secure load of data source meta info: An error occurred while
> decrypting data.
> org.wso2.carbon.ndatasource.common.DataSourceException: Error in updating
> data source 'postgresqlLocal' from registry [remove:false]: Error in secure
> load of data source meta info: An error occurred while decrypting data.
>         at
> org.wso2.carbon.ndatasource.core.DataSourceRepository.updateDataSource(DataSourceRepository.java:186)
>         at
> org.wso2.carbon.ndatasource.core.DataSourceRepository.updateAllUserDataSource(DataSourceRepository.java:135)
>         at
> org.wso2.carbon.ndatasource.core.DataSourceRepository.refreshAllUserDataSources(DataSourceRepository.java:115)
>         at
> org.wso2.carbon.ndatasource.core.DataSourceRepository.initRepository(DataSourceRepository.java:92)
>         at
> org.wso2.carbon.ndatasource.core.DataSourceManager.initTenant(DataSourceManager.java:95)
>         at
> org.wso2.carbon.ndatasource.core.internal.DataSourceServiceComponent.initSuperTenantUserDataSources(DataSourceServiceComponent.java:215)
>         at
> org.wso2.carbon.ndatasource.core.internal.DataSourceServiceComponent.checkInitTenantUserDataSources(DataSourceServiceComponent.java:206)
>         at
> org.wso2.carbon.ndatasource.core.internal.DataSourceServiceComponent.setRegistryService(DataSourceServiceComponent.java:157)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:498)
>         at
> org.eclipse.equinox.internal.ds.model.ComponentReference.bind(ComponentReference.java:376)
>         at
> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.bindReference(ServiceComponentProp.java:430)
>         at
> org.eclipse.equinox.internal.ds.InstanceProcess.dynamicBind(InstanceProcess.java:416)
>         at
> org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:334)
>         at
> org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
>         at
> org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
>         at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
>         at
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
>         at
> org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
>         at
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
>         at
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
>         at
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
>         at
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
>         at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
>         at
> org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.activate(RegistryCoreServiceComponent.java:133)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:498)
>         at
> org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260)
>         at
> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
>         at
> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345)
>         at
> org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
>         at
> org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
>         at
> org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
>         at
> org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
>         at
> org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
>         at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
>         at
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
>         at
> org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
>         at
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
>         at
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
>         at
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
>         at
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
>         at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
>         at
> org.wso2.carbon.user.core.internal.Activator.startDeploy(Activator.java:73)
>         at
> org.wso2.carbon.user.core.internal.BundleCheckActivator.start(BundleCheckActivator.java:61)
>         at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
>         at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
>         at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
>         at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)
>         at
> org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)
>         at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
>         at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
>         at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
>         at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
>         at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
>         at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
>         at
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
>         at
> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
> Caused by: org.wso2.carbon.ndatasource.common.DataSourceException: Error
> in secure load of data source meta info: An error occurred while decrypting
> data.
>         at
> org.wso2.carbon.ndatasource.core.utils.DataSourceUtils.secureResolveDocument(DataSourceUtils.java:244)
>         at
> org.wso2.carbon.ndatasource.core.DataSourceRepository.getDataSourceMetaInfoFromRegistryPath(DataSourceRepository.java:421)
>         at
> org.wso2.carbon.ndatasource.core.DataSourceRepository.updateDataSource(DataSourceRepository.java:164)
>         ... 63 more
> Caused by: org.wso2.carbon.core.util.CryptoException: An error occurred
> while decrypting data.
>         at
> org.wso2.carbon.core.util.CryptoUtil.decrypt(CryptoUtil.java:265)
>         at
> org.wso2.carbon.core.util.CryptoUtil.base64DecodeAndDecrypt(CryptoUtil.java:329)
>         at
> org.wso2.carbon.ndatasource.core.utils.DataSourceUtils.secureLoadElement(DataSourceUtils.java:197)
>         at
> org.wso2.carbon.ndatasource.core.utils.DataSourceUtils.secureLoadElement(DataSourceUtils.java:210)
>         at
> org.wso2.carbon.ndatasource.core.utils.DataSourceUtils.secureLoadElement(DataSourceUtils.java:210)
>         at
> org.wso2.carbon.ndatasource.core.utils.DataSourceUtils.secureLoadElement(DataSourceUtils.java:210)
>         at
> org.wso2.carbon.ndatasource.core.utils.DataSourceUtils.secureResolveDocument(DataSourceUtils.java:242)
>         ... 65 more
> Caused by: org.wso2.carbon.core.util.CryptoException: A crypto service
> implementation has not been registered.
>         at
> org.wso2.carbon.core.util.CryptoUtil.decrypt(CryptoUtil.java:231)
>         ... 71 more
>
>
> Any idea?
>
>
> Regards,
>                Jorge.
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>


-- 

*Chanika Geeganage* | Associate Technical Lead | WSO2 Inc.

(m) +94-77-3522586 | (e) [email protected]

<https://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to