Uploaded image for project: 'Teiid Designer'
  1. Teiid Designer
  2. TEIIDDES-2727

SQL Queries generated via "Generate REST Virtual Procedures" do not work when executed directly in JBoss Developer Studio

    XMLWordPrintable

Details

    Description

      The following procedure was generated via right-clicking a view model --> "Generate REST Virtual Procedures":

      BEGIN
      	SELECT XMLELEMENT(NAME elems, XMLATTRIBUTES(ss4_view.stockRestProc.pk_stockid_in AS pk_stockid_in), XMLAGG(XMLELEMENT(NAME elem, XMLFOREST(ss4_view.stock.stockid, ss4_view.stock.exchangeid, ss4_view.stock.ticker, ss4_view.stock.name, ss4_view.stock.description, ss4_view.stock.notes)))) AS xml_out FROM ss4_view.stock WHERE ss4_view.stockRestProc.pk_stockid_in = ss4_view.stock.stockid;
      END
      

      The resulting REST service (../json/stock/

      {stockid}

      ) produces the expected results and appears fine. However, executing the following in a sql script connected to the same teiid server via jdbc produces an exception:

      SELECT XMLELEMENT(NAME elems
      	, XMLAGG(XMLELEMENT(NAME elem, 
      	   XMLFOREST(ss4_view.stock.stockid
      		, ss4_view.stock.exchangeid
      		, ss4_view.stock.ticker
      		, ss4_view.stock.name
      		, ss4_view.stock.description
      		, ss4_view.stock.notes)
      	   )
      	)
        ) AS xml_out 
      FROM ss4_view.stock 
      WHERE 4 = ss4_view.stock.stockid;
      

      org.teiid.net.socket.SingleInstanceCommunicationException: java.io.OptionalDataException

      Attachments

        Activity

          People

            Unassigned Unassigned
            swvajanyatek@gmail.com Timothy Padgett (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: