.google.type.LatLng" is not defined

Hello,

How are the googleapis protobuf’s registered in the schema register? I have the following proto:

syntax = "proto3";

package some.package ;

option go_package = "geographyv1beta1";
option java_multiple_files = true;
option java_outer_classname = "GeographyProto";
option java_package = "some.package..geography.v1beta1";

import "google/protobuf/wrappers.proto";
import "google/type/latlng.proto";

message GeodeticPosition {
  google.type.LatLng lat_long = 1;
  google.protobuf.DoubleValue altitude = 2;
}

I have a kafka producer using io.confluent.kafka.serializers.protobuf.KafkaProtobufSerializer to serial the protobuf and write to a topic. This works fine.

When using a Kafka Connect Sink to read from the topic I’m getting the following error:

caused by: com.google.protobuf.Descriptors$DescriptorValidationException: some.package..geography.v1beta1.GeodeticPosition.lat_long: ".google.type.LatLng" is not defined.
	at com.google.protobuf.Descriptors$DescriptorPool.lookupSymbol(Descriptors.java:2389)
	at com.google.protobuf.Descriptors$FieldDescriptor.crossLink(Descriptors.java:1401)
	at com.google.protobuf.Descriptors$FieldDescriptor.access$1000(Descriptors.java:949)
	at com.google.protobuf.Descriptors$Descriptor.crossLink(Descriptors.java:912)
	at com.google.protobuf.Descriptors$Descriptor.access$800(Descriptors.java:629)
	at com.google.protobuf.Descriptors$FileDescriptor.crossLink(Descriptors.java:581)
	at com.google.protobuf.Descriptors$FileDescriptor.buildFrom(Descriptors.java:313)
	at com.google.protobuf.Descriptors$FileDescriptor.buildFrom(Descriptors.java:282)
	at io.confluent.kafka.schemaregistry.protobuf.dynamic.DynamicSchema.init(DynamicSchema.java:283)
	at io.confluent.kafka.schemaregistry.protobuf.dynamic.DynamicSchema.<init>(DynamicSchema.java:217)
	at io.confluent.kafka.schemaregistry.protobuf.dynamic.DynamicSchema.<init>(DynamicSchema.java:48)
	at io.confluent.kafka.schemaregistry.protobuf.dynamic.DynamicSchema$Builder.build(DynamicSchema.java:374)
	at io.confluent.kafka.schemaregistry.protobuf.ProtobufSchema.toDynamicSchema(ProtobufSchema.java:709)

Any help with this would be appreciated.
thx

The import seems correct, as it’s similar to this which works.

Possibly the error is misleading, and it’s because of the double dot in the java package name or the space before the semicolon after the package? Another possibility is that you use an old version of the serializer, which has no support for common types.