Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

unable to build #16

Closed
panwarab opened this issue Jun 29, 2019 · 13 comments
Closed

unable to build #16

panwarab opened this issue Jun 29, 2019 · 13 comments

Comments

@panwarab
Copy link

panwarab commented Jun 29, 2019

getting following error while running task runConsumer

Exception in thread "main" java.lang.ExceptionInInitializerError
        at com.gojek.beast.com.gojek.beast.protomapping.ProtoUpdateListener.createStencilClient(ProtoUpdateListener.java:49)
        at com.gojek.beast.com.gojek.beast.protomapping.ProtoUpdateListener.<init>(ProtoUpdateListener.java:34)
        at com.gojek.beast.factory.BeastFactory.<init>(BeastFactory.java:76)
        at com.gojek.beast.launch.Main.main(Main.java:26)
' to java.lang.BooleannsupportedOperationException: Cannot convert 'false
        at org.aeonbits.owner.Util.unsupported(Util.java:128)
        at org.aeonbits.owner.Converters.unsupportedConversion(Converters.java:276)
        at org.aeonbits.owner.Converters.access$200(Converters.java:42)
        at org.aeonbits.owner.Converters$4.tryConvert(Converters.java:160)
        at org.aeonbits.owner.Converters.doConvert(Converters.java:268)
        at org.aeonbits.owner.Converters.convert(Converters.java:263)
        at org.aeonbits.owner.PropertiesInvocationHandler.resolveProperty(PropertiesInvocationHandler.java:87)
        at org.aeonbits.owner.PropertiesInvocationHandler.invoke(PropertiesInvocationHandler.java:67)
        at com.sun.proxy.$Proxy5.isStatsdEnabled(Unknown Source)
        at com.gojek.beast.stats.Stats.<init>(Stats.java:24)
        at com.gojek.beast.stats.Stats.<clinit>(Stats.java:16)
        ... 4 more
Caused by: java.lang.IllegalArgumentException: false
        at java.desktop/com.sun.beans.editors.BooleanEditor.setAsText(BooleanEditor.java:59)
        at org.aeonbits.owner.Converters$4.tryConvert(Converters.java:157)
        ... 11 more

@devdinu
Copy link
Contributor

devdinu commented Jun 30, 2019

There's some boolean configuration value which you've misconfigured (probably something you've overridden). set ENABLE_AUTO_SCHEMA_UPDATE to "false",

Also share more context,

  1. Whether you're using kubernetes/local/vm.
  2. What platform you're running
  3. The config file.
  4. command you used to run & more stacktrace.

@panwarab
Copy link
Author

panwarab commented Jun 30, 2019

ENABLE_AUTO_SCHEMA_UPDATE is false already in the .properties file

  1. local
  2. windows-10, java version 11, gradle 5.5
  3. sample.properties is same as it came in the build. is there any other branch that I should build from?
  4. export $(cat ./env/sample.properties | xargs -L1) && gradle clean runConsumer

@panwarab
Copy link
Author

seems like there is an issue with conversion library aeon bits as it says in the stack trace ' to java.lang.BooleannsupportedOperationException: Cannot convert 'false It is difficult to read it because it might have gotten truncated.

@mauliksoneji
Copy link
Contributor

mauliksoneji commented Jul 1, 2019

@abhiroj, there are few things that you need to change in your configuration, for example:

STENCIL_URL=http://stencil-url
PROTO_SCHEMA=com.gojek.esb.your.proto

These need to be changed with your own values. Directly using the sample.properties file would not work for these properties.
Here STENCIL_URL is a url where your protobuf descriptors are stored.
Also, PROTO_SCHEMA is the name of the protobuf that you want to use for your parsing the kafka messages

@panwarab
Copy link
Author

panwarab commented Jul 1, 2019

okay, how to setup one? I am new to protobuf libs so if you can provide me with some headsup , that would really help. :)

@mauliksoneji
Copy link
Contributor

Create a new repository which contains all your protos in src/main/proto folder like this one: https://github.com/nnadeau/robot-communication-packet-proto/tree/master/src/main/proto

This repository should not contain any other thing apart from proto files.

Also in your build.gradle you have to use protobuf-plugin that converts these proto files to Java classes.
Example of that is in beast repo itself: https://github.com/gojek/beast/blob/master/build.gradle#L15

After this create a jar, and then host it on artifactory, maybe public maven or a privately hosted one.
Use this url as STENCIL_URL config.

@irfn
Copy link

irfn commented Jul 3, 2019

This info can also resolve #17 & #14

@panwarab
Copy link
Author

Hi, I was a little caught up. I have created a proto message for kafka. https://github.com/abhiroj/beast-proto , can you guys please review it? It is very basic in nature as I am just getting started with protobuf.

@mauliksoneji
Copy link
Contributor

Yup this looks great

@mauliksoneji
Copy link
Contributor

The next step would be to push this to public maven/artifactory and use the url for the same as the Stencil URL in the configuration

@panwarab
Copy link
Author

panwarab commented Jul 31, 2019

Hey @mauliksoneji , I tried looking for the steps but to no avail. can you refer me some doc that you follow/followed before? that would be of great help.

@devdinu
Copy link
Contributor

devdinu commented Aug 2, 2019

@abhiroj Added doc for running stencil server, this run local python server with the built descriptor src/test/*.proto.

Also closing this issue, assuming you're able to build the project. Please do open an issue if there's anything specific.

@devdinu devdinu closed this as completed Aug 2, 2019
@mauliksoneji
Copy link
Contributor

@abhiroj with this you would be able to run it locally right? You only require bigquery credentials and need to setup a bigquery table. Then you can start running beast

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants