11 Replies Latest reply on Oct 30, 2012 8:26 AM by rareddy Branched from an earlier discussion.

    Re: Error connecting to Teiid(VDB) using JDBC

    sarik

      Hi Ramesh,

               I have created a VDB using designer and deployed it onto the JBoss AS server. Now I am successfully able to connect to a VDB using JAVA JDBC connection and able to retrieve the result locally.

      Now, I want to deploy the VDB to a unix server running JBOSS AS as well. So  have hot deployed the VDB in the JBOSS AS and it was saying deployed successfully. But when I tried to connect this VDb from my java code using the url jdbc:teiid:<Organisation>@mm[s]://<lonrs08433>:<8280>, I am not able to connect to it :-

       

      1) The username and password I have supplied was "user" and "user".... Is this correct

       

      So, can you plz tell me what is the best way of deploying and connecting a vdb remotely not locally.

       

      Regards,

       

      Sarik

        • 1. Re: Error connecting to Teiid(VDB) using JDBC
          rareddy

          Sarik,

           

          You are using Metamatrix jdbc driver to connect to the Teiid. Metamatrix is so last year... Update the JDBC driver for Teiid in your classpath. EDS is much more improved product, if you have not moved to Redhat EDS I highly recommend moving to EDS from Metamatrix.

           

          Also, if you are a customer, I suggest using the Redhat support lines, as they can provide you timely support.

           

          Thanks.

           

          Ramesh..

          • 2. Re: Error connecting to Teiid(VDB) using JDBC
            rareddy

            Sarik,

             

            If your exception is not like above what Rakesh had, what is exception you see?

             

            Ramesh..

            • 3. Re: Error connecting to Teiid(VDB) using JDBC
              sarik

              Hello Ramesh,

               

                   I am using the Jdbc Teiid driver which is something like Teiid-Final-Client.jar and I am not using metamatrix jar.. My Exception is same as that of Rakesh, which is connection refused ::::Error establishing socket to host and port: lonrs08433:31000. Reason: Connection refused: connect..

               

              What could be the possible reason for this as the connection is running fine when I am trying to connect to a VDB locally but when I deployed the VDB onto a different server it is throwing this error.

               

              My server hostname is lonrs08433 , My JBoss is runnng on port 8280... I am assuming the teiid is by default connectiong to jdbc api on port 31000..I am using userName = user and Password = user and my VDB name is Organisation..

               

              I am making a connection url as ::
              jdbc:teiid:Organisation@mm://lonrs08433:31000

               

              Plz suggest....

               

              Thanks

              Sarik


              • 4. Re: Error connecting to Teiid(VDB) using JDBC
                van.halbert

                Can you open up your teiid client jar and tell me what packages are there?

                 

                Thanks.

                 

                Van

                • 5. Re: Error connecting to Teiid(VDB) using JDBC
                  rareddy

                  Sarik,

                   

                  By default  JBoss AS starts on localhost or 127.0.0.1. You need to make sure it runs on "ionrs08433", to do that you can start the server as

                   

                  ./standalone.xml -c standalone-teiid.xml -b ionrs08433

                   

                  as per the port, open the standalone-teiid.xml before the server started and find "teiid-jdbc" property and change port to there if you need to run anything other than 31000. Otherwise leave this as is. Your URL points to 31000. This port is separate from the JBoss AS http port.

                   

                  once the server started then you can connect remotely.

                   

                  Ramesh..

                  • 6. Re: Error connecting to Teiid(VDB) using JDBC
                    sarik

                    Hi Ramesh,

                     

                    Thanks for the reply.. but I am starting the JBoss AS as ./run.sh -b lonrs08433 only.. By the way I am using JBoss As 5.1.0 and Teiid 7.4.0 so I don't think I am able to see the file standalone-teiid.xml..

                     

                    One thing Ramesh, my remote server is the unix server (lonrs08433), so when trying ti connect to that server where I am supposd to give the server credentials apart from the teiid credentials "user" and "user"??

                    • 7. Re: Error connecting to Teiid(VDB) using JDBC
                      rareddy

                      In Teiid 7.4,  for configuration file see <jboss-as>/server/default/deploy/teiid/teiid-jboss-beans.xml file. standalone-teiid.xml file is for Teiid 8.x. I recommend you move to Teiid 8.x, otherwise atleast to Teiid 7.7.

                       

                      The Teiid credentials are in file <jboss-as>/server/default/conf/props/teiid-security-users.properties file. You do not need your server credentials. I am thinking, your unix server has firewall running on it, and the port 31000 is being blocked. So work with your admin to open the port in firewall rules.

                       

                      Ramesh..

                      • 8. Re: Error connecting to Teiid(VDB) using JDBC
                        sarik

                        Hello,

                         

                                What i have found is After I have generated a VDB using Designer and deployed it , I hot deployed the generated VDB onto the server and also copied the *-ds.xml file in the deploy directory of JBoss AS. But in admin console of JBoss AS , i found that the VDB is in the inactive state because the error is showing "the data source file is not accessible". But i have copied the data source file.

                         

                        So where am I going wrong....

                         

                        Thanks

                        Sarik

                        • 9. Re: Error connecting to Teiid(VDB) using JDBC
                          rareddy

                          Check the logs, the exception should have given the reason why it is not connecting to the source. Check the URL, user id and password etc.

                          • 10. Re: Error connecting to Teiid(VDB) using JDBC
                            sarik

                            Hi Ramesh,

                             

                                  Thanks for your reply. I am now able to connect successfully. The error was ,the teiid jdbc connection was listening to the port 31300 instead of 31000 when i run my jboss.

                             

                            Now one more question, in order to connect, I want teiid-7.7.0.Final-client.jar which for the time being is added manually into the build path. I want to make it the part of the maven process for my project. I can't see what groupId and artifactId entry I should place in my pom.xml. + I can't see teiid-7.7.0.Final-client.jar in the maven repository. So how can i do this task. Any suggestions??

                             

                             

                             

                            Thanks

                            Sarik

                            • 11. Re: Error connecting to Teiid(VDB) using JDBC
                              rareddy

                              Sarik,

                               

                              They should be in the JBoss Nexus maven reporitory

                               

                               

                              https://repository.jboss.org/nexus/index.html#nexus-search;quick~teiid

                               

                              Ramesh..