[JBoss JIRA] (TEIIDDES-2727) SQL Queries generated via "Generate REST Virtual Procedures" do not work when executed directly in JBoss Developer Studio
by Andrej Šmigala (JIRA)
[ https://issues.jboss.org/browse/TEIIDDES-2727?page=com.atlassian.jira.plu... ]
Andrej Šmigala edited comment on TEIIDDES-2727 at 11/12/15 11:57 AM:
---------------------------------------------------------------------
I am now fully convinced the issue is with XML return type:
This throws the above error:
{code:sql}
select x.xml_out from (exec testProc('a')) as x
{code}
This works as expected:
{code:sql}
select r.* from (exec testProc('a')) as x, xmltable('/test' PASSING x.xml_out COLUMNS elem1 string, elem2 string) as r
{code}
was (Author: asmigala):
I am now fullu convinced the issue is with XML return type:
This throws the above error:
{code:sql}
select x.xml_out from (exec testProc('a')) as x
{code}
This works as expected:
{code:sql}
select r.* from (exec testProc('a')) as x, xmltable('/test' PASSING x.xml_out COLUMNS elem1 string, elem2 string) as r
{code}
> SQL Queries generated via "Generate REST Virtual Procedures" do not work when executed directly in JBoss Developer Studio
> -------------------------------------------------------------------------------------------------------------------------
>
> Key: TEIIDDES-2727
> URL: https://issues.jboss.org/browse/TEIIDDES-2727
> Project: Teiid Designer
> Issue Type: Bug
> Components: VDB & Execution, Web Services Support
> Affects Versions: 9.2
> Reporter: sw vajanyatek
>
> The following procedure was generated via right-clicking a view model --> "Generate REST Virtual Procedures":
> {code:sql}
> 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
> {code}
> 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:
> {code:sql}
> 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;
> {code}
> {{org.teiid.net.socket.SingleInstanceCommunicationException: java.io.OptionalDataException}}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIIDDES-2727) SQL Queries generated via "Generate REST Virtual Procedures" do not work when executed directly in JBoss Developer Studio
by Andrej Šmigala (JIRA)
[ https://issues.jboss.org/browse/TEIIDDES-2727?page=com.atlassian.jira.plu... ]
Andrej Šmigala updated TEIIDDES-2727:
-------------------------------------
Component/s: VDB & Execution
Web Services Support
> SQL Queries generated via "Generate REST Virtual Procedures" do not work when executed directly in JBoss Developer Studio
> -------------------------------------------------------------------------------------------------------------------------
>
> Key: TEIIDDES-2727
> URL: https://issues.jboss.org/browse/TEIIDDES-2727
> Project: Teiid Designer
> Issue Type: Bug
> Components: VDB & Execution, Web Services Support
> Affects Versions: 9.2
> Reporter: sw vajanyatek
>
> The following procedure was generated via right-clicking a view model --> "Generate REST Virtual Procedures":
> {code:sql}
> 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
> {code}
> 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:
> {code:sql}
> 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;
> {code}
> {{org.teiid.net.socket.SingleInstanceCommunicationException: java.io.OptionalDataException}}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIIDDES-2727) SQL Queries generated via "Generate REST Virtual Procedures" do not work when executed directly in JBoss Developer Studio
by Andrej Šmigala (JIRA)
[ https://issues.jboss.org/browse/TEIIDDES-2727?page=com.atlassian.jira.plu... ]
Andrej Šmigala updated TEIIDDES-2727:
-------------------------------------
Issue Type: Bug (was: Feature Request)
> SQL Queries generated via "Generate REST Virtual Procedures" do not work when executed directly in JBoss Developer Studio
> -------------------------------------------------------------------------------------------------------------------------
>
> Key: TEIIDDES-2727
> URL: https://issues.jboss.org/browse/TEIIDDES-2727
> Project: Teiid Designer
> Issue Type: Bug
> Affects Versions: 9.2
> Reporter: sw vajanyatek
>
> The following procedure was generated via right-clicking a view model --> "Generate REST Virtual Procedures":
> {code:sql}
> 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
> {code}
> 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:
> {code:sql}
> 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;
> {code}
> {{org.teiid.net.socket.SingleInstanceCommunicationException: java.io.OptionalDataException}}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIIDDES-2727) SQL Queries generated via "Generate REST Virtual Procedures" do not work when executed directly in JBoss Developer Studio
by Andrej Šmigala (JIRA)
[ https://issues.jboss.org/browse/TEIIDDES-2727?page=com.atlassian.jira.plu... ]
Andrej Šmigala commented on TEIIDDES-2727:
------------------------------------------
I am seeing the same behaviour on 9.2, the issue does not occur in 9.0.4.
Even calling {{EXEC procName('param')}} in SQL Scrapbook causes the same exception.
Seems the problem might be in the XML return type, as executing a procedure that returns a string works ok.
> SQL Queries generated via "Generate REST Virtual Procedures" do not work when executed directly in JBoss Developer Studio
> -------------------------------------------------------------------------------------------------------------------------
>
> Key: TEIIDDES-2727
> URL: https://issues.jboss.org/browse/TEIIDDES-2727
> Project: Teiid Designer
> Issue Type: Feature Request
> Affects Versions: 9.2
> Reporter: sw vajanyatek
>
> The following procedure was generated via right-clicking a view model --> "Generate REST Virtual Procedures":
> {code:sql}
> 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
> {code}
> 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:
> {code:sql}
> 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;
> {code}
> {{org.teiid.net.socket.SingleInstanceCommunicationException: java.io.OptionalDataException}}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIIDDES-2727) SQL Queries generated via "Generate REST Virtual Procedures" do not work when executed directly in JBoss Developer Studio
by Andrej Šmigala (JIRA)
[ https://issues.jboss.org/browse/TEIIDDES-2727?page=com.atlassian.jira.plu... ]
Andrej Šmigala updated TEIIDDES-2727:
-------------------------------------
Affects Version/s: 9.2
> SQL Queries generated via "Generate REST Virtual Procedures" do not work when executed directly in JBoss Developer Studio
> -------------------------------------------------------------------------------------------------------------------------
>
> Key: TEIIDDES-2727
> URL: https://issues.jboss.org/browse/TEIIDDES-2727
> Project: Teiid Designer
> Issue Type: Feature Request
> Affects Versions: 9.2
> Reporter: sw vajanyatek
>
> The following procedure was generated via right-clicking a view model --> "Generate REST Virtual Procedures":
> {code:sql}
> 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
> {code}
> 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:
> {code:sql}
> 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;
> {code}
> {{org.teiid.net.socket.SingleInstanceCommunicationException: java.io.OptionalDataException}}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIIDDES-2727) SQL Queries generated via "Generate REST Virtual Procedures" do not work when executed directly in JBoss Developer Studio
by sw vajanyatek (JIRA)
sw vajanyatek created TEIIDDES-2727:
---------------------------------------
Summary: SQL Queries generated via "Generate REST Virtual Procedures" do not work when executed directly in JBoss Developer Studio
Key: TEIIDDES-2727
URL: https://issues.jboss.org/browse/TEIIDDES-2727
Project: Teiid Designer
Issue Type: Feature Request
Reporter: sw vajanyatek
The following procedure was generated via right-clicking a view model --> "Generate REST Virtual Procedures":
{code:sql}
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
{code}
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:
{code:sql}
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;
{code}
{{org.teiid.net.socket.SingleInstanceCommunicationException: java.io.OptionalDataException}}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIIDDES-2725) Transformation sql is not correct when using REST import with URL attributes
by Barry LaFond (JIRA)
[ https://issues.jboss.org/browse/TEIIDDES-2725?page=com.atlassian.jira.plu... ]
Barry LaFond reassigned TEIIDDES-2725:
--------------------------------------
Assignee: Ted Jones
> Transformation sql is not correct when using REST import with URL attributes
> ----------------------------------------------------------------------------
>
> Key: TEIIDDES-2725
> URL: https://issues.jboss.org/browse/TEIIDDES-2725
> Project: Teiid Designer
> Issue Type: Bug
> Components: Import/Export
> Affects Versions: 9.0.4
> Reporter: Matus Makovy
> Assignee: Ted Jones
> Fix For: 9.3
>
> Attachments: Screen Shot 2015-11-12 at 14.55.52.png, Screen Shot 2015-11-12 at 15.22.59.png
>
>
> When you use connection parameters in REST connection profile definition, the resulting transformation SQL generated during import from this CP is malformed.
> ViewModel.getCases.query AS query, *+|| '/' || ViewModel.getCases.query+* ViewModel.getCases.newSearch AS newSearch *+|| '/' || ViewModel.getCases.newSearch+*
> SQL without the bold/underlined parts works. (I mean underlined/bold parts in this bug Description, not in screenshot)
> See attached screenshots
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months