Krishna Mohan Elluru
11/23/2022, 4:46 PMprotobuf-0.1.17
was added to my .pact/plugins
folder. However, running the example consumer tests from the pact-plugins
repo results in the following error (for the test consumeInitPluginMessage):
Failed to resolve parameter [au.com.dius.pact.core.model.V4Interaction$AsynchronousMessage arg0] in method [void io.pact.example.protobuf.provider.PactConsumerTest.consumeInitPluginMessage(au.com.dius.pact.core.model.V4Interaction$AsynchronousMessage) throws com.google.protobuf.InvalidProtocolBufferException]: Plugin protobuf with version any was not found
Is the protobuf plugin from pactflow incompatible with the tests in the pact-foundation pact-plugins examples? The Readme in pact-protobuf-plugin lists it as its JVM example.
Apologies in advance if I’ve missed some critical setup step. Any help is appreciated.Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Krishna Mohan Elluru
11/23/2022, 5:31 PMKrishna Mohan Elluru
11/23/2022, 5:32 PMKrishna Mohan Elluru
11/23/2022, 5:33 PMYousaf Nabi (pactflow.io)
./gradle check
Krishna Mohan Elluru
11/23/2022, 5:33 PMYousaf Nabi (pactflow.io)
Krishna Mohan Elluru
11/23/2022, 5:34 PM<plugin>
<groupId>au.com.dius.pact.provider</groupId>
<artifactId>maven</artifactId>
<version>4.1.11</version>
</plugin>
as per the steps mentioned in the link and using itYousaf Nabi (pactflow.io)
Krishna Mohan Elluru
11/23/2022, 5:39 PMYousaf Nabi (pactflow.io)
Krishna Mohan Elluru
11/23/2022, 5:47 PMKrishna Mohan Elluru
11/23/2022, 5:58 PMkrishnamohanelluru@Krishnas-MacBook-Pro protobuf-consumer-jvm % ./gradlew check
FAILURE: Build failed with an exception.
* Where:
Settings file ‘/Users/krishnamohanelluru/pact/pact-plugins/examples/protobuf/protobuf-consumer-jvm/settings.gradle’
* What went wrong:
Could not compile settings file ‘/Users/krishnamohanelluru/pact/pact-plugins/examples/protobuf/protobuf-consumer-jvm/settings.gradle’.
startup failed:General error during semantic analysis: Unsupported class file major version 62 java.lang.IllegalArgumentException: Unsupported class file major version 62 at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:196) at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:177) at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:163) at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:284) at org.codehaus.groovy.ast.decompiled.AsmDecompiler.parseClass(AsmDecompiler.java:81) at org.codehaus.groovy.control.ClassNodeResolver.findDecompiled(ClassNodeResolver.java:251)
Krishna Mohan Elluru
11/23/2022, 6:04 PMKrishna Mohan Elluru
11/23/2022, 6:14 PMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
uglyog
Krishna Mohan Elluru
11/24/2022, 4:41 AMKrishna Mohan Elluru
11/24/2022, 4:42 AMuglyog
Krishna Mohan Elluru
11/24/2022, 10:22 AMGetting the same error like before Uglyog.
trace_id= span_id= 2022-11-24 02:20:00.744 GMT-08:00 [main] [ERROR] i.p.p.jvm.core.DefaultPluginManager [PluginManager.kt:525] [] - Init call to plugin protobuf failed
java.lang.RuntimeException: java.lang.NoClassDefFoundError: io/netty/channel/ChannelFactory
at io.pact.plugins.jvm.core.Utils.handleWith(Util.kt:46)
at io.pact.plugins.jvm.core.DefaultPluginManager.initialisePlugin(PluginManager.kt:513)
at io.pact.plugins.jvm.core.DefaultPluginManager.loadPlugin(PluginManager.kt:290)
at au.com.dius.pact.consumer.dsl.PactBuilder.usingPlugin(PactBuilder.kt:96)
at au.com.dius.pact.consumer.dsl.PactBuilder.usingPlugin$default(PactBuilder.kt:93)
at au.com.dius.pact.consumer.dsl.PactBuilder.usingPlugin(PactBuilder.kt)
at com.hpe.gravity.cx.ctests.MessageTransformerConsumerPactProtoCTest.initPluginMessage(MessageTransformerConsumerPactProtoCTest.java:30)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
trace_id= span_id= 2022-11-24 02:20:00.747 GMT-08:00 [main] [ERROR] a.c.d.pact.consumer.dsl.PactBuilder [PactBuilder.kt:99] [] - Init call to plugin protobuf failed: java.lang.RuntimeException: java.lang.NoClassDefFoundError: io/netty/channel/ChannelFactory
trace_id= span_id= 2022-11-24 02:20:00.753 GMT-08:00 [Thread-4] [WARN] a.com.dius.pact.core.support.Metrics [Metrics.kt:88] [] -
Please note: we are tracking events anonymously to gather important usage statistics like JVM version
and operating system. To disable tracking, set the 'pact_do_not_track' system property or environment
variable to 'true'.
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
at org.junit.platform.commons.support.ReflectionSupport.invokeMethod(ReflectionSupport.java:198)
at au.com.dius.pact.consumer.junit5.PactConsumerTestExt.lookupPact(PactConsumerTestExt.kt:387)
Krishna Mohan Elluru
11/24/2022, 4:46 PMKrishna Mohan Elluru
11/25/2022, 3:46 AMuglyog
Failed to invoke protoc binary: exit code exit status: 1
means it can't run the Protobuf compiler. What OS are you running with? Is it running within docker with Alpine Linux?Krishna Mohan Elluru
11/25/2022, 3:50 AMuglyog
Krishna Mohan Elluru
11/25/2022, 3:51 AMuglyog
Krishna Mohan Elluru
11/25/2022, 3:54 AMuglyog
Krishna Mohan Elluru
11/25/2022, 3:54 AMuglyog
~/.pact/plugins/protobuf-0.1.17/protoc/bin/protoc --version
Krishna Mohan Elluru
11/25/2022, 3:54 AMuglyog
uglyog
Krishna Mohan Elluru
11/25/2022, 3:56 AMKrishna Mohan Elluru
11/25/2022, 4:18 AMuglyog
Krishna Mohan Elluru
11/25/2022, 4:21 AMuglyog
Krishna Mohan Elluru
11/25/2022, 4:28 AMKrishna Mohan Elluru
11/25/2022, 4:28 AMuglyog
~/.pact/plugins/protobuf-0.1.17/pact-plugin.json
Krishna Mohan Elluru
11/25/2022, 4:32 AMuglyog
Krishna Mohan Elluru
11/25/2022, 4:36 AMKrishna Mohan Elluru
11/25/2022, 4:45 AMuglyog
uglyog
Got response: error: "Failed to process protobuf: Failed to invoke protoc binary: exit code exit status: 1"
Krishna Mohan Elluru
11/25/2022, 5:20 AMKrishna Mohan Elluru
11/25/2022, 5:20 AMuglyog