Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Job.proto:11:18: "DescriptorProto" is not defined.

Received: by 10.66.72.73 with SMTP id b9mr4185625pav.9.1349160381832;
        Mon, 01 Oct 2012 23:46:21 -0700 (PDT)
X-BeenThere: protobuf@googlegroups.com
Received: by 10.68.189.162 with SMTP id gj2ls902446pbc.6.gmail; Mon, 01 Oct
 2012 23:46:18 -0700 (PDT)
Received: by 10.66.88.200 with SMTP id bi8mr2574844pab.27.1349160378384;
        Mon, 01 Oct 2012 23:46:18 -0700 (PDT)
Received: by 10.66.88.200 with SMTP id bi8mr2574843pab.27.1349160378357;
        Mon, 01 Oct 2012 23:46:18 -0700 (PDT)
Return-Path: <jas...@google.com>
Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49])
        by gmr-mx.google.com with ESMTPS id j3si90711paz.2.2012.10.01.23.46.18
        (version=TLSv1/SSLv3 cipher=OTHER);
        Mon, 01 Oct 2012 23:46:18 -0700 (PDT)
Received-SPF: pass (google.com: domain of jas...@google.com designates 209.85.220.49 as permitted sender) client-ip=209.85.220.49;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jas...@google.com designates 209.85.220.49 as permitted sender) smtp.mail=jas...@google.com; dkim=pass header...@google.com
Received: by padbi5 with SMTP id bi5so5469295pad.22
        for <protobuf@googlegroups.com>; Mon, 01 Oct 2012 23:46:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=google.com; s=20120113;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :cc:content-type:x-system-of-record;
        bh=IjA42WbXpqAL+paGk86g83bfVtKQ2Whan06KTabrEdI=;
        b=JF7LYa76Lt1JH4IodgKcAONQOtS4NkIK7PBAKKcp1Z0Di/zHJQagVo9tfRxj3axhG2
         gFd38I5AFhJFrM98Dn7p8surgRQ2OBvBMSPkPlLau9A+ywQ8tFFmHOeEDclbz+2kLtwY
         RBa5p57Jx52UafA5G49rrMugcq+KLvcFrZg2UtBc4N2e4PI3CLBGIHg+sTfO5V4AoocF
         +Fl81Wg07A4bOoZPPHHYGDdhM7uh7lNWJDT/VbYw2lap2R9zoDrAHD/Sc+Rt9zzezCcE
         dSLOfTZOfbV384LCPYb0DOH13uJj7g/ltnWaVDXOQ0ardOIA4kLhQEIHqzOaP+XdCN9m
         rHHw==
        d=google.com; s=20120113;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :cc:content-type:x-system-of-record:x-gm-message-state;
        bh=IjA42WbXpqAL+paGk86g83bfVtKQ2Whan06KTabrEdI=;
        b=Y8vlvLFA/qFQA4dwMBCYyE6LgLI6MWVGK42HRw4jeM+6XWgqKrdljcKoNzZqtAtjK2
         liberXlgkgos33aKy7jqDUq1RrKUU2mIKM39P8Yzt3ZAxDC3wyn7w2CencpybalVCQ27
         4Nlh6oBeJfPpYTj9jc82GxcqFI/qumx5h+4zcH1g21nvrkPMVT7SJ+/U4yikNGzWvhgx
         nkuWxAs3nVNLvn1WmdHDTbX11kuqew3FCZjKI3c3qDwp406lOKTT2IrvOYvjZqU6yDhU
         WjHJIPRw8M1Z8WsPTtsh/WsOKgpnd+LOiP9Ayz/fwzpYEIzskYDBDLxPZe473oSX92D4
         s2Sw==
Received: by 10.68.190.197 with SMTP id gs5mr1801710pbc.124.1349160377986;
 Mon, 01 Oct 2012 23:46:17 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.68.51.202 with HTTP; Mon, 1 Oct 2012 23:45:57 -0700 (PDT)
In-Reply-To: <793e9aeb-a0aa-4218-b0e0-aae59cd0dedf@googlegroups.com>
References: <793e9aeb-a0aa-4218-b0e0-aae59cd0dedf@googlegroups.com>
From: Jason Hsueh <jas...@google.com>
Date: Mon, 1 Oct 2012 23:45:57 -0700
Message-ID: <CAF=ODjFNedfZymi-p75s+v+-e5tZ=auHnkWGOCLkrN2fwNd...@mail.gmail.com>
Subject: Re: [protobuf] Job.proto:11:18: "DescriptorProto" is not defined.
To: Fahad Madani <fsmad...@gmail.com>
Cc: Protocol Buffers <protobuf@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
X-System-Of-Record: true
X-Gm-Message-State: ALoCoQlG8YQnFUUy556rFI9IbRq55ywsis4SjBBlwKNNEuT5e0NdhcJr1kM/lbgVNoDyEX+vBKjtEsC+jHvzmCH5e+4G7wEmMXOTij5d6JPpNQQc41Gdd/Ds2XkWYTaQKC1dLbdyDteBG8ab+PD+ZWqwJ4ndZGDbUoR2uJHKQqUdDvBM3yx59pKsw1ZCf1J1XMu0X9ZSjKZup6pPuc51QwM80cPAhkGAEg==

To start with you need to use the qualify with the package as
google.protobuf.DescriptorProto. See the section on Name Resolution:
https://developers.google.com/protocol-buffers/docs/proto#packages

Assuming your paths are set up correctly it should work after that.

On Fri, Sep 28, 2012 at 2:19 AM, Fahad Madani <fsmad...@gmail.com> wrote:
> Hi,
>
> I am trying to compile my .proto file using protoc compiler and generate
> java classes for the same.
> Below is my Job.proto file
>
> import "google/protobuf/descriptor.proto";
>
> option java_package = "com.myfile.test";
> option java_outer_classname = "JobProto";
>
> message Job{
>     required string companyName = 1;
>     required string designation = 2;
>     required int32 salary = 3;
>     required DescriptorProto file_prot = 4;
> }
>
> And my protoc command is
>
> protoc %Input%\Job.proto --java_out=%Output% --descriptor_set_out=job.desc
> --proto_path=%Input% --proto_path=%protobuf_src_folder%
>
> where environment variable definition are:
> Input: Folder in which Job.proto file is present
> Output: Foldedr where my output classes are generated
> protobuf_src_folder: Path till "..\protobuf-2.4.1\src"
>
> when i execute the above command i get
> Job.proto:11:18: "DescriptorProto" is not defined.
>
> I have tried copying the discriptor.proto in the same folder and modifying
> the import statement (still i get the same error). Whatever i have browse i
> just found setting --proto_path properly but in my case the path is proper
> but still i am getting the same error. I have also ensure that my protobuf
> source version and protoc version are same "2.4.1"
>
> Can anyone tell me whats wrong ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/protobuf/-/bC1aYBXjCw4J.
> To post to this group, send email to protobuf@googlegroups.com.
> To unsubscribe from this group, send email to
> protobuf+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/protobuf?hl=en.