java.lang.reflect.InvocationTargetException

Spring JIRA | Alexander Nalbandyan | 5 years ago
  1. 0

    Hi We are trying to use LikeOperations.like which throws following exception, It seems that it just sends post request to following url without any parameter https://graph.facebook.com/100001545091818_180072978720871/likes: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560) at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:399) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:317) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:204) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:182) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: org.springframework.web.client.ResourceAccessException: I/O error: Server returned HTTP response code: 400 for URL: https://graph.facebook.com/100001545091818_180072978720871/likes; nested exception is java.io.IOException: Server returned HTTP response code: 400 for URL: https://graph.facebook.com/100001545091818_180072978720871/likes at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:453) at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:415) at org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:294) at org.springframework.social.facebook.api.impl.FacebookTemplate.post(FacebookTemplate.java:216) at org.springframework.social.facebook.api.impl.LikeTemplate.like(LikeTemplate.java:38) at com.social.controller.FacebookConnectController.getPost(FacebookConnectController.java:128) ... 30 more Caused by: java.io.IOException: Server returned HTTP response code: 400 for URL: https://graph.facebook.com/100001545091818_180072978720871/likes at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1313) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234) at org.springframework.http.client.SimpleClientHttpResponse.getBody(SimpleClientHttpResponse.java:77) at org.springframework.social.support.BufferingClientHttpResponse.getBody(BufferingClientHttpResponse.java:58) at org.springframework.social.facebook.api.impl.FacebookErrorHandler.hasError(FacebookErrorHandler.java:65) at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:439) ... 35 more Thanks in advance.

    Spring JIRA | 5 years ago | Alexander Nalbandyan
    java.lang.reflect.InvocationTargetException
  2. 0

    Hi We are trying to use LikeOperations.like which throws following exception, It seems that it just sends post request to following url without any parameter https://graph.facebook.com/100001545091818_180072978720871/likes: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560) at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:399) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:317) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:204) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:182) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: org.springframework.web.client.ResourceAccessException: I/O error: Server returned HTTP response code: 400 for URL: https://graph.facebook.com/100001545091818_180072978720871/likes; nested exception is java.io.IOException: Server returned HTTP response code: 400 for URL: https://graph.facebook.com/100001545091818_180072978720871/likes at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:453) at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:415) at org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:294) at org.springframework.social.facebook.api.impl.FacebookTemplate.post(FacebookTemplate.java:216) at org.springframework.social.facebook.api.impl.LikeTemplate.like(LikeTemplate.java:38) at com.social.controller.FacebookConnectController.getPost(FacebookConnectController.java:128) ... 30 more Caused by: java.io.IOException: Server returned HTTP response code: 400 for URL: https://graph.facebook.com/100001545091818_180072978720871/likes at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1313) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234) at org.springframework.http.client.SimpleClientHttpResponse.getBody(SimpleClientHttpResponse.java:77) at org.springframework.social.support.BufferingClientHttpResponse.getBody(BufferingClientHttpResponse.java:58) at org.springframework.social.facebook.api.impl.FacebookErrorHandler.hasError(FacebookErrorHandler.java:65) at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:439) ... 35 more Thanks in advance.

    Spring JIRA | 5 years ago | Alexander Nalbandyan
    java.lang.reflect.InvocationTargetException
  3. 0

    URLConnection Error - java.io.IOException: Server returned HTTP response code: 400 for URL

    Stack Overflow | 6 years ago | Aardvocate Akintayo Olusegun
    java.io.IOException: Server returned HTTP response code: 400 for URL: https://graph.facebook.com/me
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Issue 162 - google-api-translate-java - [google-api-translate-java] Error retrieving translation. - Enables using Google Translate from a Java application - Google Project Hosting

    google.com | 11 months ago
    com.google.api.GoogleAPIException: java.lang.Exception: [google-api-translate-java] Error retrieving translation.
  6. 0

    Server returned HTTP response code: 401 for url when using shopify API

    Stack Overflow | 1 year ago | gates
    java.io.IOException: Server returned HTTP response code: 401 for URL: https://apikey:password@go-frugal.myshopify.com/admin/orders.json
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.io.IOException

    Server returned HTTP response code: 400 for URL: https://graph.facebook.com/100001545091818_180072978720871/likes

    at sun.net.www.protocol.http.HttpURLConnection.getInputStream()
  2. Java RT
    HttpsURLConnectionImpl.getInputStream
    1. sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1313)
    2. sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
    2 frames
  3. Spring
    SimpleClientHttpResponse.getBody
    1. org.springframework.http.client.SimpleClientHttpResponse.getBody(SimpleClientHttpResponse.java:77)
    1 frame
  4. Foundational module containing the ServiceProvider Connect Framework and Service API invocation support.
    BufferingClientHttpResponse.getBody
    1. org.springframework.social.support.BufferingClientHttpResponse.getBody(BufferingClientHttpResponse.java:58)
    1 frame
  5. Facebook API
    FacebookErrorHandler.hasError
    1. org.springframework.social.facebook.api.impl.FacebookErrorHandler.hasError(FacebookErrorHandler.java:65)
    1 frame
  6. Spring
    RestTemplate.postForObject
    1. org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:439)
    2. org.springframework.web.client.RestTemplate.execute(RestTemplate.java:415)
    3. org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:294)
    3 frames
  7. Facebook API
    LikeTemplate.like
    1. org.springframework.social.facebook.api.impl.FacebookTemplate.post(FacebookTemplate.java:216)
    2. org.springframework.social.facebook.api.impl.LikeTemplate.like(LikeTemplate.java:38)
    2 frames
  8. com.social.controller
    FacebookConnectController.getPost
    1. com.social.controller.FacebookConnectController.getPost(FacebookConnectController.java:128)
    1 frame
  9. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  10. Spring
    HandlerMethodInvoker.invokeHandlerMethod
    1. org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
    1 frame
  11. Spring MVC
    FrameworkServlet.doPost
    1. org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426)
    2. org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414)
    3. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
    4. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
    5. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
    6. org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
    6 frames
  12. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
    2. javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    2 frames
  13. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
    4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
    5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
    6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
    7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    8. org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
    9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:399)
    10 frames
  14. Grizzly HTTP
    JIoEndpoint$SocketProcessor.run
    1. org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:317)
    2. org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:204)
    3. org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:182)
    4. org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311)
    4 frames
  15. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    3. java.lang.Thread.run(Thread.java:619)
    3 frames