[JBoss JIRA] (TEIID-4054) OData - creation of entity (POST) returns exception (status code 500)
by Juraj Duráni (JIRA)
[ https://issues.jboss.org/browse/TEIID-4054?page=com.atlassian.jira.plugin... ]
Juraj Duráni reopened TEIID-4054:
---------------------------------
Teiid creates entity successfully, but returns incorrect status code. Returned status code is 204, but should be 201.
OData service should return 204 only in case if request contains header 'prefer return=minimal'.
> OData - creation of entity (POST) returns exception (status code 500)
> ---------------------------------------------------------------------
>
> Key: TEIID-4054
> URL: https://issues.jboss.org/browse/TEIID-4054
> Project: Teiid
> Issue Type: Sub-task
> Components: OData
> Reporter: Juraj Duráni
> Assignee: Ramesh Reddy
> Labels: alpha3
> Fix For: 9.0, 8.12.5
>
>
> Creation of entity returns exception \[1\]. Representation of entity \[2\]. Http request \[3\]. Header \[4\]. Same exception with of JSON format.
> \[1\]
> {code:plain}
> TEIID10076 Invalid conversion from type class java.lang.Object with value 'java.util.GregorianCalendar[time=4000,areFieldsSet=true,areAllFieldsSet=true,
> lenient=true,zone=sun.util.calendar.ZoneInfo[id="GMT",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],f
> irstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=1970,MONTH=0,WEEK_OF_YEAR=1,
> WEEK_OF_MONTH=1,DAY_OF_MONTH=1,DAY_OF_YEAR=1,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=1,
> AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=4,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]'
> to type class java.sql.Time
> {code}
> \[2\]
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <entry xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://docs.oasis-open.org/odata/ns/data" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" xmlns:m="http://docs.oasis-open.org/odata/ns/metadata">
> <category scheme="http://docs.oasis-open.org/odata/ns/scheme" />
> <content type="application/xml">
> <m:properties>
> <d:intkey m:type="Int32">4</d:intkey>
> <d:intnum m:type="Int32">4</d:intnum>
> <d:stringkey>4</d:stringkey>
> <d:stringval>value_4</d:stringval>
> <d:booleanval m:type="Boolean">false</d:booleanval>
> <d:decimalval m:type="Double">-20.4</d:decimalval>
> <d:timeval m:type="TimeOfDay">00:00:04</d:timeval>
> <d:dateval m:type="Date">2004-04-04</d:dateval>
> <d:timestampval m:type="DateTimeOffset">2004-01-01T00:00:04Z</d:timestampval>
> <d:clobval m:type="Binary">Y2xvYl92YWx1ZV8wMDAwNA==</d:clobval>
> </m:properties>
> </content>
> </entry>
> {code}
> \[3\]
> POST http://localhost:8080/odata4/olingo_basic/Source/PostTable(4)
> \[4\]
> Content-type: application/xml
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 11 months
[JBoss JIRA] (TEIID-3907) Support compensating transactions for updatable non-XA sources
by Kylin Soong (JIRA)
[ https://issues.jboss.org/browse/TEIID-3907?page=com.atlassian.jira.plugin... ]
Kylin Soong reassigned TEIID-3907:
----------------------------------
Assignee: Kylin Soong (was: Steven Hawkins)
> Support compensating transactions for updatable non-XA sources
> --------------------------------------------------------------
>
> Key: TEIID-3907
> URL: https://issues.jboss.org/browse/TEIID-3907
> Project: Teiid
> Issue Type: Feature Request
> Components: Server
> Affects Versions: 9.x
> Reporter: Van Halbert
> Assignee: Kylin Soong
>
> The transaction manager will fully support xa with all xa sources and a single local transaction resource. Beyond that however there is no built-in support for compensating transactions with non-XA sources. There has been work in Narayana on compensating transactions though that could be used by custom web apps consuming Teiid. We would like to eventually offer compensating options for some of our updatable non-XA sources, but it hasn't had sufficient priority yet.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 11 months
[JBoss JIRA] (TEIID-4044) OData ignores entities with empty list of related entities if $filter is applied to expanded entities
by Juraj Duráni (JIRA)
[ https://issues.jboss.org/browse/TEIID-4044?page=com.atlassian.jira.plugin... ]
Juraj Duráni edited comment on TEIID-4044 at 4/21/16 2:38 AM:
--------------------------------------------------------------
[~rareddy] You have marked this JIRA as a duplicate of TEIID-4064. Are you sure they are related?
I cannot say if this has been fixed along with TEIID-4064, because that issue has not been fixed.
This issue is still present in "original form".
was (Author: jdurani):
[~rareddy] You have marked this JIRA as a duplicate of TEIID-4064. Are you sure they are related?
I cannot say if this has been fixed along with TEIID-4064, because that issue has not been fixed.
> OData ignores entities with empty list of related entities if $filter is applied to expanded entities
> -----------------------------------------------------------------------------------------------------
>
> Key: TEIID-4044
> URL: https://issues.jboss.org/browse/TEIID-4044
> Project: Teiid
> Issue Type: Sub-task
> Components: OData
> Reporter: Juraj Duráni
> Assignee: Ramesh Reddy
>
> If user want to apply filter for related entities, OData service should return all entities, not only those with non-empty collection of related entities.
> *Example:*
> *URL:* http://localhost:8080/odata4/olingo_basic/Source/Customers/?$expand=Order...
> *Result:* OData returns only 2 customers (both have at least one order with place "town")
> *Expectation:* OData should return all 4 customers (two of them should have empty list of orders)
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 11 months
[JBoss JIRA] (TEIID-4064) OData - missing non-nullable property
by Juraj Duráni (JIRA)
[ https://issues.jboss.org/browse/TEIID-4064?page=com.atlassian.jira.plugin... ]
Juraj Duráni commented on TEIID-4064:
-------------------------------------
This has not been fixed. Now, Teiid returns "OData Library: An exception without message text was thrown."
URL: http://localhost:8080/odata4/olingo_basic/Source/Customers?$count=true&$e...
Server side: Exception:
{code:text}
08:32:30,136 ERROR [org.teiid.ODATA] (http-/127.0.0.1:8080-1) TEIID16052 Unable to process odata request due to: OData Library: An exception without message text was thrown.: org.apache.olingo.server.api.ODataApplicationException
at org.teiid.olingo.service.TeiidServiceHandler.read(TeiidServiceHandler.java:174) [teiid-olingo-8.12.5.redhat-3.jar:8.12.5.redhat-3]
at org.apache.olingo.server.core.requests.DataRequest$EntityRequest.execute(DataRequest.java:332)
at org.apache.olingo.server.core.requests.DataRequest.execute(DataRequest.java:255)
at org.apache.olingo.server.core.ServiceDispatcher.internalExecute(ServiceDispatcher.java:160)
at org.apache.olingo.server.core.ServiceDispatcher.execute(ServiceDispatcher.java:98)
at org.apache.olingo.server.core.OData4HttpHandler.process(OData4HttpHandler.java:66)
at org.teiid.olingo.web.ODataServlet.service(ODataServlet.java:43) [teiid-olingo-8.12.5.redhat-3.jar:8.12.5.redhat-3]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
at org.teiid.olingo.web.ODataFilter.internalDoFilter(ODataFilter.java:226) [teiid-olingo-8.12.5.redhat-3.jar:8.12.5.redhat-3]
at org.teiid.olingo.web.ODataFilter.doFilter(ODataFilter.java:100) [teiid-olingo-8.12.5.redhat-3.jar:8.12.5.redhat-3]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:512) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.4.Final-redhat-4.jar:7.5.4.Final-redhat-4]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0-internal]
Caused by: java.lang.NullPointerException
at org.teiid.olingo.service.DocumentNode.joinFK(DocumentNode.java:440) [teiid-olingo-8.12.5.redhat-3.jar:8.12.5.redhat-3]
at org.teiid.olingo.service.DocumentNode.joinTable(DocumentNode.java:398) [teiid-olingo-8.12.5.redhat-3.jar:8.12.5.redhat-3]
at org.teiid.olingo.service.ODataSQLBuilder.processExpandOption(ODataSQLBuilder.java:206) [teiid-olingo-8.12.5.redhat-3.jar:8.12.5.redhat-3]
at org.teiid.olingo.service.ODataSQLBuilder.selectQuery(ODataSQLBuilder.java:172) [teiid-olingo-8.12.5.redhat-3.jar:8.12.5.redhat-3]
at org.teiid.olingo.service.TeiidServiceHandler.read(TeiidServiceHandler.java:171) [teiid-olingo-8.12.5.redhat-3.jar:8.12.5.redhat-3]
... 25 more
{code}
> OData - missing non-nullable property
> -------------------------------------
>
> Key: TEIID-4064
> URL: https://issues.jboss.org/browse/TEIID-4064
> Project: Teiid
> Issue Type: Sub-task
> Components: OData
> Reporter: Juraj Duráni
> Assignee: Ramesh Reddy
> Labels: Alpha3
> Fix For: 9.0, 8.12.5
>
>
> Change DDL for tables Customer and Orders in VDB as follows:
> {code:sql}
> CREATE FOREIGN TABLE Customers (
> id integer PRIMARY KEY OPTIONS (NAMEINSOURCE 'id'),
> name varchar(10)) OPTIONS (NAMEINSOURCE 'DB.PUBLIC.CUSTOMERS');
> CREATE FOREIGN TABLE Orders (
> id integer PRIMARY KEY OPTIONS (NAMEINSOURCE 'id'),
> customerid integer,
> place varchar(10),
> FOREIGN KEY (customerid) REFERENCES Customers(id)) OPTIONS (NAMEINSOURCE 'DB.PUBLIC.ORDERS');
> {code}
> Note, that both tables have same name of primary key named "id".
> Invoke GET method to URL http://localhost:8080/odata4/olingo_basic/Source/Customers/?$count=true&$...
> *Result:*
> {code:xml}
> <error>
> <code>400</code>
> <message>The non-nullable property 'id' is missing.</message>
> </error>
> {code}
> Here are selected part of Teiid's log:
> *Query:*
> {code:sql}
> SELECT g10.id, g10.name, g11.id, g11.customerid, g11.place FROM Source.Customers AS g10 LEFT OUTER JOIN Source.Orders AS g11 ON g10.id = g11.customerid ORDER BY g10.id
> {code}
> *Result:*
> |id|name|id|customerid|place|
> |1|customer1|1|1|town|
> |1|customer1|2|1|state|
> |1|customer1|3|1|country|
> |1|customer1|4|1|abroad|
> |2|customer2|5|2|state|
> |2|customer2|6|2|country|
> |3|customer3|7|3|town|
> |3|customer3|8|3|town|
> |4|customer4|<null>|<null>|<null>|
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 11 months
[JBoss JIRA] (TEIID-4064) OData - missing non-nullable property
by Juraj Duráni (JIRA)
[ https://issues.jboss.org/browse/TEIID-4064?page=com.atlassian.jira.plugin... ]
Juraj Duráni reopened TEIID-4064:
---------------------------------
> OData - missing non-nullable property
> -------------------------------------
>
> Key: TEIID-4064
> URL: https://issues.jboss.org/browse/TEIID-4064
> Project: Teiid
> Issue Type: Sub-task
> Components: OData
> Reporter: Juraj Duráni
> Assignee: Ramesh Reddy
> Labels: Alpha3
> Fix For: 9.0, 8.12.5
>
>
> Change DDL for tables Customer and Orders in VDB as follows:
> {code:sql}
> CREATE FOREIGN TABLE Customers (
> id integer PRIMARY KEY OPTIONS (NAMEINSOURCE 'id'),
> name varchar(10)) OPTIONS (NAMEINSOURCE 'DB.PUBLIC.CUSTOMERS');
> CREATE FOREIGN TABLE Orders (
> id integer PRIMARY KEY OPTIONS (NAMEINSOURCE 'id'),
> customerid integer,
> place varchar(10),
> FOREIGN KEY (customerid) REFERENCES Customers(id)) OPTIONS (NAMEINSOURCE 'DB.PUBLIC.ORDERS');
> {code}
> Note, that both tables have same name of primary key named "id".
> Invoke GET method to URL http://localhost:8080/odata4/olingo_basic/Source/Customers/?$count=true&$...
> *Result:*
> {code:xml}
> <error>
> <code>400</code>
> <message>The non-nullable property 'id' is missing.</message>
> </error>
> {code}
> Here are selected part of Teiid's log:
> *Query:*
> {code:sql}
> SELECT g10.id, g10.name, g11.id, g11.customerid, g11.place FROM Source.Customers AS g10 LEFT OUTER JOIN Source.Orders AS g11 ON g10.id = g11.customerid ORDER BY g10.id
> {code}
> *Result:*
> |id|name|id|customerid|place|
> |1|customer1|1|1|town|
> |1|customer1|2|1|state|
> |1|customer1|3|1|country|
> |1|customer1|4|1|abroad|
> |2|customer2|5|2|state|
> |2|customer2|6|2|country|
> |3|customer3|7|3|town|
> |3|customer3|8|3|town|
> |4|customer4|<null>|<null>|<null>|
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 11 months
[JBoss JIRA] (TEIID-4064) OData - missing non-nullable property
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-4064?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on TEIID-4064:
------------------------------------------------
Juraj Duráni <jdurani(a)redhat.com> changed the Status of [bug 1316511|https://bugzilla.redhat.com/show_bug.cgi?id=1316511] from ON_QA to ASSIGNED
> OData - missing non-nullable property
> -------------------------------------
>
> Key: TEIID-4064
> URL: https://issues.jboss.org/browse/TEIID-4064
> Project: Teiid
> Issue Type: Sub-task
> Components: OData
> Reporter: Juraj Duráni
> Assignee: Ramesh Reddy
> Labels: Alpha3
> Fix For: 9.0, 8.12.5
>
>
> Change DDL for tables Customer and Orders in VDB as follows:
> {code:sql}
> CREATE FOREIGN TABLE Customers (
> id integer PRIMARY KEY OPTIONS (NAMEINSOURCE 'id'),
> name varchar(10)) OPTIONS (NAMEINSOURCE 'DB.PUBLIC.CUSTOMERS');
> CREATE FOREIGN TABLE Orders (
> id integer PRIMARY KEY OPTIONS (NAMEINSOURCE 'id'),
> customerid integer,
> place varchar(10),
> FOREIGN KEY (customerid) REFERENCES Customers(id)) OPTIONS (NAMEINSOURCE 'DB.PUBLIC.ORDERS');
> {code}
> Note, that both tables have same name of primary key named "id".
> Invoke GET method to URL http://localhost:8080/odata4/olingo_basic/Source/Customers/?$count=true&$...
> *Result:*
> {code:xml}
> <error>
> <code>400</code>
> <message>The non-nullable property 'id' is missing.</message>
> </error>
> {code}
> Here are selected part of Teiid's log:
> *Query:*
> {code:sql}
> SELECT g10.id, g10.name, g11.id, g11.customerid, g11.place FROM Source.Customers AS g10 LEFT OUTER JOIN Source.Orders AS g11 ON g10.id = g11.customerid ORDER BY g10.id
> {code}
> *Result:*
> |id|name|id|customerid|place|
> |1|customer1|1|1|town|
> |1|customer1|2|1|state|
> |1|customer1|3|1|country|
> |1|customer1|4|1|abroad|
> |2|customer2|5|2|state|
> |2|customer2|6|2|country|
> |3|customer3|7|3|town|
> |3|customer3|8|3|town|
> |4|customer4|<null>|<null>|<null>|
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 11 months