Skip to content

Knowledge

Perplexity is the beginning of Knowledge

Tag: java spring google+

Method getAuthenticateAsList not found Crash – Signup/Signin with Google+ API integration : Java Spring dependency

Method getAuthenticateAsList not found Crash – Signup/Signin with Google+ API integration : Java Spring dependency

Crash Report :

SEVERE [http-nio-8080-exec-4] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [Spring] in context with path [/testapp] threw exception [Handler processing failed; nested exception is java.lang.NoSuchMethodError: com.google.api.client.http.HttpHeaders.getAuthenticateAsList()Ljava/util/List;] with root cause
java.lang.NoSuchMethodError: com.google.api.client.http.HttpHeaders.getAuthenticateAsList()Ljava/util/List;
at com.google.api.client.auth.oauth2.Credential.handleResponse(Credential.java:245)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:992)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:410)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:460)
at com.testapp.service.impl.UserServiceImpl.postSignUp(UserServiceImpl.java:147)
at com.testapp.controller.UserController.postSignUp(UserController.java:69)
at com.testapp.controller.UserController$$FastClassBySpringCGLIB$$6d302bfc.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:717)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:653)
at com.testapp.controller.UserController$$EnhancerBySpringCGLIB$$99bf7de6.postSignUp(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:781)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:721)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:943)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)

Solution:

Use latest library version > 1.17

 

                dependency>
			groupId>com.google.apisgoogle-api-services-plusv1-rev282-1.20.0
			groupId>com.google.http-clientgoogle-http-client1.20.0

                 dependency>
			groupId>com.google.http-clientgoogle-http-client1.20.0
                        artifactId>google-http-client1.20.0
                        version>1.20.0

Google plus signup/signin : java code

			TokenResponse tokenResponse = new TokenResponse();
			tokenResponse.setAccessToken(authenticationRequest.getAccessToken());
			GoogleCredential cred = new GoogleCredential().setFromTokenResponse(tokenResponse);

			/*
			 * Default HTTP transport to use to make HTTP requests.
			 */
			HttpTransport TRANSPORT = new NetHttpTransport();
			JacksonFactory JSON_FACTORY = new JacksonFactory();
			Plus plus = new Plus.Builder(TRANSPORT, JSON_FACTORY, cred).setApplicationName(Constants.APPLICATION_NAME)
					.build();
			if (plus != null) {
				try {
					Person userProfile = plus.people().get("me").execute();
					if (userProfile != null) {

					}
				} catch (IOException e) {
					e.printStackTrace();
					return null;
				}
			}
Author Sadanand TeggiPosted on October 18, 2015August 24, 2016Categories Java, ProgrammingTags G+ API java, g+ API java springs, google plus integration in java, google signup java, googleplus API java, java spring google+Leave a comment on Method getAuthenticateAsList not found Crash – Signup/Signin with Google+ API integration : Java Spring dependency

How to Overcome Math Fear

Mathemophobia

Inspiring

  • Innovation By Indian Corn Seller

Recent Posts

  • Workflows in Jira – How to create workflows in Jira Step by Step guide
  • Software Development Life Cycle (SDLC) – Testing
  • React-native linking error while upgrading @react-native-firebase/app for use_frameworks podfile configuration
  • yarn install does not create node_modules folder
  • react-native version upgrade – Error: index.js: Cannot find module ‘babel-plugin-r’ React Native

Recent Comments

  • Notes On Startup – A Perfect Competition and Monopoly – Knowledge on Notes On Startup – Ideology of Competition – Building Creative Monopoly
  • Notes On Startup – Four big Lessons from dot-com Crash – Knowledge on Notes On Startup – A Perfect Competition and Monopoly
  • Notes On Startup – Startup Thinking – 1 to n And 0 to 1 progress – Knowledge on Notes On Startup – Four big Lessons from dot-com Crash
  • Notes On Startup – Building Something New and Innovative – Knowledge on Notes On Startup – Startup Thinking – 1 to n And 0 to 1 progress
  • Alex on Server Side Rendering (SSR) in React 16 with create-react-app using Material Ui, Redux and Express Libraries

Archives

Categories

  • Analysis
    • algorithms
    • C Programming
    • Database
    • Graph theory
    • Programming
      • Android
  • Art
    • Drawing
  • Mobile Testing
  • Non-Technical
    • Education
      • Sanskrit
    • Space
    • Startup
    • Yoga
  • Programming
    • C
    • database
    • Java
      • Errors
    • node.js
      • sequelize errors
    • ReactJS
    • ReactNative
    • Swift
    • Web Services
    • Web Technologies
      • HTML
  • ReactJS
    • React-Tutorial
  • Technical
    • Apple WWDC 2015
    • IOT – Internet Of things
  • Testing
    • Akshay
    • Mobile Testing
  • Uncategorized
Knowledge Privacy Policy Proudly powered by WordPress