syndesisio / syndesis-verifier

Syndesis Verifier Service
Apache License 2.0
2 stars 8 forks source link

Salesforce Validation Error #8

Closed chirino closed 7 years ago

chirino commented 7 years ago

Getting the following error validating against Salesforce:

Unexpected error {200:OK} executing {GET:https://na30.salesforce.com/services/data/}

verifier logs showed:

2017-04-26 21:25:49.390  INFO 1 --- [ XNIO-2 task-23] c.r.i.verifier.impl.SalesforceVerifier   : PING: salesforce-upsert-contact === OK
2017-04-26 21:25:49.391  INFO 1 --- [ XNIO-2 task-23] o.a.c.util.jsse.SSLContextParameters     : Available providers: SUN version 1.8.
2017-04-26 21:25:49.496  INFO 1 --- [ XNIO-2 task-23] o.a.c.c.s.internal.SalesforceSession     : Login at Salesforce loginUrl: https://login.salesforce.com/services/oauth2/token
2017-04-26 21:25:50.072  INFO 1 --- [ XNIO-2 task-23] o.a.c.c.s.internal.SalesforceSession     : Login successful
2017-04-26 21:25:50.427  INFO 1 --- [ XNIO-2 task-23] o.a.c.c.s.internal.SalesforceSession     : Logout successful
2017-04-26 21:25:50.430  INFO 1 --- [ XNIO-2 task-23] o.eclipse.jetty.client.ResponseNotifier  : Exception while notifying listener org.apache.camel.component.salesforce.internal.client.AbstractClientBase$1@24545a22

java.lang.NullPointerException: null
    at org.apache.camel.component.salesforce.SalesforceComponentVerifier.lambda$processSalesforceException$1(SalesforceComponentVerifier.java:151) ~[camel-salesforce-2.19.0.fuse-000020.jar!/:2.19.0.fuse-000020]
    at java.util.Optional.ifPresent(Optional.java:159) ~[na:1.8.0_111]
    at org.apache.camel.component.salesforce.SalesforceComponentVerifier.processSalesforceException(SalesforceComponentVerifier.java:144) ~[camel-salesforce-2.19.0.fuse-000020.jar!/:2.19.0.fuse-000020]
    at org.apache.camel.component.salesforce.SalesforceComponentVerifier.lambda$verifyConnectivity$0(SalesforceComponentVerifier.java:115) ~[camel-salesforce-2.19.0.fuse-000020.jar!/:2.19.0.fuse-000020]
    at org.apache.camel.component.salesforce.internal.client.DefaultRestClient$DelegatingClientCallback.onResponse(DefaultRestClient.java:497) ~[camel-salesforce-2.19.0.fuse-000020.jar!/:2.19.0.fuse-000020]
    at org.apache.camel.component.salesforce.internal.client.AbstractClientBase$1.onComplete(AbstractClientBase.java:152) ~[camel-salesforce-2.19.0.fuse-000020.jar!/:2.19.0.fuse-000020]
    at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:193) [jetty-client-9.4.2.v20170220.jar!/:9.4.2.v20170220]
    at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:185) [jetty-client-9.4.2.v20170220.jar!/:9.4.2.v20170220]
    at org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:459) [jetty-client-9.4.2.v20170220.jar!/:9.4.2.v20170220]
    at org.eclipse.jetty.client.HttpReceiver.abort(HttpReceiver.java:540) [jetty-client-9.4.2.v20170220.jar!/:9.4.2.v20170220]
    at org.eclipse.jetty.client.HttpChannel.abortResponse(HttpChannel.java:129) [jetty-client-9.4.2.v20170220.jar!/:9.4.2.v20170220]
    at org.eclipse.jetty.client.HttpChannel.abort(HttpChannel.java:122) [jetty-client-9.4.2.v20170220.jar!/:9.4.2.v20170220]
    at org.eclipse.jetty.client.HttpExchange.abort(HttpExchange.java:257) [jetty-client-9.4.2.v20170220.jar!/:9.4.2.v20170220]
    at org.eclipse.jetty.client.HttpConversation.abort(HttpConversation.java:141) [jetty-client-9.4.2.v20170220.jar!/:9.4.2.v20170220]
    at org.eclipse.jetty.client.HttpRequest.abort(HttpRequest.java:708) [jetty-client-9.4.2.v20170220.jar!/:9.4.2.v20170220]
    at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.abort(HttpConnectionOverHTTP.java:166) [jetty-client-9.4.2.v20170220.jar!/:9.4.2.v20170220]
    at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.close(HttpConnectionOverHTTP.java:152) [jetty-client-9.4.2.v20170220.jar!/:9.4.2.v20170220]
    at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.close(HttpConnectionOverHTTP.java:143) [jetty-client-9.4.2.v20170220.jar!/:9.4.2.v20170220]
    at java.util.ArrayList.forEach(ArrayList.java:1249) ~[na:1.8.0_111]
    at org.eclipse.jetty.client.AbstractConnectionPool.close(AbstractConnectionPool.java:191) ~[jetty-client-9.4.2.v20170220.jar!/:9.4.2.v20170220]
    at org.eclipse.jetty.client.DuplexConnectionPool.close(DuplexConnectionPool.java:233) ~[jetty-client-9.4.2.v20170220.jar!/:9.4.2.v20170220]
    at org.eclipse.jetty.client.HttpDestination.close(HttpDestination.java:369) ~[jetty-client-9.4.2.v20170220.jar!/:9.4.2.v20170220]
    at org.eclipse.jetty.client.HttpClient.doStop(HttpClient.java:247) ~[jetty-client-9.4.2.v20170220.jar!/:9.4.2.v20170220]
    at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89) ~[jetty-util-9.4.2.v20170220.jar!/:9.4.2.v20170220]
    at org.apache.camel.component.salesforce.SalesforceComponentVerifier.verifyConnectivity(SalesforceComponentVerifier.java:120) ~[camel-salesforce-2.19.0.fuse-000020.jar!/:2.19.0.fuse-000020]
    at org.apache.camel.impl.verifier.DefaultComponentVerifier.verify(DefaultComponentVerifier.java:62) ~[camel-core-2.19.0.fuse-000020.jar!/:2.19.0.fuse-000020]
    at org.apache.camel.component.connector.DefaultConnectorComponent.lambda$getVerifier$0(DefaultConnectorComponent.java:144) ~[camel-connector-2.19.0.fuse-000020.jar!/:2.19.0.fuse-000020]
    at com.redhat.ipaas.verifier.impl.BaseVerifier.verify(BaseVerifier.java:58) ~[classes!/:na]
    at com.redhat.ipaas.verifier.v1.VerifierEndpoint.verify(VerifierEndpoint.java:46) ~[classes!/:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_111]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_111]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_111]
    at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140) ~[resteasy-jaxrs-3.1.0.Final.jar!/:3.1.0.Final]
    at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:294) ~[resteasy-jaxrs-3.1.0.Final.jar!/:3.1.0.Final]
    at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:248) ~[resteasy-jaxrs-3.1.0.Final.jar!/:3.1.0.Final]
    at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:235) ~[resteasy-jaxrs-3.1.0.Final.jar!/:3.1.0.Final]
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:398) ~[resteasy-jaxrs-3.1.0.Final.jar!/:3.1.0.Final]
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:205) ~[resteasy-jaxrs-3.1.0.Final.jar!/:3.1.0.Final]
    at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:221) ~[resteasy-jaxrs-3.1.0.Final.jar!/:3.1.0.Final]
    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) ~[resteasy-jaxrs-3.1.0.Final.jar!/:3.1.0.Final]
    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) ~[resteasy-jaxrs-3.1.0.Final.jar!/:3.1.0.Final]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[javax.servlet-api-3.1.0.jar!/:3.1.0]
    at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55) ~[spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:108) ~[spring-boot-actuator-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105) ~[spring-web-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) ~[spring-web-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) ~[spring-web-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:106) ~[spring-boot-actuator-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) ~[undertow-core-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) ~[undertow-core-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) ~[undertow-core-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.server.Connectors.executeRootHandler(Connectors.java:211) ~[undertow-core-1.4.11.Final.jar!/:1.4.11.Final]
    at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:809) ~[undertow-core-1.4.11.Final.jar!/:1.4.11.Final]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_111]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_111]
    at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_111]

2017-04-26 21:25:50.440  INFO 1 --- [ XNIO-2 task-23] c.r.i.verifier.impl.SalesforceVerifier   : PING: salesforce-upsert-contact === ERROR
2017-04-26 21:25:50.441 ERROR 1 --- [ XNIO-2 task-23] c.r.i.verifier.impl.SalesforceVerifier   : salesforce-upsert-contact --> 
2017-04-26 21:25:50.441 ERROR 1 --- [ XNIO-2 task-23] c.r.i.verifier.impl.SalesforceVerifier   :    exception : Unexpected error {200:OK} executing {GET:https://na30.salesforce.com/services/data/}
zregvart commented 7 years ago

The NPE is due to SalesforceException::getErrors() returning null.

I still need to find out why 200 status triggers SalesforceException.

zregvart commented 7 years ago

So the NullPointerException should be fixed with CAMEL-11210, and there is a pull request in review for the race condition between HttpClient::doStop and the request (not)being complete at PR#1666 that I think should sort this out. However, I have not been able to reproduce this issue so nothing is for certain.

zregvart commented 7 years ago

I'm closing this as CAMEL-11212 has been resolved in Camel.