Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-6004

Getting and error while configuring oAuth2 with Teiid.

    Details

    • Sprint:
      DV Sprint 66
    • Story Points:
      0.5

      Description

      We need to read the Flat file from Google storage(bucket). so that we are following the steps mention in this ticket  TEIID-5940".

      So it is mentioned that we will have to make web service data source and will have to configure google credentials into it. 

      So to create a datasource below steps has been provided but getting and error in final step.

      Refered below URL for steps.

      http://teiid.github.io/teiid-documents/master/content/admin/OAuth_Authentication_With_REST_Based_Services.html

       

      C:\Softwares\teiid-wildfly-14.0.0-server1\teiid-14.0.0\bin>teiid-oauth-util.bat
      Select type of OAuth authentication
      1) OAuth 1.0A
      2) OAuth 2.0
      3) OAuth 2.0 - Facebook

      2
      === OAuth 2.0 Workflow ===

      Enter the Client ID = dfgfdg-dfgdfg.apps.googleusercontent.com

      Enter the Client Secret = dfgd-obggh_unnng_SDD

      Enter the User Authorization URL = https://accounts.google.com/o/oauth2/auth

      Enter scope (hit enter for none) = profile

      Enter callback URL (default: urn:ietf:wg:oauth:2.0:oob) =

      Cut & Paste the URL in a web browser, and Authticate
      Authorize URL = https://accounts.google.com/o/oauth2/auth?client_id=fdfdsfdsdfsdfsdf

      Enter Token Secret (Auth Code, Pin) from previous step = 4/2QdsfdsfEZvSxCK5yEPNJCYcbdsfsd

      Enter the Access Token URL = https://www.googleapis.com/oauth2/v3/token

      Jul 30, 2020 5:29:04 PM org.apache.cxf.configuration.jsse.SSLUtils loadDefaultKeyManagers
      WARNING: Default key managers cannot be initialized: Password must not be null
      java.security.UnrecoverableKeyException: Password must not be null
      at sun.security.provider.JavaKeyStore.engineGetKey(JavaKeyStore.java:124)
      at sun.security.provider.JavaKeyStore$JKS.engineGetKey(JavaKeyStore.java:55)
      at java.security.KeyStore.getKey(KeyStore.java:1011)
      at sun.security.ssl.SunX509KeyManagerImpl.<init>(SunX509KeyManagerImpl.java:133)
      at sun.security.ssl.KeyManagerFactoryImpl$SunX509.engineInit(KeyManagerFactoryImpl.java:70)
      at javax.net.ssl.KeyManagerFactory.init(KeyManagerFactory.java:256)
      at org.apache.cxf.configuration.jsse.SSLUtils.loadDefaultKeyManagers(SSLUtils.java:116)
      at org.apache.cxf.configuration.jsse.SSLUtils.getDefaultKeyStoreManagers(SSLUtils.java:89)
      at org.apache.cxf.transport.https.SSLUtils.getSSLContext(SSLUtils.java:75)
      at org.apache.cxf.transport.https.HttpsURLConnectionFactory.decorateWithTLS(HttpsURLConnectionFactory.java:144)
      at org.apache.cxf.transport.https.HttpsURLConnectionFactory.createConnection(HttpsURLConnectionFactory.java:101
      at org.apache.cxf.transport.http.URLConnectionHTTPConduit.createConnection(URLConnectionHTTPConduit.java:121)
      at org.apache.cxf.transport.http.URLConnectionHTTPConduit.setupConnection(URLConnectionHTTPConduit.java:125)
      at org.apache.cxf.transport.http.asyncclient.AsyncHTTPConduit.setupConnection(AsyncHTTPConduit.java:190)
      at org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:505)
      at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:47)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
      at org.apache.cxf.jaxrs.client.AbstractClient.doRunInterceptorChain(AbstractClient.java:701)
      at org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(WebClient.java:1086)
      at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:932)
      at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:901)
      at org.apache.cxf.jaxrs.client.WebClient.form(WebClient.java:434)
      at org.apache.cxf.rs.security.oauth2.client.OAuthClientUtils.getAccessToken(OAuthClientUtils.java:301)
      at org.apache.cxf.rs.security.oauth2.client.OAuthClientUtils.getAccessToken(OAuthClientUtils.java:225)
      at org.teiid.oauth.OAuthUtil.oauth20Flow(OAuthUtil.java:158)
      at org.teiid.oauth.OAuthUtil.main(OAuthUtil.java:76)
      at org.jboss.modules.Module.run(Module.java:352)
      at org.jboss.modules.Module.run(Module.java:320)
      at org.jboss.modules.Main.main(Main.java:593)

      Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriter
      at org.apache.cxf.rs.security.oauth2.provider.OAuthJSONProvider.readJSONResponse(OAuthJSONProvider.java:307)
      at org.apache.cxf.rs.security.oauth2.client.OAuthClientUtils.getAccessToken(OAuthClientUtils.java:306)
      at org.apache.cxf.rs.security.oauth2.client.OAuthClientUtils.getAccessToken(OAuthClientUtils.java:225)
      at org.teiid.oauth.OAuthUtil.oauth20Flow(OAuthUtil.java:158)
      at org.teiid.oauth.OAuthUtil.main(OAuthUtil.java:76)
      at org.jboss.modules.Module.run(Module.java:352)
      at org.jboss.modules.Module.run(Module.java:320)
      at org.jboss.modules.Main.main(Main.java:593)
      Caused by: java.lang.ClassNotFoundException: org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter from [Module "or
      0.0\modules,C:\Softwares\teiid-wildfly-14.0.0-server1\teiid-14.0.0\modules\system\layers\dv,C:\Softwares\teiid-wildfly-
      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255)
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
      ... 8 more
      Press any key to continue . . .

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                shawkins Steven Hawkins
                Reporter:
                nayan.bijagare Nayan Bija
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2 hours
                  2h
                  Remaining:
                  Time Spent - 1 hour, 30 minutes Remaining Estimate - 30 minutes
                  30m
                  Logged:
                  Time Spent - 1 hour, 30 minutes Remaining Estimate - 30 minutes
                  1h 30m