question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Issue] ERROR n.c.k.l.i.ProtobufLoadGenerator: Please make sure that properties data type and expression function return type are compatible with each other

See original GitHub issue

What happened?

Hi

I am getting error from “ProtobufLoadGenerator”, it is unable to load or create “Address” type or values into jmeter. Here is the edited snippet of contract:

message Order {

int32 order_id = 1; .demo.Order.CustomerAccount customer_account = 3;

message Address { string address_line_one = 2; }

message CustomerAccount { .demo.Order.CustomerAccount.BillingParty billing_party = 1;

message BillingParty {
  string party_id = 3;
  .demo.Order.Address party_address = 4;
}

} }

I have “Address” in “Order” but there is no variable for that. “Address” is being using in another Message.

Jmeter is unable to load structure properly for this scenario image

KloadGen Version

KLoadGen 4.12.2

Relevant log output

2022-11-15 15:35:45,500 ERROR n.c.k.l.i.ProtobufLoadGenerator: Please make sure that properties data type and expression function return type are compatible with each other
com.google.protobuf.Descriptors$DescriptorValidationException: demo.Order.CustomerAccount.BillingParty.party_address: ".demo.Order.Address" is not defined.
	at com.google.protobuf.Descriptors$DescriptorPool.lookupSymbol(Descriptors.java:2465) ~[kloadgen-4.12.2.jar:?]
	at com.google.protobuf.Descriptors$FieldDescriptor.crossLink(Descriptors.java:1480) ~[kloadgen-4.12.2.jar:?]
	at com.google.protobuf.Descriptors$FieldDescriptor.access$1000(Descriptors.java:991) ~[kloadgen-4.12.2.jar:?]
	at com.google.protobuf.Descriptors$Descriptor.crossLink(Descriptors.java:954) ~[kloadgen-4.12.2.jar:?]

Have you added your JMX Testplan or a replica?

  • I have added a JMX testplan

Have you added your Schema or a replica?

  • I have added the Schema

Issue Analytics

  • State:open
  • Created 10 months ago
  • Reactions:1
  • Comments:22

github_iconTop GitHub Comments

1reaction
venkataklagisettycommented, Dec 15, 2022

@mseijasm Latest code fixed the problem but it failed for another field when evolved the schema. I just added one “repeated” element to schema ,then it failed. Please find below latest schema and error

syntax = "proto3";
package demo;

option java_package = "com.demo.order.proto";
option java_outer_classname = "DemoOrder";
option java_multiple_files = true;

message Order {
  int32 order_id = 1;
  string order_number = 2;
  .demo.Order.CustomerAccount customer_account = 3;
  .demo.Order.Details details = 4;

  message CustomerAccount {
    .demo.Order.CustomerAccount.BillingParty billing_party = 1;
  
    message BillingParty {
      string party_id = 1;
      .demo.Order.Address address = 2;
      repeated .demo.Order.Contact party_contact = 3;
    }
  }
  message Address {
    string address_line_one = 1;
    string address_line_two = 2;
  }
  message Contact {
    int32 contact_id = 1;
    string contact_name = 2;
  }
  message Details {
    .demo.Order.Details.InDetails in_details = 1;
  
    message InDetails {
      .demo.Order.Details.InDetails.CustomsDetails customs_details = 1;
    
      message CustomsDetails {
        .demo.Order.Details.InDetails.CustomsDetails.Party party = 1;
      
        message Party {
          .demo.Order.Address party_address = 1;
          repeated .demo.Order.Contact party_contact = 2;
          repeated .demo.Order.Contact p_contact = 3;
        }
      }
    }
  }
}

com.google.protobuf.Descriptors$DescriptorValidationException: demo.Order.Details.InDetails.CustomsDetails.Party.Contact.contact_id: “contact_id” is already defined in “demo.Order.Details.InDetails.CustomsDetails.Party.Contact”.

image

1reaction
venkataklagisettycommented, Dec 12, 2022

Hi @mseijasm Latest code resolved “repeated” error , but we evolved our schema and getting “Address” error again at different nested level. Please take a look and resolve it to work at all nested levels. Also please take care same issue for “repeated” elements

Please find below Evolved (updated) proto and Error screenshot

syntax = "proto3";
package demo;

option java_package = "com.demo.order.proto";
option java_outer_classname = "DemoOrder";
option java_multiple_files = true;

message Order {
  int32 order_id = 1;
  string order_number = 2;
  .demo.Order.CustomerAccount customer_account = 3;
  .demo.Order.Details details = 4;

  message CustomerAccount {
    .demo.Order.CustomerAccount.BillingParty billing_party = 1;
  
    message BillingParty {
      string party_id = 1;
      .demo.Order.Address address = 2;
      repeated .demo.Order.Contact party_contact = 3;
    }
  }
  message Address {
    string address_line_one = 1;
    string address_line_two = 2;
  }
  message Contact {
    int32 contact_id = 1;
    string contact_name = 2;
  }
  message Details {
    .demo.Order.Details.InDetails in_details = 1;
  
    message InDetails {
      .demo.Order.Details.InDetails.CustomsDetails customs_details = 1;
    
      message CustomsDetails {
        .demo.Order.Details.InDetails.CustomsDetails.Party party = 1;

        message Party {
          .demo.Order.Address party_address = 1;
          repeated .demo.Order.Contact party_contact = 2;
        }
      }      
    }
  }
}

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · corunet/kloadgen - GitHub
[Issue] ERROR n.c.k.l.i.ProtobufLoadGenerator: Please make sure that properties data type and expression function return type are compatible with each other ...
Read more >
kloadgen - bytemeta
[Issue] ERROR n.c.k.l.i.ProtobufLoadGenerator: Please make sure that properties data type and expression function return type are compatible with each other.
Read more >
Cannot find module 'node:path' - Marklawlor/Nativewind
[Issue] ERROR n.c.k.l.i.ProtobufLoadGenerator: Please make sure that properties data type and expression function return type are compatible with each other, 11 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found