Comment #3 on issue 315 by erroneous duplicate definition error if imported file in subdirectory

When I use protoc to generate /nested_extension.proto from source(version 2.5.0), I get the error message: exec] protobuf/java/src/test/java/com/google/protobuf/non_nested_extension.proto:39:9: "protobuf_unittest.MessageToBeExtended" is already defined in file "com/google/protobuf/non_nested_extension.proto". [exec] protobuf/java/src/test/java/com/google/protobuf/non_nested_extension.proto:43:9: "protobuf_unittest.MyNonNestedExtension" is already defined in file "com/google/protobuf/non_nested_extension.proto". [exec] protobuf/java/src/test/java/com/google/protobuf/non_nested_extension.proto:47:33: "protobuf_unittest.nonNestedExtension" is already defined in file "com/google/protobuf/non_nested_extension.proto". [exec] protobuf/java/src/test/java/com/google/protobuf/non_nested_extension.proto:46:8: "protobuf_unittest.MessageToBeExtended" seems to be defined in "com/google/protobuf/non_nested_extension.proto", which is not imported by "protobuf/java/src/test/java/com/google/protobuf/non_nested_extension.proto". To use it here, please add the necessary import

How can I fix it?

You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:

You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To post to this group, send email to
Visit this group at
For more options, visit

Reply via email to