Emil Orvik Kollstrøm
12/24/2019, 7:16 AM/some/path/some_file.proto [0:0]: Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: com.google.protobuf.TextFormat$ParseException: 2:1: Invalid field value: -
at com.google.protobuf.TextFormat$Tokenizer.parseException(TextFormat.java:1163)
at com.google.protobuf.TextFormat$Parser.skipFieldValue(TextFormat.java:2013)
at com.google.protobuf.TextFormat$Parser.mergeField(TextFormat.java:1699)
at com.google.protobuf.TextFormat$Parser.mergeField(TextFormat.java:1598)
at com.google.protobuf.TextFormat$Parser.merge(TextFormat.java:1584)
at com.google.protobuf.TextFormat$Parser.merge(TextFormat.java:1475)
at com.github.marcoferrer.krotoplus.generators.GeneratorContextKt.getCompilerConfig(GeneratorContext.kt:62)
at com.github.marcoferrer.krotoplus.generators.GeneratorContext.<init>(GeneratorContext.kt:36)
at com.github.marcoferrer.krotoplus.generators.GeneratorKt.initializeContext(Generator.kt:86)
at com.github.marcoferrer.krotoplus.generators.GeneratorKt.initializeContext$default(Generator.kt:75)
at com.github.marcoferrer.krotoplus.KrotoPlusProtoCMain.main(KrotoPlusProtoCMain.kt:32)
... 8 more
--kroto-plus_out: protoc-gen-kroto-plus: Plugin failed with status code 1.
I'm using Maven. Might this be related to https://github.com/marcoferrer/kroto-plus/issues/28 ?
My plugin entry looks like this:
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>${protobuf-maven-plugin.version}</version>
<configuration>
<protocArtifact>
com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}
</protocArtifact>
<outputDirectory>${basedir}/target/generated-sources/protobuf/java</outputDirectory>
<clearOutputDirectory>false</clearOutputDirectory>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<protoSourceRoot>${basedir}/proto</protoSourceRoot>
</configuration>
</execution>
<execution>
<id>grpc-java</id>
<goals>
<goal>compile-custom</goal>
</goals>
<configuration>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.17.1:exe:${os.detected.classifier}
</pluginArtifact>
<protoSourceRoot>${basedir}/proto</protoSourceRoot>
</configuration>
</execution>
<execution>
<id>kroto-plus</id>
<goals>
<goal>compile-custom</goal>
</goals>
<configuration>
<pluginId>kroto-plus</pluginId>
<pluginArtifact>
com.github.marcoferrer.krotoplus:protoc-gen-kroto-plus:${kroto-plus.version}:jar:jvm8
</pluginArtifact>
<pluginParameter>ConfigPath=${project.basedir}/krotoPlusConfig.asciipb
</pluginParameter>
<protoSourceRoot>${basedir}/proto</protoSourceRoot>
</configuration>
</execution>
</executions>
</plugin>
I also have this extension block (don't know if it is related or not):
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>${os-maven-plugin.version}</version>
</extension>
</extensions>