找不到符号符号:class ProtocolMessageEnum

时间:2012-08-07 04:41:34

标签: ant javac

在编译five-server的源代码时,我遇到了以下错误

vickey@home:~/code/five-server$ ant dist
Buildfile: build.xml

guess-target:

-maybe-dist-win32:

-maybe-dist-macosx:

-maybe-dist-linux:

dist-clean:

init:
    [mkdir] Created dir: /home/vickey/code/five-server/build/classes
    [mkdir] Created dir: /home/vickey/code/five-server/build/test-classes
    [mkdir] Created dir: /home/vickey/code/five-server/gen/src/java
    [mkdir] Created dir: /home/vickey/code/five-server/gen/resources

build-props:
    [mkdir] Created dir: /home/vickey/code/five-server/gen/resources/org/devtcg/five

-checkprotoc:

protoc:
     [echo] Compiling protobufs into Java classes...

compile:
    [javac] Compiling 46 source files to /home/vickey/code/five-server/build/classes
    [javac] /home/vickey/code/five-server/src/main/java/org/devtcg/five/server/HttpServer.java:50: warning: sun.misc.BASE64Decoder is internal proprietary API and may be removed in a future release
    [javac] import sun.misc.BASE64Decoder;
    [javac]                ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:2538: cannot find symbol
    [javac] symbol  : class ProtocolMessageEnum
    [javac] location: package com.google.protobuf
    [javac]         implements com.google.protobuf.ProtocolMessageEnum {
    [javac]                                       ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:2735: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:2746: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:2757: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:2768: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:2780: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:2560: package com.google.protobuf.Internal does not exist
    [javac]       public static com.google.protobuf.Internal.EnumLiteMap<Type>
    [javac]                                                 ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:2564: package com.google.protobuf.Internal does not exist
    [javac]       private static com.google.protobuf.Internal.EnumLiteMap<Type>
    [javac]                                                  ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:134: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:145: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:156: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:167: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:179: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:595: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:606: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:617: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:628: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:640: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:1163: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:1174: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:1185: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:1196: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:1208: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:1757: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:1768: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:1779: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:1790: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:1802: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:2211: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:2222: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:2233: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:2244: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:2256: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                            ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:2896: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                              ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:292: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                              ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:759: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                              ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:1339: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                              ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:1922: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                              ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:2369: cannot find symbol
    [javac] symbol  : class ExtensionRegistryLite
    [javac] location: package com.google.protobuf
    [javac]           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    [javac]                              ^
    [javac] /home/vickey/code/five-server/src/main/java/org/devtcg/five/server/HttpServer.java:333: warning: sun.misc.BASE64Decoder is internal proprietary API and may be removed in a future release
    [javac]                 userpassString = new String(new BASE64Decoder()
    [javac]                                                 ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:163: cannot find symbol
    [javac] symbol  : method mergeDelimitedFrom(java.io.InputStream)
    [javac] location: class org.devtcg.five.meta.data.Protos.Artist.Builder
    [javac]       return newBuilder().mergeDelimitedFrom(input).buildParsed();
    [javac]                          ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:236: cannot find symbol
    [javac] symbol  : method newUninitializedMessageException(org.devtcg.five.meta.data.Protos.Artist)
    [javac] location: class org.devtcg.five.meta.data.Protos.Artist.Builder
    [javac]           throw newUninitializedMessageException(result);
    [javac]                 ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:244: cannot find symbol
    [javac] symbol  : method newUninitializedMessageException(org.devtcg.five.meta.data.Protos.Artist)
    [javac] location: class org.devtcg.five.meta.data.Protos.Artist.Builder
    [javac]           throw newUninitializedMessageException(
    [javac]                 ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:624: cannot find symbol
    [javac] symbol  : method mergeDelimitedFrom(java.io.InputStream)
    [javac] location: class org.devtcg.five.meta.data.Protos.Album.Builder
    [javac]       return newBuilder().mergeDelimitedFrom(input).buildParsed();
    [javac]                          ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:697: cannot find symbol
    [javac] symbol  : method newUninitializedMessageException(org.devtcg.five.meta.data.Protos.Album)
    [javac] location: class org.devtcg.five.meta.data.Protos.Album.Builder
    [javac]           throw newUninitializedMessageException(result);
    [javac]                 ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:705: cannot find symbol
    [javac] symbol  : method newUninitializedMessageException(org.devtcg.five.meta.data.Protos.Album)
    [javac] location: class org.devtcg.five.meta.data.Protos.Album.Builder
    [javac]           throw newUninitializedMessageException(
    [javac]                 ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:1192: cannot find symbol
    [javac] symbol  : method mergeDelimitedFrom(java.io.InputStream)
    [javac] location: class org.devtcg.five.meta.data.Protos.Song.Builder
    [javac]       return newBuilder().mergeDelimitedFrom(input).buildParsed();
    [javac]                          ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:1265: cannot find symbol
    [javac] symbol  : method newUninitializedMessageException(org.devtcg.five.meta.data.Protos.Song)
    [javac] location: class org.devtcg.five.meta.data.Protos.Song.Builder
    [javac]           throw newUninitializedMessageException(result);
    [javac]                 ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:1273: cannot find symbol
    [javac] symbol  : method newUninitializedMessageException(org.devtcg.five.meta.data.Protos.Song)
    [javac] location: class org.devtcg.five.meta.data.Protos.Song.Builder
    [javac]           throw newUninitializedMessageException(
    [javac]                 ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:1740: cannot find symbol
    [javac] symbol  : method computeInt64SizeNoTag(long)
    [javac] location: class com.google.protobuf.CodedOutputStream
    [javac]             .computeInt64SizeNoTag(element);
    [javac]             ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:1739: operator + cannot be applied to int,com.google.protobuf.CodedOutputStream.computeInt64SizeNoTag
    [javac]           dataSize += com.google.protobuf.CodedOutputStream
    [javac]                    ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:1740: inconvertible types
    [javac] found   : <nulltype>
    [javac] required: int
    [javac]             .computeInt64SizeNoTag(element);
    [javac]                                   ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:1786: cannot find symbol
    [javac] symbol  : method mergeDelimitedFrom(java.io.InputStream)
    [javac] location: class org.devtcg.five.meta.data.Protos.Playlist.Builder
    [javac]       return newBuilder().mergeDelimitedFrom(input).buildParsed();
    [javac]                          ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:1859: cannot find symbol
    [javac] symbol  : method newUninitializedMessageException(org.devtcg.five.meta.data.Protos.Playlist)
    [javac] location: class org.devtcg.five.meta.data.Protos.Playlist.Builder
    [javac]           throw newUninitializedMessageException(result);
    [javac]                 ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:1867: cannot find symbol
    [javac] symbol  : method newUninitializedMessageException(org.devtcg.five.meta.data.Protos.Playlist)
    [javac] location: class org.devtcg.five.meta.data.Protos.Playlist.Builder
    [javac]           throw newUninitializedMessageException(
    [javac]                 ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:2240: cannot find symbol
    [javac] symbol  : method mergeDelimitedFrom(java.io.InputStream)
    [javac] location: class org.devtcg.five.meta.data.Protos.PlaylistSong.Builder
    [javac]       return newBuilder().mergeDelimitedFrom(input).buildParsed();
    [javac]                          ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:2313: cannot find symbol
    [javac] symbol  : method newUninitializedMessageException(org.devtcg.five.meta.data.Protos.PlaylistSong)
    [javac] location: class org.devtcg.five.meta.data.Protos.PlaylistSong.Builder
    [javac]           throw newUninitializedMessageException(result);
    [javac]                 ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:2321: cannot find symbol
    [javac] symbol  : method newUninitializedMessageException(org.devtcg.five.meta.data.Protos.PlaylistSong)
    [javac] location: class org.devtcg.five.meta.data.Protos.PlaylistSong.Builder
    [javac]           throw newUninitializedMessageException(
    [javac]                 ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:2566: package com.google.protobuf.Internal does not exist
    [javac]             new com.google.protobuf.Internal.EnumLiteMap<Type>() {
    [javac]                                             ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:2764: cannot find symbol
    [javac] symbol  : method mergeDelimitedFrom(java.io.InputStream)
    [javac] location: class org.devtcg.five.meta.data.Protos.Record.Builder
    [javac]       return newBuilder().mergeDelimitedFrom(input).buildParsed();
    [javac]                          ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:2837: cannot find symbol
    [javac] symbol  : method newUninitializedMessageException(org.devtcg.five.meta.data.Protos.Record)
    [javac] location: class org.devtcg.five.meta.data.Protos.Record.Builder
    [javac]           throw newUninitializedMessageException(result);
    [javac]                 ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:2845: cannot find symbol
    [javac] symbol  : method newUninitializedMessageException(org.devtcg.five.meta.data.Protos.Record)
    [javac] location: class org.devtcg.five.meta.data.Protos.Record.Builder
    [javac]           throw newUninitializedMessageException(
    [javac]                 ^
    [javac] /home/vickey/code/five-server/gen/src/java/org/devtcg/five/meta/data/Protos.java:3312: internalBuildGeneratedFileFrom(java.lang.String,com.google.protobuf.Descriptors.FileDescriptor[],com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner) in com.google.protobuf.Descriptors.FileDescriptor cannot be applied to (java.lang.String[],com.google.protobuf.Descriptors.FileDescriptor[],com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner)
    [javac]       .internalBuildGeneratedFileFrom(descriptorData,
    [javac]       ^
    [javac] 62 errors
    [javac] 2 warnings

BUILD FAILED
/home/vickey/code/five-server/build.xml:150: The following error occurred while executing this line:
/home/vickey/code/five-server/build.xml:76: Compile failed; see the compiler error output for details.

Total time: 5 seconds

我认为某些类定义没有被导入。我怎样才能摆脱这些错误?

编辑: 错误的原因似乎是build.xml文件中的这些行

 73     <target name="compile" depends="init, build-props, protoc"                         description="compile the source">
 74         <!-- Compile the java code from ${src} into ${build} -->
 75         <javac srcdir="${src}:${gen.src}" destdir="${build.classes}"
 76                 debug="true" debuglevel="lines,vars,source">
 77             <classpath refid="compile.classpath" />
 78         </javac>
 79     </target>

这里compile.classpath可能没有那些类定义。

0 个答案:

没有答案