1 2 3 Previous Next 31 Replies Latest reply on Aug 30, 2016 7:43 AM by m.ardito

    Need to get data from Mailup email marketing platform

    m.ardito

      This is something I never did before, but it could turn out really useful.

      I already tested google spreadsheets DS, in the past, and that worked, but this is somewhat different, and I need directions and advices.

       

      This is the platform https://en.wikipedia.org/wiki/MailUp

      And this is the info page to use their web API: http://help.mailup.com/display/mailupapi/Introducing+the+MailUp+API

       

      Since the google spreadsheets DS probably uses a dedicated "google spreadsheet" translator, I thought to try to "convert" the quickstarts twitter example tp use their REST API instead

      which is describerd here: http://help.mailup.com/display/mailupapi/REST+API

       

      To me, the twitter example seems to be independent of a custom"twitter" translator (assuming I'm using the right teiid terms...)

       

      And, the above links states that Mailup API "uses Oauth2 and requires a token refresh".

       

      To be sure, I used their Ready to go in 15 minutes - MailUp API - MailUp Docs guide, downladed a php demo client, installed on my server, and it works. I login using user credentials, get a token, and then I can issue GET queries, obtaining JSON responses

       

      Now, as a beginner, how can I put the pieces together, and start getting data through Teiid?

       

      Thanks for any help,

      Marco

        • 1. Re: Need to get data from Mailup email marketing platform
          rareddy

          Marco,

           

          It really depends upon what you want to do. You can go like Twitter example route and use existing web invocation methods ("ws" translator) and write views/stored procedures that parse the response into a structure you want. You want to take this approach if you just trying to support a single application.

           

          If you trying to support this a feature, then it is appropriate to develop a translator. You can extend the "ws" translator for web-tier (ex: odata, odata4, swagger) then capture different REST calls to MailUp in a SQL type interface. i.e. automatically provide the request/response parsing inside the translator.  Look at Translator Development · Teiid Documentation

           

          BTW, If they have Swagger API, you can use that Swagger translator, otherwise if you can create a Swagger file for this MailUp API, then also you can use the Swagger translator.


          Ramesh..

          • 2. Re: Need to get data from Mailup email marketing platform
            m.ardito

            Thanks.

             

            I am struggling to make the first path work, just to learn, and keep things simple as possible, but I have not yet succeeded... it feels some bit is missing.

             

            I have a "mailup" client id/secret (you get that with a free developer account, which can create one or more applications, each with its client id/secret pair)

            and using those credentials with the code examples provided by mailup, mailup, they work.

             

            After reading relevant mailup documentation pages for rest developers here

            Authorization and authentication - MailUp API - MailUp Docs

            Authorization code grant flow - MailUp API - MailUp Docs

             

            And trying code examples, I think that in those code examples, it performs a kind of request somewhat different than how teiid examples show, imho:

             

            This is the (php) class builder code:

            ==========================

            function MailUpClient($inClientId, $inClientSecret, $inCallbackUri) {

                $this->logonEndpoint = "https://services.mailup.com/Authorization/OAuth/LogOn";

                $this->authorizationEndpoint = "https://services.mailup.com/Authorization/OAuth/Authorization";

                $this->tokenEndpoint = "https://services.mailup.com/Authorization/OAuth/Token";

                $this->consoleEndpoint = "https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc";

                $this->mailstatisticsEndpoint = "https://services.mailup.com/API/v1.1/Rest/MailStatisticsService.svc";

             

                $this->clientId = $inClientId;

                $this->clientSecret = $inClientSecret;

                $this->callbackUri = $inCallbackUri;

                $this->loadToken(); //<= this just tries loading tokens if previously stored in cookies.

            }

            ==========================

             

            They split account for users (people using the mailing services) and developers (creating applications).

            When requesting access token, Mailup code issues a single request providing both the client id/secret and the user id/password.

             

            eg:

            ==========================

            function retreiveAccessToken($login, $password) {

                    $url = $this->getTokenEndpoint(); //reads <="https://services.mailup.com/Authorization/OAuth/Token";

               

                    $curl = curl_init();

                    curl_setopt($curl, CURLOPT_URL, $url);

                    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

                    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);

                    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);

                    curl_setopt($curl, CURLOPT_POST, 1);

             

                    // here below the body of the request contains both client id/secret and user id/password

                    //grant type is "password"

                    //docs say:

                    /*

                      Being OAuth v2 a framework, several authorization flows are supported; they are named "Grants" and can be listed as follows:

                           Authorization code grant;

                           Implicit grant;

                          Resource owner password grant;

                          Client credentials grant.

                    */

                    //perhaps I should request another grant type? which?

             

                    $body = "grant_type=password&username=".$login."&password=".$password."&client_id=".$this->clientId."&client_secret=".$this->clientSecret;

             

                    $headers = array();

                    $headers["Content-length"] = strlen($body);

                    $headers["Accept"] = "application/json";

                    $headers["Authorization"] = "Basic ".base64_encode($this->clientId.":".$this->clientSecret);

               

                    curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);

                    curl_setopt($curl, CURLOPT_POSTFIELDS, $body);

               

                    $result = curl_exec($curl);

                    $code = curl_getinfo($curl, CURLINFO_HTTP_CODE);

                    curl_close($curl);

               

                    if ($code != 200 && $code != 302) throw new MailUpException($code, "Authorization error");

               

                    $result = json_decode($result);

               

                    $this->accessToken = $result->access_token;

                    $this->refreshToken = $result->refresh_token;

               

                    $this->saveToken(); //<= this tries to save tokens in cookies (see last line of the MailUpClient function, above)

               

                    return $this->accessToken;

            }

            ==========================

             

            But, if I follow twitterQS examples or Expose Twitter data in Teiid, using OAuth Authorization

            I should use the script   "teiid-oauth-util.sh"

             

            But this script only asks client id/secret, and it also seems to ask different infos (or in a different way) than in that wiki doc above:

             

             

            Eg: apart different input strings, authorization URL is asked first, and not the token url.

            I understand that the wiki article is about oauth 1.0, and mailup api  is oauth 2.0, but the twitterQS is pointing there...

             

            Anyway, if I tried providing any of those

            ==================

                $this->authorizationEndpoint = "https://services.mailup.com/Authorization/OAuth/Authorization";

                $this->tokenEndpoint = "https://services.mailup.com/Authorization/OAuth/Token";

            ==================

             

            But nothing works, at different levels

             

            using

            "Enter the User Authorization URL = https://services.mailup.com/Authorization/OAuth/Authorization"

             

            gives this page:

             

            while using

            "Enter the User Authorization URL = https://services.mailup.com/Authorization/OAuth/Token"

             

            gives

             

             

            Now, I am lost... is a different method needed in Teiid? Or it can't work in this way?

             

            On the other hand, when I am logged interactively as a developer I can see a page promoting so many other existing integrations/plugins,

             

             

            So I feel this can be made working, but I can't solve Teiid way, by myself...

             

            Can you, or someone else help me (and perhaps many others, too?)?

             

            Marco

            • 3. Re: Need to get data from Mailup email marketing platform
              rareddy

              You do not have to use "teiid-oauth-util.sh", you can define your way to come up with access token and provide to Teiid in the configuration. The flow of OAuth is little different for each, in future we may need to write a different plugins for teiid-oauth-util supporting individual sources. You are welcome to contribute for mailup.

              • 4. Re: Need to get data from Mailup email marketing platform
                m.ardito

                I understand better now.

                 

                I've managed to get access/refresh tokens for mu "mailup application" manually, so now I am quite sure about the oauth authorization workflow.

                 

                What I would like to do next is begin creating a static credentials domain for my application and my mailup "mailing" user, then, maybe, even try to extend the default oauth 2.0 login module to enable true delegation, as you suggested in that teiid wiki page, and create a "mailup" specific one. This will take some time, though

                 

                Also, would it be possible to create just a specifically configured ws/oauth resource adapter, without having to create a specific security domain first? Since "mailup" alows rest authorization in a single step, giving to the connection definition both client id/secret and user id/password (thus obtaining access/refresh tokens), could I configure the RA with all credentials needed?

                 

                What would I need to do for this to work, if it is possible at all? It could be something similar to the google spreadsheet approach (but without the specific translator, so all the conversion from json to sql table shoud still be done in the vdb using that resource adapter)?

                 

                ...does this make any sense?

                Marco

                • 5. Re: Need to get data from Mailup email marketing platform
                  rareddy

                  Still follow the article but skip the "teiid-oauth-util.sh", i.e with access token you got create the JAAS security-domain and use that as "security-domain" for your "ws" resource-adapter that is calling the mailup.

                  • 6. Re: Need to get data from Mailup email marketing platform
                    m.ardito

                    I need to adapt somewhat the twitter example, for MailUp

                     

                    1) the security domain

                     

                    the example in the wiki is:

                     

                    <security-domain name="oauth-security">

                        <authentication>

                            <login-module code="org.teiid.jboss.webservices.OAuth10LoginModule" flag="required" module="org.jboss.teiid">

                                <module-option name="consumer-key" value="muxw4rlZ8GJnvEcB3zLZxIBPo"/>

                                <module-option name="consumer-secret" value="oThgMitGa0zACpDUjPWFMM7RjxjHHAcolxkaH3PmdCDrfwMmgO"/>

                                <module-option name="access-key" value="15451665-yB69O3Rww8V4C2Y5ArnJHqYpQHrhFAbISoEBxGTYW"/>

                                <module-option name="access-secret" value="EmIpXOeTG9bikaRUCiX26XTPzvt8BH00GPKhtUuHlAhEH"/>

                            </login-module>

                        </authentication>

                    </security-domain>

                     

                    here

                    teiid/jboss-security/src/main/java/org/teiid/jboss/oauth at master · teiid/teiid · GitHub

                    I see there is both OAuth10LoginModule.java and OAuth20LoginModule.java, and I need Oauth2.

                     

                    And, in the notes, Steven said:

                    "Teiid 8.11 Alpha1 and later will use the module org.jboss.teiid.security rather than org.teiid.jboss for the login modules."

                     

                    if I look at the login.module start tag, I see both org.teiid.jboss used in code param, and org.jboss.teiid used in module param.

                    I see the wiki article has only "version 1" so I feel this wiki article has not been updated, so

                     

                    how should that line become? like this?

                    <login-module code="org.teiid.jboss.webservices.OAuth20LoginModule" flag="required" module="org.jboss.teiid.security">

                     

                    2) how and where  use tokens

                     

                    as said, I have used only google spreadsheet ra/connections before, but those are also done different, they have a specific translator, but I don't need to setup a specific security domain...

                     

                    Anyway, in that case, as docs say, I configured the connection-definitions as properties like authmethod: (oauth2) and refreshtoken.

                    Now I have access and refresh token, and need to use oauth2:

                     

                    Should I put these values

                    - as login module options or

                    - as connection definition properties

                    ?

                     

                    3) request headers

                     

                    studying the demo code provided by MailUp, I see they support POST, PUT. DELETE and GET requests

                    Since I am mostly interested in getting data from MailUp, I guess I should specify the GET option and method in the invokeHTTP CALL, in the VDB.

                     

                    But in the demo code the request is done using curl, and also specific http headers are specified like:

                    Content-type:  <application/json | application/xml >

                    Content-length:<0 for GET requests>

                    Accept: <JSON | XML >

                    Authorization: Bearer <AccessToken>

                     

                    Should I specify those using the invokeHTTP call in the VDB, like in the docs at Web Services Translator · Teiid Documentation ?

                    "call invokeHttp(... headers=>jsonObject('application/json' as "Content-Type", jsonArray('gzip', 'deflate') as "Accept-Encoding"))"

                     

                    I am sorry to post all these questions, but this is the very first time I need to deal with this topic, and I need to learn the basics, but I need to make them work in Teiid.

                    I already understood those basics in the php code, but now I need to adapt that knowledge to Teiid inner workings...

                     

                    Marco

                    • 7. Re: Need to get data from Mailup email marketing platform
                      m.ardito

                      I tried to follow twitter example to my best, but isn't working in squirrel.

                      note: in the following, every "xxxxxxxxx" stands for id/codes/tokens, but I use working values (they work in php)

                       

                      1) I created security domain, loading it through the web manager, but is is now reflected in the standalone-teiid.xml

                       

                      <security-domain name="MUP-oauth2-security">

                          <authentication>

                              <login-module code="org.teiid.jboss.oauth.OAuth20LoginModule" flag="required" module="org.jboss.teiid.security">

                                  <module-option name="client-id" value="xxxxxxxxx"/>

                                  <module-option name="client-secret" value="xxxxxxxxx"/>

                                  <module-option name="refresh-token" value="xxxxxxxxx"/> 

                                  <module-option name="access-token-uri" value="https://services.mailup.com/Authorization/OAuth/Token"/>         

                              </login-module>

                          </authentication>

                      </security-domain>

                       

                      had to reload the server, after.

                       

                      2) I created a resource adapter and connection definition:

                       

                      <resource-adapter id="MUP-webservice"> 

                          <module slot="main" id="org.jboss.teiid.resource-adapter.webservice"/> 

                          <transaction-support>NoTransaction</transaction-support> 

                          <connection-definitions> 

                              <connection-definition class-name="org.teiid.resource.adapter.ws.WSManagedConnectionFactory" jndi-name="java:/mailupDS" enabled="true" use-java-context="true" pool-name="teiid-ws-ds"> 

                                  <config-property name="SecurityType"> 

                                      OAuth 

                                  </config-property> 

                                  <security> 

                                      <security-domain>MUP-oauth2-security</security-domain> 

                                  </security> 

                              </connection-definition> 

                          </connection-definitions> 

                      </resource-adapter> 

                       

                      had to reload the server, after.

                       

                      3) I deployed (success, active) a VDB using the jndi:

                       

                      <?xml version="1.0" encoding="UTF-8" standalone="yes"?> 

                      <vdb name="mailup" version="1"> 

                          <description>Shows how to call Web Services</description> 

                          <model name="comunicazioni"> 

                              <source name="comunicazioni" translator-name="rest" connection-jndi-name="java:/mailupDS"/> 

                          </model> 

                          <translator name="rest" type="ws"> 

                              <property name="DefaultBinding" value="HTTP"/> 

                              <property name="DefaultServiceMode" value="MESSAGE"/> 

                          </translator> 

                      </vdb>

                       

                      4) connected to the vdb, in sqirrelsql, and tried the invokeHttp method like

                       

                      select mup.* from 

                      (call comunicazioni.invokeHTTP(endpoint=>'https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/User/Lists', action=>'GET', headers=>jsonObject('application/json' as "Content-Type", 'application/json' as "Accept",0 as  "Content-length"))) w,  

                      XMLTABLE('/Items' passing JSONTOXML('Items', w.result) columns 

                      company string PATH 'Company', 

                      nome string PATH 'Name', 

                      id_list string PATH 'idList') mup; 

                       

                      or

                       

                      select mup.* from 

                      (call comunicazioni.invokeHTTP(endpoint=>'https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/User/Lists', action=>'GET', headers=>jsonObject('application/json' as "Content-Type", 'application/json' as "Accept",0 as  "Content-length", 'Bearer xxxxxxxxx' as "Authorization"))) w,  

                      XMLTABLE('/Items' passing JSONTOXML('Items', w.result) columns 

                      company string PATH 'Company', 

                      nome string PATH 'Name', 

                      id_list string PATH 'idList') mup; 

                       

                       

                      ...but it always fails, always with

                       

                      Error: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 comunicazioni: javax/ws/rs/client/ClientException

                      SQLState:  50000

                      ErrorCode: 30504

                       

                      Can someone help to spot what's wrong?

                       

                      Thanks,

                      Marco

                      • 8. Re: Need to get data from Mailup email marketing platform
                        rareddy

                        Marco,

                         

                        That looks good, I see all the steps required. You are very close. Do you by chance have a full stack trace to see what is wrong?

                         

                        Ramesh..

                        • 9. Re: Need to get data from Mailup email marketing platform
                          m.ardito

                          Thanks,

                           

                          this is the full stack when executing either squirrel request

                           

                          (updated, was missing last part)

                           

                          2016-07-26 13:16:34,109 ERROR [org.teiid.CONNECTOR] (Worker0_QueryProcessorQueue61) P8QCt6jWv5/F Connector worker process failed for atomic-request=P8QCt6jWv5/F.7.4.35838: java.lang.NoClassDefFoundError: javax/ws/rs/client/ClientException

                                  at org.apache.cxf.rs.security.oauth2.client.OAuthClientUtils.getAccessToken(OAuthClientUtils.java:287)

                                  at org.apache.cxf.rs.security.oauth2.client.OAuthClientUtils.getAccessToken(OAuthClientUtils.java:211)

                                  at org.teiid.jboss.oauth.OAuth20CredentialImpl.getAccessToken(OAuth20CredentialImpl.java:64)

                                  at org.teiid.jboss.oauth.OAuth20CredentialImpl.getAuthorizationHeader(OAuth20CredentialImpl.java:40)

                                  at org.teiid.resource.adapter.ws.WSConnectionImpl$HttpDispatch.invoke(WSConnectionImpl.java:186)

                                  at org.teiid.resource.adapter.ws.WSConnectionImpl$HttpDispatch.invoke(WSConnectionImpl.java:123)

                                  at org.teiid.translator.ws.BinaryWSProcedureExecution.execute(BinaryWSProcedureExecution.java:156)

                                  at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:359)

                                  at sun.reflect.GeneratedMethodAccessor101.invoke(Unknown Source)

                                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                                  at java.lang.reflect.Method.invoke(Method.java:606)

                                  at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)

                                  at com.sun.proxy.$Proxy41.execute(Unknown Source)

                                  at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)

                                  at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)

                                  at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)

                                  at java.util.concurrent.FutureTask.run(FutureTask.java:262)

                                  at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)

                                  at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)

                                  at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)

                                  at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)

                                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

                                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

                                  at java.lang.Thread.run(Thread.java:745)

                          Caused by: java.lang.ClassNotFoundException: javax.ws.rs.client.ClientException from [Module "org.apache.cxf.impl.frontend-jaxrs:main" from local module loader @5c21bae0 (finder: local module finder @2a73f761 (roots: /opt/test/teiid-9.0.0.Beta1/modules,/opt/test/teiid-9.0.0.Beta1/modules/system/layers/dv,/opt/test/teiid-9.0.0.Beta1/modules/system/layers/base))]

                                  at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205)

                                  at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:455)

                                  at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:404)

                                  at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:385)

                                  at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:130)

                                  ... 24 more

                           

                          2016-07-26 13:16:34,171 WARN  [org.teiid.PROCESSOR] (Worker2_QueryProcessorQueue62) P8QCt6jWv5/F TEIID30020 Processing exception for request P8QCt6jWv5/F.7 'TEIID30504 comunicazioni: javax/ws/rs/client/ClientException'. Originally TeiidProcessingException 'javax.ws.rs.client.ClientException from [Module "org.apache.cxf.impl.frontend-jaxrs:main" from local module loader @5c21bae0 (finder: local module finder @2a73f761 (roots: /opt/test/teiid-9.0.0.Beta1/modules,/opt/test/teiid-9.0.0.Beta1/modules/system/layers/dv,/opt/test/teiid-9.0.0.Beta1/modules/system/layers/base))]' ModuleClassLoader.java:205. Enable more detailed logging to see the entire stacktrace.

                          • 10. Re: Need to get data from Mailup email marketing platform
                            rareddy

                            What version of Teiid are you using?

                            • 11. Re: Need to get data from Mailup email marketing platform
                              m.ardito

                              This is still a 9.0.0 Beta1, but if you think it could be related, I can test a newer stable version... not before tomorrow, I fear.

                              • 12. Re: Need to get data from Mailup email marketing platform
                                rareddy

                                I would suggest going to 9.0.2 https://repository.jboss.org/nexus/service/local/repositories/releases/content/org/jboss/teiid/teiid/9.0.2/teiid-9.0.2-w…

                                 

                                I found the issue, we had a patch to CXF before, it is no longer needed with new version of the CXF in 9.0 series. If you can remove the "cxf-rt-oauth2-patch.jar" in "modules/system/layers/dv/org/apache/cxf/impl/frontend-jaxrs/main" directory, and also remove from "module.xml" in same directory and restart the server and use your first SQL, then you should see above exception gone.

                                 

                                Also please log JIRA for this please.

                                 

                                Ramesh..

                                • 13. Re: Need to get data from Mailup email marketing platform
                                  m.ardito

                                  I would suggest going to 9.0.2...

                                  I found the issue...

                                  Also please log JIRA for this please.

                                   

                                  thanks for the infos, and the bypass procedure, I will test it asap.

                                  I will also log that on JIRA, tomorrow, but does the above mean that also 9.0.2 is affected?

                                   

                                  Marco

                                  • 14. Re: Need to get data from Mailup email marketing platform
                                    m.ardito

                                    btw, I just did what you suggested: removed that jar and removed it from the xml. then stopped and then restarted the server.

                                     

                                    But, still, whan I issue in squirrel

                                     

                                    select mup.* from

                                    (call comunicazioni.invokeHTTP(endpoint=>'https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/User/Lists', action=>'GET', headers=>jsonObject('application/json' as "Content-Type", 'application/json' as "Accept",0 as  "Content-length"))) w,  

                                    XMLTABLE('/Items' passing JSONTOXML('Items', w.result) columns

                                    company string PATH 'Company',

                                    nome string PATH 'Name',

                                    id_list string PATH 'idList') mup;

                                     

                                    I get a similar, but different error:

                                    edit: this also happens with teiid 9.0.2, after removing the same patch.

                                     

                                    09:09:47,014 ERROR [org.teiid.CONNECTOR] (Worker2_QueryProcessorQueue18) dTGm9u9Yq5cY Connector worker process failed for atomic-request=dTGm9u9Yq5cY.6.4.1: org.apache.cxf.rs.security.oauth2.provider.OAuthServiceException: server_error

                                            at org.apache.cxf.rs.security.oauth2.client.OAuthClientUtils.getAccessToken(OAuthClientUtils.java:294)

                                            at org.apache.cxf.rs.security.oauth2.client.OAuthClientUtils.getAccessToken(OAuthClientUtils.java:211)

                                            at org.teiid.jboss.oauth.OAuth20CredentialImpl.getAccessToken(OAuth20CredentialImpl.java:64)

                                            at org.teiid.jboss.oauth.OAuth20CredentialImpl.getAuthorizationHeader(OAuth20CredentialImpl.java:40)

                                            at org.teiid.resource.adapter.ws.WSConnectionImpl$HttpDispatch.invoke(WSConnectionImpl.java:186)

                                            at org.teiid.resource.adapter.ws.WSConnectionImpl$HttpDispatch.invoke(WSConnectionImpl.java:123)

                                            at org.teiid.translator.ws.BinaryWSProcedureExecution.execute(BinaryWSProcedureExecution.java:156)

                                            at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:359)

                                            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.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)

                                            at com.sun.proxy.$Proxy42.execute(Unknown Source)

                                            at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)

                                            at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)

                                            at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)

                                            at java.util.concurrent.FutureTask.run(FutureTask.java:262)

                                            at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)

                                            at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)

                                            at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)

                                            at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)

                                            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

                                            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

                                            at java.lang.Thread.run(Thread.java:745)

                                     

                                    09:09:47,018 ERROR [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue19) dTGm9u9Yq5cY TEIID30019 Unexpected exception for request dTGm9u9Yq5cY.6: org.apache.cxf.rs.security.oauth2.provider.OAuthServiceException: server_error

                                            at org.apache.cxf.rs.security.oauth2.client.OAuthClientUtils.getAccessToken(OAuthClientUtils.java:294)

                                            at org.apache.cxf.rs.security.oauth2.client.OAuthClientUtils.getAccessToken(OAuthClientUtils.java:211)

                                            at org.teiid.jboss.oauth.OAuth20CredentialImpl.getAccessToken(OAuth20CredentialImpl.java:64)

                                            at org.teiid.jboss.oauth.OAuth20CredentialImpl.getAuthorizationHeader(OAuth20CredentialImpl.java:40)

                                            at org.teiid.resource.adapter.ws.WSConnectionImpl$HttpDispatch.invoke(WSConnectionImpl.java:186)

                                            at org.teiid.resource.adapter.ws.WSConnectionImpl$HttpDispatch.invoke(WSConnectionImpl.java:123)

                                            at org.teiid.translator.ws.BinaryWSProcedureExecution.execute(BinaryWSProcedureExecution.java:156)

                                            at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:359)

                                            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.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)

                                            at com.sun.proxy.$Proxy42.execute(Unknown Source)

                                            at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)

                                            at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)

                                            at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)

                                            at java.util.concurrent.FutureTask.run(FutureTask.java:262)

                                            at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)

                                            at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)

                                            at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)

                                            at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)

                                            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

                                            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

                                            at java.lang.Thread.run(Thread.java:745)

                                    1 2 3 Previous Next