dependency issue?

154 views
Skip to first unread message

suj...@gmail.com

unread,
Nov 23, 2009, 9:01:40 PM11/23/09
to Protocol Buffers
I get the following error on initialization of one of My protos. as
far as I can tell the dependedncies are all correct but the the
initialization code seems to find differences between
FieldDescriptorProto and FieldDescriptor and gives me the following
error.
"Invalid embedded descriptor for"

was hoping someone can explain what is going on.
thx
sujata

Kenton Varda

unread,
Nov 23, 2009, 9:15:01 PM11/23/09
to suj...@gmail.com, Protocol Buffers
Need more information:
- What language are you using?
- What is the full error message and stack trace?


--

You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To post to this group, send email to prot...@googlegroups.com.
To unsubscribe from this group, send email to protobuf+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.



suj...@gmail.com

unread,
Nov 23, 2009, 9:46:14 PM11/23/09
to Kenton Varda, suj...@gmail.com, Protocol Buffers
Sorry, forgot to mention. I am using Java. This started failing after having to regenerate the code since one of the dependent classes changed.

Here is the exception details.
java.lang.IllegalArgumentException: Invalid embedded descriptor for "Assertion.proto"

message
com.google.protobuf.Descriptors$DescriptorValidationException: Assertion.proto: Dependencies passed to FileDescriptor.buildFrom() don't match those listed in the FileDescriptorProto.

stacktrace is null

proto DescriptorProtos$FileDescriptorProto (id=1338) has the following in debug

name: "Assertion.proto"
dependency: "Issuer.proto"
dependency: "Subject.proto"
dependency: "Conditions.proto"

I can't see any variable associated with fieldDEscriptor but from the code i can see FieldDescriptor as follows
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.ebay.idp.proto.IssuerProto.getDescriptor(),
com.ebay.idp.proto.SubjectProto.getDescriptor(),
com.ebay.idp.proto.ConditionsProto.getDescriptor(),
}, assigner);

sujata

Kenton Varda

unread,
Nov 23, 2009, 9:55:43 PM11/23/09
to suj...@gmail.com, Protocol Buffers
Is it possible that you passed a different --proto_path when you were compiling Issuer.proto, Subject.proto, or Conditions.proto than you did when compiling Assertion.proto?  You need to make sure you pass the same proto_path in all cases.  (The default proto_path is the current directory, so if you don't specify a path, you must run all compilations from the same directory.)

Kenton Varda

unread,
Nov 23, 2009, 9:57:29 PM11/23/09
to suj...@gmail.com, Protocol Buffers
BTW, I don't know what could cause a stack trace to be null.  Are you catching the exception somewhere and then replacing the stack trace?

suj...@gmail.com

unread,
Nov 23, 2009, 10:03:53 PM11/23/09
to Kenton Varda, suj...@gmail.com, Protocol Buffers
Ok that explains it. Yes I did run some from parent dir (the ones without dependencies) which could have been the issue.
thx
sujata
Reply all
Reply to author
Forward
0 new messages