Firebase in Google app engine throwing noMethodFound error while initialization

java maven google-app-engine firebase

227 просмотра

1 ответ

I am trying to initialize firebase in Google appengine web app and using maven for dependencies.

<dependency>
        <groupId>com.google.firebase</groupId>
        <artifactId>firebase-server-sdk</artifactId>
        <version>[3.0.0,)</version>
    </dependency>

Getting error

java.lang.NoSuchMethodError: com.google.api.client.googleapis.auth.oauth2.GoogleCredential.fromStream(....)
at com.google.firebase.FirebaseOptions$Builder.setServiceAccount(FirebaseOptions.java:77)
Автор: Giridhar Источник Размещён: 08.11.2019 11:10

Ответы (1)


0 плюса

How to solve this issue:

  1. Go to http://search.maven.org/#search%7Cga%7C1%7Cgoogle-api-client and find the last version of com.google.api-client API.

  2. Add the dependency on you project

    <dependency>
    <groupId>com.google.api-client</groupId>
    <artifactId>google-api-client-assembly</artifactId>
    <version>last version </version>
    </dependency>
    

I do this on EJB project using netbeans and glassfish server, so I download the jar file of the last version com.google.api-client add it on Netbeans Libraries and glassfish libraries, then I compile the project and restart glassfish.

Автор: Blaise Siani Размещён: 06.10.2016 05:48
Вопросы из категории :
32x32