1 2 Previous Next 23 Replies Latest reply on Oct 23, 2014 11:04 AM by shawkins Go to original post
      • 15. Re: Re: Re: error with jdbc
        rareddy

        Unfortunately there is no new information in the log. Restart your server and capture the whole log and show that. There can be only three reasons for connection rejection

         

        1) The binding is not on right address

        2) port 31000 is already being used in other application

        3) User name/password are wrong

         

        Check those closely you will be able to make the connection.

        • 16. Re: error with jdbc
          afrieden

          Okay, the binding was in fact wrong.  I had to use the url of the server and not localhost. 

           

          I am now getting the following error:

          org.teiid.jdbc.TeiidSQLException: TEIID50072 The username "username" and/or password and/or payload token could not be authenticated by any membership domain.


          However, I am able to connect to the admin console

          $ bash /opt/jboss/bin/jboss-cli.sh --controller=ipaddress:9999

          [disconnected /] connect

          Authenticating against security realm: ManagementRealm

          Username: username

          Password: password

          [standalone@ipaddress:9999 /]

           

          Is there any reason that my username isn't authenticating against the ManagementRealm when connecting using JDBC?  Thanks!

          • 17. Re: error with jdbc
            rareddy

            Teiid JDBC user is not same as Management user. Use "add-user.sh" to create a management user to be used with CLI/web-console. Create an application user to be used with JDBC

            • 18. Re: Re: error with jdbc
              afrieden

              Added and fixed that problem now I am getting an issue with my implementation I think:

              $ /tools/groovy/groovy-1.8.5/bin/groovy -classpath teiid-8.8.1-jdbc.jar connect.groovy

              Oct 21, 2014 2:49:02 PM groovy.sql.Sql$AbstractQueryCommand execute

              WARNING: Failed to execute: SELECT * FROM Record LIMIT 5 because: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 vcf: org.jboss.jca.adapters.jdbc.WrapperDataSource is was not a ConnectionFactory implementation

              Caught: org.teiid.jdbc.TeiidSQLException: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 vcf: org.jboss.jca.adapters.jdbc.WrapperDataSource is was not a ConnectionFactory implementation

              org.teiid.jdbc.TeiidSQLException: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 vcf: org.jboss.jca.adapters.jdbc.WrapperDataSource is was not a ConnectionFactory implementation

               

              I have attached my code.  Is there an example of a ConnectionFactory implementation?  I also found this

              https://issues.jboss.org/browse/TEIIDDES-2024

              which looks to be a similar problem but is not closed.  Let me know how to proceed.  Thanks! 

              • 19. Re: error with jdbc
                shawkins

                Alexander,

                 

                This would be an issue with the VDB configuration.  What source are you trying to access and does it have the correct JNDI name assigned in the VDB.xml?

                 

                Steve

                • 20. Re: error with jdbc
                  afrieden

                  Trying to access my mongodb source.  The vdb is called vcf.  JNDI is all set to the default (ExampleDS I believe).  It didn't error out in the log after I changed it to the default.  It just looks like my implementation is off since I am not using a ConnectionFactory.  Let me know what the proper implementation is. 

                  • 21. Re: error with jdbc
                    shawkins

                    You should have a mongodb data source created from the mongodb resource adapter.  That JNDI name should be reference in the vdb.xml.

                    • 22. Re: error with jdbc
                      rareddy

                      I have provided with an example configuration you need to add to standalone-teiid.xml in this comment Re: Re: error with jdbc follow that to create the resource-adpater/connection factory for MongoDB. Make sure the JNDI name in this configuration matches to that of one in your VDB


                      Ramesh..

                      • 23. Re: Re: Re: error with jdbc
                        shawkins

                        Connection refused should mean that there is nothing accessible at that host/port.  The server log looks clean (but does not show the initial logs related to sockets as Ramesh has pointed out) and doesn't show any connection/query activity - which would be expected. So you need to go back to understanding how the server is bound, and if your networking configuration is appropriate between the client and server.  Early on in the server log you should see lines like:

                         

                        10:59:11,162 INFO  [org.teiid.RUNTIME] (MSC service thread 1-3)  TEIID50037 Teiid ODBC - Name = odbc, Host = localhost,  Port = 35432, SSL = OFF, security-domains = teiid-security

                        10:59:11,162 INFO  [org.teiid.RUNTIME] (MSC service thread 1-16)  TEIID50012 Teiid JDBC - Name = jdbc, Host = localhost,  Port = 31000, SSL = OFF, security-domains = teiid-security

                         

                        1 2 Previous Next