9 Replies Latest reply on Jul 26, 2010 10:30 AM by Ramesh Reddy

    Unable to connect to Teiid Server from Designer in 7.0

    Ramesh Reddy Master

      this issue copied from http://community.jboss.org/docs/DOC-15627

       

      I had created a VDB using Designer in 7.0 and created the Teiid Server connection in Database Development Perspective.

      When I try to connect to Teiid I am getting the following Error


      Error creating SQL Model Connection connection to Teiid Server. (Error: Remote org.teiid.client.security.LogonException: VDB "SecAdmin" version "latest" is not active.)

      ...


      Could you please help me in solving this problem

        • 1. Re: Unable to connect to Teiid Server from Designer in 7.0
          Ramesh Reddy Master

          Rakesh,

           

          When you deploy a VDB, the Teiid runtime makes sure that the VDB does not have any errors and it is fully configured. If it finds otherwise, it may not deploy your VDB throwing an error or puts in a inactive state.

           

          Mostly it places VDB in inactive state when the "resource adapters" for your VDB are not configured in the JBoss AS. For example, if you are using Oracle as one of the sources in your VDB,  you need to provide the respective "-ds.xml" file that defines the data source for Oracle in the JBoss AS, which has the JNDI name exactly matching the name you have given in your VDB configuration.

           

          You can even create this data source through Desinger by right clicking on the source model (blue icon) -> Modeling -> Create Data Source

           

          Also, you can check the your JBoss AS logs see error messages, or you can use the JBoss "admin-console" by going to

           

          http://localhost:8080/admin-console

           

          and selecting the "Data Services" and clicking on the VDB, in the summary page it will show you "errors" as to why it is in the inactive stage. Then you could just use this tool to create the missing Data Source too.

           

          Hope this helps.

           

           

          Ramesh..

          • 2. Re: Unable to connect to Teiid Server from Designer in 7.0
            Rakesh Balguri Expert

            Hi Ramesh,

             

            Thanks for the info.

             

            I have one more doubt. If any of our sources is a Text file, do we need to create a Data Source for that as well.

            If yes then how do we create a data source for a Text file in JBoss

             

            Thanks

            Rakesh

            • 3. Re: Unable to connect to Teiid Server from Designer in 7.0
              Rakesh Balguri Expert

              Hi Ramesh,

               

              I had created the datasource using the JBoss admin-console but the data source created is not getting started.

              The status of the data source is DOWN even after I restarted JBoss as.

               

              I am using Oracle as the Database

               

              Please help me in resolving this issue.

               

              Thanks

              Rakesh

              • 4. Re: Unable to connect to Teiid Server from Designer in 7.0
                Ramesh Reddy Master

                Rakesh,

                 

                Take look at the "marketdata-file-ds.xml" as a sample in the "<install>/teiid-examples/dynamicvdb-portfolio" directory. As far how you use this data source in your SQL queries, you can look at the "dynamicvdb-portfolio" example also. Also, take look at "TEXTTABLE" function in the "Reference Guide" for more info.

                 

                Ramesh..

                • 5. Re: Unable to connect to Teiid Server from Designer in 7.0
                  Ramesh Reddy Master

                  Rakesh,

                   

                  I have seen this issue too before, I am not sure what "admin-console" tool bases the UP or DOWN signal. However,

                   

                  1) I would double check all the properties (driver, url, usserid, password).

                  2) Did you include the Oracle JDBC driver JAR in the "<jboss-as>/server/default/lib" directory? If not you need do that. If you do not have the driver JAR, you need to download that from Oracle's site.

                  3) Is your database up?

                  4) Are there any errors showing up in the JBoss console window (where you exectued the run.bat?)

                  5) If you did all above, then you need to verify that the Data Source is working or not (even though, admin-console says otherwise). For checking a data source I written a small utility a long time ago. I am attatching that "jdbc.war" file. Copy this file into your "<jboss-as>/server/default/deploy" directory. Then start the JBoss AS, then go to "http://localhost:8080/jdbc". Then fill in the data souce name "java:<ds-jndi-name>" and write some SQL query and execute. If you see results, it is working fine.

                   

                  Hope this helps.

                   

                  Ramesh..

                  • 6. Re: Unable to connect to Teiid Server from Designer in 7.0
                    Rakesh Balguri Expert

                    Hi Ramesh,

                     

                    I had checked the example provided in the Teiid Installation.

                     

                    Can we  create a data source using the Designer for the Text file.

                     

                    I had created the text file source using the Import -> Metadata from Text Files on File System.

                     

                    Is this procedure correct.

                     

                     

                    Please help me in creating a text source and also the data source for it.

                     

                    Thanks

                    Rakesh

                    • 7. Re: Unable to connect to Teiid Server from Designer in 7.0
                      Rakesh Balguri Expert

                      Hi Ramesh,

                       

                      Thanks for the sample application. It helped me a lot.

                       

                      Thanks

                      Rakesh

                      • 8. Re: Unable to connect to Teiid Server from Designer in 7.0
                        Ramesh Reddy Master

                        Rakesh,

                         

                        Currently there is no "File" importer support in the Designer. We re-designed file access stuff in the 7.0 release and tooling is not up to date yet. Currently the only way you can set up a file model is by manually creating a view model and defining the view tables in them. For these view model's transformation use the "TEXTTABLE" function to define the query that defines the View table's columns. For example, the type of user queries specified for the sample example can become transformations in this view model in Designer.

                         

                        This same process is true for XML based sources too, as tooling is still catching up. For XML take look at "XMLTABLE" and other variety of other XML functions. Check the "weather" example. Check the Reference Guide.

                         

                        The "Text" importer in the Designer is to import DDL like statements and make them into a importable model. Check the Designer documentation for that.

                         

                        Ramesh..

                        • 9. Re: Unable to connect to Teiid Server from Designer in 7.0
                          Ramesh Reddy Master

                          No problem. Also, I found out that, the "admin-console" uses a test query to check up or down status. So, when you created the -ds.xml file, and it does not specify the test query to check the connection's health, this could be the symptom. I have not verified this myself, but if you do please let us know.

                           

                          For Teiid you could use something like "select 1" as test query.

                           

                          Thanks

                           

                          Ramesh..