NoSuchMethodError with protobufs

20 views
Skip to first unread message

Amber Xie

unread,
Jun 25, 2020, 6:19:17 PM6/25/20
to Protocol Buffers
Hi,

I'm working on a Java / Maven project, and I'm getting the following errors on a Java servlet:

(1) When I first run the code:
CAUSED BY: java.lang.reflect.UndeclaredThrowableException
CAUSED BY: java.lang.reflect.InvocationTargetException
CAUSED BY: java.lang.NoSuchMethodError: 'com.google.protobuf.Parser com.google.protobuf.MessageLite.getParserForType()'

(2) When I reload the page
CAUSED BY: java.lang.reflect.UndeclaredThrowableException
CAUSED BY: java.lang.reflect.InvocationTargetException
CAUSED BY: java.lang.NoClassDefFoundError: Could not initialize class com.google.ads.googleads.v3.services.stub.GrpcCampaignServiceStub

What could the error possible be? I'm not sure if I need a dependency in my pom.xml file or I need to import certain classes.

Thanks,
Reply all
Reply to author
Forward
0 new messages