Closed ugrozkr closed 5 years ago
when i changed protoc version to 3.6.0 then compiler starts to working but it can not resolve then DEFAULT_INSTANCE and its get following error;
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project zemberek-morphology: Compilation failure: Compilation failure: [ERROR] /D:/JavaProjects/zemberek-nlp-master/morphology/target/generated-sources/protobuf/java/zemberek/morphology/lexicon/proto/LexiconProto.java:[1556,40] cannot find symbol [ERROR] symbol: method createBuilder() [ERROR] location: variable DEFAULT_INSTANCE of type zemberek.morphology.lexicon.proto.LexiconProto.DictionaryItem [ERROR] /D:/JavaProjects/zemberek-nlp-master/morphology/target/generated-sources/protobuf/java/zemberek/morphology/lexicon/proto/LexiconProto.java:[1559,40] cannot find symbol [ERROR] symbol: method createBuilder(zemberek.morphology.lexicon.proto.LexiconProto.DictionaryItem) [ERROR] location: variable DEFAULT_INSTANCE of type zemberek.morphology.lexicon.proto.LexiconProto.DictionaryItem [ERROR] /D:/JavaProjects/zemberek-nlp-master/morphology/target/generated-sources/protobuf/java/zemberek/morphology/lexicon/proto/LexiconProto.java:[2097,12] an enum switch case label must be the unqualified name of an enumeration constant [ERROR] /D:/JavaProjects/zemberek-nlp-master/morphology/target/generated-sources/protobuf/java/zemberek/morphology/lexicon/proto/LexiconProto.java:[2100,12] an enum switch case label must be the unqualified name of an enumeration constant [ERROR] /D:/JavaProjects/zemberek-nlp-master/morphology/target/generated-sources/protobuf/java/zemberek/morphology/lexicon/proto/LexiconProto.java:[2881,40] cannot find symbol [ERROR] symbol: method createBuilder() [ERROR] location: variable DEFAULT_INSTANCE of type zemberek.morphology.lexicon.proto.LexiconProto.Dictionary [ERROR] /D:/JavaProjects/zemberek-nlp-master/morphology/target/generated-sources/protobuf/java/zemberek/morphology/lexicon/proto/LexiconProto.java:[2884,40] cannot find symbol [ERROR] symbol: method createBuilder(zemberek.morphology.lexicon.proto.LexiconProto.Dictionary) [ERROR] location: variable DEFAULT_INSTANCE of type zemberek.morphology.lexicon.proto.LexiconProto.Dictionary [ERROR] /D:/JavaProjects/zemberek-nlp-master/morphology/target/generated-sources/protobuf/java/zemberek/morphology/lexicon/proto/LexiconProto.java:[3408,12] an enum switch case label must be the unqualified name of an enumeration constant [ERROR] /D:/JavaProjects/zemberek-nlp-master/morphology/target/generated-sources/protobuf/java/zemberek/morphology/lexicon/proto/LexiconProto.java:[3411,12] an enum switch case label must be the unqualified name of an enumeration constant [ERROR] /D:/JavaProjects/zemberek-nlp-master/morphology/target/generated-sources/protobuf/java/zemberek/morphology/lexicon/proto/LexiconProto.java:[3693,40] cannot find symbol [ERROR] symbol: method createBuilder() [ERROR] location: variable DEFAULT_INSTANCE of type zemberek.morphology.lexicon.proto.LexiconProto.MasterDictionary [ERROR] /D:/JavaProjects/zemberek-nlp-master/morphology/target/generated-sources/protobuf/java/zemberek/morphology/lexicon/proto/LexiconProto.java:[3696,40] cannot find symbol [ERROR] symbol: method createBuilder(zemberek.morphology.lexicon.proto.LexiconProto.MasterDictionary) [ERROR] location: variable DEFAULT_INSTANCE of type zemberek.morphology.lexicon.proto.LexiconProto.MasterDictionary [ERROR] /D:/JavaProjects/zemberek-nlp-master/morphology/target/generated-sources/protobuf/java/zemberek/morphology/lexicon/proto/LexiconProto.java:[3906,12] an enum switch case label must be the unqualified name of an enumeration constant [ERROR] /D:/JavaProjects/zemberek-nlp-master/morphology/target/generated-sources/protobuf/java/zemberek/morphology/lexicon/proto/LexiconProto.java:[3909,12] an enum switch case label must be the unqualified name of an enumeration constant [ERROR] -> [Help 1]
I think that the project ist not compatible with protoc 3.6.0 or latest version. 3.6.0 version unable to resolve following parts of proto files: 1- DEFAULT_INSTANCE 2- GET_MEMORIZED_IS_INITIALIZED 3- SET_MEMORIZED_IS_INITIALIZED
please update project for latest protoc version because we can not find all of safe protoc files or add three uncompatible parts source code areas.
Hi, Have you tried to compile with genproto? mvn compile -P genproto
Hi Yusuf, I tried it yet, but result not changed.
I had a same problem. I solved when I tried to following steps: mvn compile -P genproto mvn dependency:resolve or simply Maven->Update Project(if you are using Eclipse)
Please try these: mvn clean compile install package mvn compile -P genproto mvn dependency:resolve or simply Maven->Update Project(if you are using Eclipse)
I'm using IntelliJ IDEA is there some differences between eclipse and intelliJ ?
it looks like, this technic is not compatible for IntelliJ :\
@ugrozkr
Did you follow steps in https://github.com/ahmetaa/zemberek-nlp/wiki/Zemberek-For-Developers ?
@ugrozkr @yusufcakmakk I updated all the dependencies to the latest versions and removed lite runtime option from lexicon proto, can you pull the latest version and test again?
@mdakin thanks for your support that is solved my problem :)
@mdakin looks good to me. @ugrozkr you can close the issue if problem is solved.
I get an error when maven compile process, protoc files can not resolved, other all plugins working very well. These are my compile time logs;
[ERROR] Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.5.1:compile (default) on project zemberek-morphology: Missing: [ERROR] ---------- [ERROR] 1) com.google.protobuf:protoc:exe:windows-x86_64:3.4.0 [ERROR] [ERROR] Try downloading the file manually from the project website. [ERROR] [ERROR] Then, install it using the command: [ERROR] mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.4.0 -Dclassifier=windows-x86_64 -Dpackaging=exe -Dfile=/path/to/file [ERROR] [ERROR] Alternatively, if you host your own repository you can deploy the file there: [ERROR] mvn deploy:deploy-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.4.0 -Dclassifier=windows-x86_64 -Dpackaging=exe -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] [ERROR] [ERROR] Path to dependency: [ERROR] 1) zemberek-nlp:zemberek-morphology:jar:0.17.0-SNAPSHOT [ERROR] 2) com.google.protobuf:protoc:exe:windows-x86_64:3.4.0 [ERROR] [ERROR] ---------- [ERROR] 1 required artifact is missing. [ERROR] [ERROR] for artifact: [ERROR] zemberek-nlp:zemberek-morphology:jar:0.17.0-SNAPSHOT