289 questions
0
votes
0
answers
17
views
Google Protobuf in message add array of values, one string and array of objects
In good protobuf, i want to create json like below. how can i acheive that?
{
Action:"Add"
"Row":[{
{
"value": "29170944"
},
{
"value":[{...
0
votes
0
answers
23
views
Need to use protbuf-java and protobuf-javalite at the same time
I'm currently creating an app with Unity, and I found the following errors while creating it.
Execution failed for task ':launcher:checkReleaseDuplicateClasses'.
A failure occurred while executing ...
0
votes
0
answers
43
views
Json Parser for Protobuf Java Lite
I have recently moved from protobuf-java to protobuf-java-lite, since I faced Duplicate Class Exception beacuse a library I am using uses protobuf-java-lite and I am using protobuf-java. A major ...
0
votes
0
answers
45
views
How can I use a self-defined RDF compression format, such as Protobuf, in my project?
Working with RDF Streams in Apache Jena: "If you want to use an alternative compression format you can do so by adding suitable dependencies into your project and passing an appropriate ...
0
votes
1
answer
96
views
Encountered UNKNOWN_MEMBER_ID from HEARTBEAT response - Kafka
I have created ProtoBuf file and using object file generated via protoc command in my code i.e.
MyEvent.java
MyEventOrBuilder.java
MyEventProtos.java
I am using Apache Kafka (Confluent) to handle the ...
0
votes
0
answers
24
views
Spring KafkaTemplate is setting some fields as blank after serialization
I have the following code snippet that should publish a message to kafka topic:
@SneakyThrows
public void publish(TransactionWebhookEvent event) {
val payload = printer()....
0
votes
1
answer
65
views
List of protobuf messages to JSON array
I have a protobuf message definition like this:
message MyThing {
string foo = 1;
int32 bar = 2;
}
And a Java/Kotlin API that returns a List<MyThing>
I need to format this as a JSON string, ...
1
vote
1
answer
113
views
Invalid wrapper type: google.protobuf.StringValue
I was using your demo project: https://github.com/wiremock/wiremock-grpc-demos
syntax = "proto3";
option csharp_namespace = "My.Package";
option java_package = "com.my....
0
votes
1
answer
38
views
How to migrate to Gradle kts prototbuf configuration in my Android application build file
I am migrating to Gradle kts in my current Andriod application.
The protobuf configuration is proving to be very challenging
the original verson for gradle is as follows:-
// Versions
def ...
0
votes
1
answer
158
views
oneOf in protobuf descriptor due to optional fields
I have encountered strange protobuf-java behavior.
If I have a message with optional fields
message SearchRequest {
optional string query = 1;
optional int32 page_number = 2;
optional int32 ...
0
votes
2
answers
156
views
The descriptor for message type .google.protobuf.Timestamp cannot be found and a placeholder is created for it
I'm getting the above warning while executing tests. It seems that it doesn't affect anything and the tests are executed successfully. Any Idea why I'm seeing this warning?
0
votes
1
answer
66
views
Skip Proto file Binding classes generation if already present in AAR file or any other source
I have one AAR file added inside the libs directory in Android Studio project. I have added a proto compiler configurations inside the build.gradle file. I am trying to add a proto file inside the app ...
0
votes
0
answers
188
views
Working with protobuf , i am facing this issue mvn protobuf:compile-custom goal
[ERROR] Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.6.1:compile-custom (default) on project automation-utility: protoc did not exit cleanly. Review output for more ...
0
votes
1
answer
42
views
How to marshall ? And ZonedDateTime in protostream 4.4.3java8
I have
class P{
@ProtoField(number=1, CollectionImplementation=ArrayList.class)
List<? extends Account> accounts;
@ProtoField(number=2)
ZonedDateTime fromDate;
@ProtoFactory
P(List<? extends ...
0
votes
1
answer
138
views
Not able to decode standard protobuf encoded data to Avro POJO using Avro ProtobufDatumReader
I am trying to decode the protobuf encoded data in Java, with the objective to serialize it into the Avro POJO.
Testing it out with simple protobuf (Sample.proto):
syntax = "proto3";
option ...
1
vote
1
answer
704
views
Which one should i use in protobuf? oneof, Any, Map?
I have a .proto, there is one message in it named Event.
message Event{
string id=1;
string param=2;
}
The param field of Event is a model defined by biz layer, different biz has different ...
0
votes
0
answers
213
views
Cannot resolve method 'merge(String, Builder)' on JsonFormat after upgrading protobuf-java-util from 3.25.3 -> 4.26.0
We are currently using the following Maven dependency:
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</...
0
votes
0
answers
50
views
GCP Pubsub - protobuf message - Timestamp - Read issue
This is regarding GCP Pubsub and reading protobuf messasge from subscribed topic.
Problem: What we observed that GCP's Unary Pull Java API not able to read messages (especially which has protobuf....
0
votes
0
answers
32
views
Could not initialize class org.apache.pulsar.jetty.tls.JettySslContextFactory
Could not initialize class org.apache.pulsar.jetty.tls.JettySslContextFactory
<pulsar-client.version>2.10.1</pulsar-client.version>
<dependency>
<groupId>com.google.protobuf<...
1
vote
0
answers
37
views
Why does the text field of DialogFlow's ResponseMessage contain a string array?
In the example from Google's documentation, we see that the text responses from a detectIntent call are in the following format:
{
"responseId": "38e8f23d-eed2-445e-a3e7-149b242dd669&...
0
votes
1
answer
238
views
Java protobuf serialization as empty byte array
I have a simple proto like this (I cannot edit this file, please don't ask why):
syntax = "proto3";
package abc;
message Status {
StatusCodeType statusCode = 1;
enum StatusCodeType {
...
0
votes
1
answer
166
views
Grpc file is missing when using protoc to generate code
I'm learning grpc. This is a simple hello world example:
syntax = "proto3";
option java_multiple_files = true;
option java_package = "io.grpc.helloworld";
option ...
0
votes
0
answers
184
views
Cannot deserialize protobuf
I am having trouble de-serializing a protobuf. I am confident that it is serialized properly, as serialization works in all other cases.
Here's a simplified proto file:
syntax = "proto3";
...
-1
votes
1
answer
411
views
how to map Object type variable of java in protobuf 3 for grpc
I have class with below properties in my service, I want to create a grpc service for this. but i am not able to find how can i map Object data in protobuf.
public class FeatureDetails {
private ...
1
vote
2
answers
585
views
Using protobuf-java in GraalVM native image
Trying to convert existing Spring Boot micro-service to run on GraalVM native image came across an issue with protobuf generated classed with protobuf-java.
Generated classes use reflection and need ...
1
vote
0
answers
330
views
Convert Json to protobuf DynamicMessage fails to convert unix timestamp dates
I'm trying to dynamically convert a JSON string to a DynamicMessage from the protobuf library.
Currently, I have the following piece of code:
val topic = "sample-topic"
// I'm using ...
1
vote
1
answer
6k
views
In Protobuf, are double or float types fixed size when serialized?
Are 'double' and 'float' data types fixed size in Protobuf? Do they occupy a fixed number of bytes (say 8 or 4 bytes) when serialized no matter what value (big or small) they actually keep? I want to ...
0
votes
1
answer
83
views
De/Serialzing custom java types with protobuf in java [duplicate]
protocul buffer supports only a close set of types, like int32, strings, repeted, etc.
The problem is that I want to create a custom deserializer for specific things. For example, look at this proto ...
0
votes
0
answers
365
views
Android proto import files
I am making a Flutter android application which uses photo files. First I had all definitions based in one .proto file. But now I had to split the definitions onto multiple files.
With one file my ...
0
votes
2
answers
97
views
Do we have Future Datatype in Protobuf
I am exploring on grpc
My sample application fetches few records from Database + reads a file from S3(very small file) and returns the combined result.
Since the file size is very less, i am not using ...
4
votes
1
answer
485
views
Does Protobuf JavaLite support google.protobuf.Struct / google.protobuf.Value?
Here is the proto message that we trying to send.
message Cta {
string title = 1;
string pid = 2;
google.protobuf.Struct params = 3;
}
Does protobuf-lite library which is recommended for ...
0
votes
1
answer
1k
views
Packing map<string, string> type into google.protobuf.Any
I'm struggling with packing a protobuf map type into google.protobuf.Any in Java. The proto message I'm working with has the following schema:
message Msg {
google.protobuf.Any value = 1;
}
For ...
1
vote
0
answers
55
views
Import was not found or had errors
I was executing the following command.
mvn clean package -DskipTests -Dcheckstyle.skip -Pbackends-velox -Dbuild_protobuf=OFF -Dbuild_cpp=ON -Dbuild_velox=On -Dvelox_home=${VELOX_HOME} -Dbuild_arrow=...
0
votes
3
answers
1k
views
How can I solve "Type com.google.protobuf.Any$1 is defined multiple times" problem on Android Studio
I am upgrading my Android app to support API 33.
For that, I also upgraded protobuf & grpc libraries.
Everything is upgraded and the app works if I build & run it directly from Android Studio ...
0
votes
1
answer
899
views
Proto buffer backward compatibility issue when field name is changed from capital to small
In current version of protobuff my oneoff looks something like below :
oneof oneof_abc {
double Value = 1;
}
But in updated version it looks like :
oneof oneof_abc {
double value = 1;
}
If you ...
18
votes
3
answers
6k
views
Proto datastore jetpack compose - gradle dependencies exception
I followed this codelab from the android developer platform: https://developer.android.com/codelabs/android-proto-datastore#4
Added the same exact dependencies as shown in the codelab and I get the ...
0
votes
1
answer
1k
views
Allow Protobuf message to set null value
I am wondering if it would be possible to detect a protobuf value being set to null rather than just not set at all. For example if we have:
message MyRequest {
oneof my_value_case {
...
0
votes
0
answers
62
views
Executing eclipse plug-in with maven
I am working on a protobuf plugin project where I have a bundle of protobuf dependencies imported as a plug-in dependency to my protobuf plugin.
One of the dependencies is the protoc-jar-maven-plugin ...
0
votes
1
answer
170
views
Protobuf deserialization speed up via hiding extra fields
Not too familiar with protobuf's implementation in java so I'm not certain if this will yield any benefits, but here is a thought I had.
Say for a large pb struct that looks like the following:
...
11
votes
2
answers
5k
views
Issue on R8 minify
I installed the new version of Android Studio and did update of my project (without changing dependencies) and i had this issue:
Missing class com.google.protobuf....
1
vote
1
answer
1k
views
How to hook into protobuf java code generation?
Is there any way to hook into the generation of java classes when invoking protoc? I know there are plugins which can be created for protoc but as far as I understood it is only possible to generate ...
1
vote
1
answer
84
views
How to do snapshot testing using protobuf3 text messages? [closed]
Can someone let me know if there is any library or extension available for doing snapshot testing using protobuf text messages?
Something similar to what the below libraries do
json-snapshot
jest ...
1
vote
1
answer
1k
views
Dynamic nested message types in protobuf
I have a use case where the incoming payload follows a top level schema and a nested schema. There can be 4 types of top level schema and infinite types of nested schema. I want to define my top level ...
0
votes
1
answer
995
views
protoc-jar-maven-plugin unable to find dependent proto files in the same directory
I have a directory that stores all of my proto files at ${basedir}/resources/proto/, there is a file a.proto in which imports another proto file via resources/proto/b.proto. I tried the following ...
0
votes
1
answer
789
views
Register dynamic protobuf schemas in kafka schema registry generally
I implemented many pipelines that produce proto typed data to kafka. I want to see if there is a general way to register every proto file that uses different schema with the same function without ...
2
votes
0
answers
421
views
how to integrate sentencepiece, protobuf into existing android project correctly
I am trying to integrate pytorch model to process language. This is why I need the sentencepiece to tokenize the sentence chunks. But I am unable to do that correctly.
I did not find any robust ...
1
vote
1
answer
227
views
Unable to use ProtobufUtil converting json to Protobuf
I am trying to convert json to protobuf and trying to use [Protubuf utility][1] mentioned here. When I run this under main method, then it works perfectly fine. However, if I am using this in a ...
1
vote
2
answers
3k
views
Convert Protobuf to Json without Quotes
ad_group {
resource_name: "customers/8776659915/adGroups/143689544046"
status: ENABLED
type: VIDEO_TRUE_VIEW_IN_STREAM
id: 143689544046
name: "Video Consideration - 2023-01-06&...
0
votes
0
answers
506
views
Kafka sink connector Error Executing stage 'TASK_PUT'
Hi guys i am writing a sink connector to push data from a protobuf topic to database.
The connector status seems running but when checking logs i see the following error and no data is pushed to the ...
1
vote
0
answers
513
views
Generating HTTP REST API endpoint from existing grpc .proto file with streaming
I have an existing java grpc server file that is generated from a .proto file. I need to add HTTP REST API endpoints for each of the rpc calls in my .proto file. Probably using google.api.http.
The ....