2 Replies Latest reply on Sep 3, 2013 12:00 PM by Ramesh Reddy

    vdb xml file not ending with "-vdb.xml" deployed and enabled without warnings/errors...?

    Marco Ardito Master

      Hi,

       

      i just deleted a previous post of mines, because what I felt as a different error/problem turned out to be a stupid but weird other issue. The problem was: I could not use anymore an old dynamic multimodel vdb that worked in the past, but a more complex version of that, adding another virtual model, creating two virtual views, worked and I could not explain why, because I got no errors from the web gui and from the server console log.

       

      Then I got an inspiration and tried again, and discovered that the problem was the naming of the xml files. I duplicated a "mydatabase-vdb.xml" file which loaded and worked perfectly ( I could query the vdb) and named the copy "mydatabase-vdb2.xml". That was the problem! That xml deploys perfectly, no errors anywhere, I can enable it, no errors, but no virtual database appears in the teiid console... and I can't query it of course (I mean is not a web gui display issue: the vdb is not shown, and is, really, not active).

       

      If I name that copied file, instead of "mydatabase-vdb2.xml" -> "mydatabase2-vdb.xml" it works perfectly! The virtual database is shown on teiid console and of course you can use it!

       

      Weird... I always thought that I could deploy whatever named xml, in teiid, provided that the xml was valid and made sense... It just happened that until now I always named all my xml files making them end in "-ds.xml" (for data sources) and "-vdb.xml" (for virtual databases). It was just luck... :-D

       

      Only now I see that here Dynamic VDBs - Teiid 8.4 - Project Documentation Editor it is clearly stated:

       

      "The VDB name pattern must adhere to "-vdb.xml" for the Teiid VDB deployer to recognize this file."

       

      but I guess some other user noob like me could be fooled by a subtle rule like that, because teiid seems to "recognize" the file: there is no error or warning of any kind... the system gives you no clue that the only problem is in the xml file name... could this be better handled in teiid or is a eap issue?

       

      Thanks

      Marco

        • 1. Re: vdb xml file not ending with "-vdb.xml" deployed and enabled without warnings/errors...?
          Steven Hawkins Master

          > but I guess some other user noob like me could be fooled by a subtle rule like that, because teiid seems to "recognize" the file: there is no error or warning of any kind... the system gives you no clue that the only problem is in the xml file name... could this be better handled in teiid or is a eap issue?

           

          That's a good usability question.  At the core EAP doesn't care.  It's generic deployment method allows you to deploy a file and then it's up to the various deployers installed to determine what to do with the contents.  The admin api just wraps the generic deployment method and does not presume you are deploying a vdb zip or xml.  Our deployment logic is only looking to check the file extension so it doesn't have to guess at and parse every deployed file to see if it's a vdb.  We could add some logic for a specific vdb deployment routine in the admin api that ensures the teiid naming conventions are used, but otherwise there's not much we should do.

          • 2. Re: vdb xml file not ending with "-vdb.xml" deployed and enabled without warnings/errors...?
            Ramesh Reddy Master

            The Admin API "deploy" method is generic purpose deploy for all the artifacts, currently you can deploy any of JAR, RAR or WAR or any other deploy able artifacts. Teiid Designer uses this to deploy the JDBC JAR files and RAR files. That is reason the checking for vdb name pattern is not added to the method. We could certainly log an warning if that is XML file I guess.

             

            In previous versions of Teiid <= 7.x, it had explicit methods like "deployVDB".