What it is also funny is that my file ADMObjectHandleMessage.proto
looks like this:
package com.qnamic.base.agent;
option java_outer_classname = "ADMObjectHandleMessage";
message ADMObjectHandle {
optional string host = 1;
optional string agent = 2;
optional string path = 3;
optional int64 admTopCreationTime = 4;
}
And the in descriptor has a whitespace in my ADMObjectHandleMessage
class:
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String descriptorData =
"\n\035ADMObjectHandleMessage.proto \022\025com.qna" +
"mic.base.agent\"X\n\017ADMObjectHandle\022\014\n\004hos" +
"t\030\001 \001(\t\022\r\n\005agent\030\002 \001(\t\022\014\n
\004path\030\003 \001(\t\022\032\n\022" +
"admTopCreationTime\030\004 \001(\003B\030B\026ADMObjectHan" +
"dleMessage";
So what you see here is "ADMObjectHandleMessage.proto " and not
"ADMObjectHandleMessage.proto". My other classes looks fine. The
problem is that I have AbstractADMAdapterMessage.proto using this:
package com.qnamic.planopt.base.query.adapter;
import "ADMObjectHandleMessage.proto";
message AbstractADMAdapter {
required com.qnamic.base.agent.ADMObjectHandle objectHandle = 1;
required bool adaptAll = 2;
required bool fillObjectHandle = 3;
}
The problem is that when the descriptor of the second class gets
initialized I get an Exception in Descriptors.FileDescriptor.buildFrom
() saying:
Dependencies passed to FileDescriptor.buildFrom() don't match those
listed in the FileDescriptorProto.
because the name does not match with each other:
"ADMObjectHandleMessage.proto ".equals("ADMObjectHandleMessage.proto")
What am I doing wrong?
Tai