[
https://issues.jboss.org/browse/TEIID-5063?page=com.atlassian.jira.plugin...
]
Steven Hawkins commented on TEIID-5063:
---------------------------------------
We also introduce an issue with an comparisons when we truncate/round
anything other than trailing zeros, that at least needs to be documented.
It looks like the best idea is to restrict the conversion to just trim trailing 0s.
Other insert/update values
It appears that the parsing logic at least for olingo should be tolerant of extra 0s, so
we don't necessarily need to make changes there yet.
I'll update this JIRA accordingly.
Error when querying bigdecimal value through odata
--------------------------------------------------
Key: TEIID-5063
URL:
https://issues.jboss.org/browse/TEIID-5063
Project: Teiid
Issue Type: Bug
Components: OData
Affects Versions: 8.12.x-6.4
Reporter: Andrej Šmigala
Assignee: Steven Hawkins
Priority: Blocker
When querying a view with bigdecimal column thourgh odata, the following error is shown:
{noformat}
16:29:33,079 ERROR [org.teiid.ODATA] (http-0.0.0.0:8080-1) TEIID16050 Unable to process
odata request due to: org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException: The
value '5.12' does not match the facets' constraints. with cause The value
'5.12' does not match the facets' constraints.:
org.apache.olingo.server.api.ODataApplicationException:
org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException: The value '5.12' does
not match the facets' constraints.
at org.teiid.olingo.service.TeiidServiceHandler.read(TeiidServiceHandler.java:173)
[teiid-olingo-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
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:67)
at org.teiid.olingo.web.ODataServlet.service(ODataServlet.java:43)
[teiid-olingo-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
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.23.Final-redhat-1.jar:7.5.23.Final-redhat-1]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
[jbossweb-7.5.23.Final-redhat-1.jar:7.5.23.Final-redhat-1]
at org.teiid.olingo.web.ODataFilter.internalDoFilter(ODataFilter.java:231)
[teiid-olingo-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
at org.teiid.olingo.web.ODataFilter.doFilter(ODataFilter.java:100)
[teiid-olingo-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
[jbossweb-7.5.23.Final-redhat-1.jar:7.5.23.Final-redhat-1]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
[jbossweb-7.5.23.Final-redhat-1.jar:7.5.23.Final-redhat-1]
at org.teiid.olingo.web.CorsFilter.doFilter(CorsFilter.java:80)
[teiid-olingo-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
[jbossweb-7.5.23.Final-redhat-1.jar:7.5.23.Final-redhat-1]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
[jbossweb-7.5.23.Final-redhat-1.jar:7.5.23.Final-redhat-1]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231)
[jbossweb-7.5.23.Final-redhat-1.jar:7.5.23.Final-redhat-1]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)
[jbossweb-7.5.23.Final-redhat-1.jar:7.5.23.Final-redhat-1]
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:512)
[jbossweb-7.5.23.Final-redhat-1.jar:7.5.23.Final-redhat-1]
at
org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
[jboss-as-web-7.5.16.Final-redhat-1.jar:7.5.16.Final-redhat-1]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:151)
[jbossweb-7.5.23.Final-redhat-1.jar:7.5.23.Final-redhat-1]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
[jbossweb-7.5.23.Final-redhat-1.jar:7.5.23.Final-redhat-1]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
[jbossweb-7.5.23.Final-redhat-1.jar:7.5.23.Final-redhat-1]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
[jbossweb-7.5.23.Final-redhat-1.jar:7.5.23.Final-redhat-1]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854)
[jbossweb-7.5.23.Final-redhat-1.jar:7.5.23.Final-redhat-1]
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:656)
[jbossweb-7.5.23.Final-redhat-1.jar:7.5.23.Final-redhat-1]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926)
[jbossweb-7.5.23.Final-redhat-1.jar:7.5.23.Final-redhat-1]
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_131]
Caused by: java.sql.SQLException:
org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException: The value '5.12' does
not match the facets' constraints.
at
org.teiid.olingo.service.EntityCollectionResponse.createEntity(EntityCollectionResponse.java:229)
[teiid-olingo-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
at
org.teiid.olingo.service.EntityCollectionResponse.createEntity(EntityCollectionResponse.java:148)
[teiid-olingo-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
at
org.teiid.olingo.service.EntityCollectionResponse.addRow(EntityCollectionResponse.java:99)
[teiid-olingo-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
at org.teiid.olingo.service.LocalClient.executeSQL(LocalClient.java:298)
[teiid-olingo-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
at
org.teiid.olingo.service.TeiidServiceHandler.executeQuery(TeiidServiceHandler.java:348)
[teiid-olingo-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
at org.teiid.olingo.service.TeiidServiceHandler.read(TeiidServiceHandler.java:171)
[teiid-olingo-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
... 28 more
Caused by: org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException: The value
'5.12' does not match the facets' constraints.
at
org.apache.olingo.commons.core.edm.primitivetype.EdmDecimal.internalValueToString(EdmDecimal.java:185)
at
org.apache.olingo.commons.core.edm.primitivetype.AbstractPrimitiveType.valueToString(AbstractPrimitiveType.java:86)
at
org.apache.olingo.server.core.responses.EntityResponse.buildLocation(EntityResponse.java:219)
at
org.teiid.olingo.service.EntityCollectionResponse.createEntity(EntityCollectionResponse.java:201)
[teiid-olingo-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
... 33 more
{noformat}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)