Skip to content

Give file URI using HTTP #80

@BuddhiWathsala

Description

@BuddhiWathsala

Description:
I was trying to have $subject use case in a Siddhi app as follows.

@source(type='file', file.uri='https://raw.githubusercontent.com/BuddhiWathsala/nats-demo-csv/master/stops.csv', @map(type="csv"))
define stream InputRouteStream1(routeNo string);

But it gives the following error log and it did not work as expected.

Exception in thread "Siddhi-1.LoadBusTimeTableSchedule-executor-thread-0" java.lang.NoClassDefFoundError: org/apache/commons/httpclient/util/URIUtil
	at org.apache.commons.vfs2.provider.URLFileName.getPathQueryEncoded(URLFileName.java:76)
	at org.apache.commons.vfs2.provider.URLFileName.getURIEncoded(URLFileName.java:133)
	at org.apache.commons.vfs2.provider.url.UrlFileObject.createURL(UrlFileObject.java:65)
	at org.apache.commons.vfs2.provider.url.UrlFileObject.doAttach(UrlFileObject.java:56)
	at org.apache.commons.vfs2.provider.AbstractFileObject.attach(AbstractFileObject.java:156)
	at org.apache.commons.vfs2.provider.AbstractFileObject.getContent(AbstractFileObject.java:1065)
	at org.wso2.transport.file.connector.server.FileConsumer.<init>(FileConsumer.java:96)
	at org.wso2.transport.file.connector.server.FileServerConnector.start(FileServerConnector.java:63)
	at io.siddhi.extension.io.file.FileSource.lambda$deployServers$6(FileSource.java:631)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.httpclient.util.URIUtil cannot be found by siddhi-io-file_2.0.5
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:448)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:361)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:353)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 12 more

Any idea or suggestion on how to address this use case?

Suggested Labels:
Type improvement

Affected Product Version:
Siddhi tooling 5.1.2
Siddhi io file 2.0.5

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions