Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Siddhi Runner] -Dapps and -Dconfig fails with relative paths #338

Closed
pcnfernando opened this issue Aug 27, 2019 · 1 comment · Fixed by #543 or wso2/carbon-config#79
Closed

[Siddhi Runner] -Dapps and -Dconfig fails with relative paths #338

pcnfernando opened this issue Aug 27, 2019 · 1 comment · Fixed by #543 or wso2/carbon-config#79
Assignees

Comments

@pcnfernando
Copy link
Contributor

pcnfernando commented Aug 27, 2019

Description:
When we use relative paths as values for -Dapps/-Dconfig system arguments while starting Siddhi Runner, the corresponding functionalities fail.

Affected Product Version:
Siddhi Runner 5.1.0-m2

Steps to reproduce:

  • Copy a Sample Siddhi file(SampleApp.siddhi) into SIDDHI_RUNNER_HOME/wso2 directory.
  • Go to SIDDHI_RUNNER_HOME/bin directory and execute the following command.
    ./runner.sh -Dapps=../wso2/SampleApp.siddhi
@BuddhiWathsala
Copy link
Contributor

When I run config changes locally using -Dconfig=./configurations.yaml it gives the following error. Moreover, when I run this config change in docker level, even when I gave the absolute path using Env -Dconfig=$HOME/configurations.yaml it gave the same error.

[2019-09-09 05:56:49,474] ERROR {org.eclipse.equinox.ds} - [SCR] Exception while activating instance org.wso2.msf4j.analytics.internal.AnalyticsSC@4e25147a of component org.wso2.msf4j.analytics.httpmonitoringsc  java.lang.reflect.InvocationTargetException
        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:235)
        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:109)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:915)
        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:862)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:482)
        at org.eclipse.equinox.internal.simpleconfigurator.Activator.start(Activator.java:66)
        at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:774)
        at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:767)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:724)
        at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:932)
        at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:309)
        at org.eclipse.osgi.container.Module.doStart(Module.java:581)
        at org.eclipse.osgi.container.Module.start(Module.java:449)
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383)
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:402)
        at org.wso2.carbon.launcher.CarbonServer.loadInitialBundles(CarbonServer.java:242)
        at org.wso2.carbon.launcher.CarbonServer.start(CarbonServer.java:83)
        at org.wso2.carbon.launcher.Main.main(Main.java:84)
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Map
        at org.wso2.carbon.config.reader.YmlMerger.mergeYamlContents(YmlMerger.java:76)
        at org.wso2.carbon.config.reader.YmlMerger.mergeToString(YmlMerger.java:162)
        at org.wso2.carbon.config.reader.ConfigFileReader.getFileContent(ConfigFileReader.java:91)
        at org.wso2.carbon.config.reader.YAMLBasedConfigFileReader.getDeploymentConfiguration(YAMLBasedConfigFileReader.java:37)
        at org.wso2.carbon.config.provider.ConfigProviderImpl.loadDeploymentConfiguration(ConfigProviderImpl.java:660)
        at org.wso2.carbon.config.provider.ConfigProviderImpl.getConfigurationObject(ConfigProviderImpl.java:113)
        at org.wso2.msf4j.analytics.httpmonitoring.config.HTTPMonitoringConfigBuilder.build(HTTPMonitoringConfigBuilder.java:35)
        at org.wso2.msf4j.analytics.httpmonitoring.HTTPMonitoringInterceptor.<init>(HTTPMonitoringInterceptor.java:54)
        at org.wso2.msf4j.analytics.internal.AnalyticsSC.activate(AnalyticsSC.java:60)
        ... 36 more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
2 participants