siddhi-io/siddhi-map-protobuf

Class parameter error

Closed this issue · 12 comments

Using
Siddhi-map-protobuf version 1.0.2
siddhi-io-nats - 2.0.7
siddhi-tooling - 5.0.1
am trying to converts protobuf messages which are received from nats to siddhi events, also adding protobuf generated to siddhi-tooling/bin/bootstrap
am getting an error saying "Provided class name cannot be found by siddhi-map-protobuf_1.0.2.
Am not getting what else i need to add or where else i need to add generated protobuf files.
Any help which fix this issue will be very greatful for my further development
Attaching screen shot of the same.
Screenshot from 2019-11-06 12-36-25

am trying to converts protobuf messages which are received from nats to siddhi events, also adding protobuf generated to siddhi-tooling/bin/bootstrap

@rushilV you should add your protobuf generated JAR into siddhi-tooling/jars directory. Not for the siddhi-tooling/bin/bootstrap. That should resolve the issue.

@BuddhiWathsala i just added protobuf generated jar file into jars folder but still same error is coming
attaching the screen shot of jar folder in that Molefraction.jar is my protobuf generated jar file

Screenshot from 2019-11-07 11-34-11
Screenshot from 2019-11-07 11-34-00

Also there is an error while siddhi tooling is initiated you can see that in the below image
Screenshot from 2019-11-07 11-40-54

@rushilV that is a negligible error. Let say you give a directory called siddhi-apps to deploy in a siddhi-runner. Then siddhi-runner goes through each and every file and filters out all the files that have the file extension .siddhi and deploy.

However, there can be other files in that directory that does not have .siddhi file extension. When it encounter a file without .siddhi extension, just log that error and proceed. The error you have got is that. Thus, you don't have to worry about that.

But still am seeing invalid class name error

@rushilV can you share the artifacts and your Siddhi app to reproduce this issue?.

@BuddhiWathsala there was a problem in the generated protobuf java out causing the issue

@BuddhiWathsala my protobuf file as repeated fields the outputStream which is publishing to the nats destination needs to push in the form of array, i know siddhi supports "list" but am not able to create one am not able to find examples of such kind can you tell how to achieve this
message output
{
repeated value1;
repeated value2
}
the ouput stream is of type Nats which maps to protobuf

@rushilV actually it was a bug and in protobuf level, siddhi-map-protobuf does not support for the list datatype. We found the bug and we currently working on this issue. I think we can release this feature ASAP.

@BuddhiWathsala thanks for the update, also just small info how to use list without protobuf, how can i collect my incoming data to list any example will be helpful

@BuddhiWathsala one of my application using siddhi involves converting columns of table to a list
for example if my table have column DoubleValue and column Floatvalue can we able to store all the column DoubleValue to one list and Floatvalue to other and push out of the stream as a single object ?

@rushilV you can achieve it as follows:

  1. First, you can filter out data from you table using siddhi-store-rdbms https://siddhi-io.github.io/siddhi-store-rdbms/api/7.0.2/#query-stream-processor
  2. Then you can use this list:create() function to create two lists accordingly.

We have fixed the list issue that you had in protobuf and it will be released on our next release on 21st November 2019.

And FYI, since this issue moves through various dimensions like protobuf, lists, and RDBMS, you can use separate repos to arise these issues or simply you can use our slack channel to arise these help questions.