[JBoss JIRA] (TEIID-3878) java.lang.Integer cannot be cast to java.math.BigDecimal
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3878?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-3878:
----------------------------------
Issue Type: Bug (was: Feature Request)
Component/s: Query Engine
Affects Version/s: 8.11.3
> java.lang.Integer cannot be cast to java.math.BigDecimal
> --------------------------------------------------------
>
> Key: TEIID-3878
> URL: https://issues.jboss.org/browse/TEIID-3878
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.11.3
> Reporter: Mark Tawk
> Assignee: Steven Hawkins
> Priority: Critical
> Attachments: TEIID-3878.sql
>
>
> I'm using Teiid 8.11.3 with oracle translator.
> I have an aggregated query using teiid materialized views with the following simplified criteria:
> (CASE WHEN ( "table1"."field1" = 1 ) THEN "table2"."yearfield" ELSE null END IN (2014) )
> The above criteria is reproducing a ClassCastException Integer cannot be cast to BigDecimal
> if I change the criteria to the following, it passes without a problem:
> ("table2"."yearfield" IN (2014) )
> Here is the error stack:
> java.lang.ClassCastException: java.lang.Integer cannot be cast to java.math.BigDecimal
> at java.math.BigDecimal.compareTo(BigDecimal.java:219)
> at org.teiid.query.sql.symbol.Constant$2.compare(Constant.java:99)
> at org.teiid.query.eval.Evaluator.compare(Evaluator.java:581)
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:322)
> at org.teiid.query.eval.Evaluator.internalEvaluateTVL(Evaluator.java:236)
> at org.teiid.query.eval.Evaluator.evaluateTVL(Evaluator.java:225)
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:219)
> at org.teiid.query.processor.relational.JoinNode.matchesCriteria(JoinNode.java:353)
> at org.teiid.query.processor.relational.EnhancedSortMergeJoinStrategy.process(EnhancedSortMergeJoinStrategy.java:460)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:227)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)
> at org.teiid.query.processor.BatchCollector$BatchProducerTupleSource.nextTuple(BatchCollector.java:94)
> at org.teiid.query.processor.relational.GroupingNode.groupSortPhase(GroupingNode.java:490)
> at org.teiid.query.processor.relational.GroupingNode.nextBatchDirect(GroupingNode.java:366)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:148)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146)
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:457)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:339)
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:267)
> at org.teiid.dqp.internal.process.DQPCore.executeRequest(DQPCore.java:306)
> at org.teiid.dqp.internal.process.DQPCore.executeRequest(DQPCore.java:238)
> at sun.reflect.GeneratedMethodAccessor260.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.teiid.transport.LocalServerConnection$1$1.call(LocalServerConnection.java:175)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:260)
> at org.teiid.transport.LocalServerConnection$1.invoke(LocalServerConnection.java:173)
> at com.sun.proxy.$Proxy31.executeRequest(Unknown Source)
> at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:667)
> at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:533)
> at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:1068)
> at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:320)
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 11 months
[JBoss JIRA] (TEIID-3879) Error during state transfer prevents a node from loading later
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3879?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-3879.
-----------------------------------
Resolution: Done
Updated the logic allow for other nodes to load even if a remote node is loaded. Also made several minor changes to prevent unnecessary invalidation.
> Error during state transfer prevents a node from loading later
> --------------------------------------------------------------
>
> Key: TEIID-3879
> URL: https://issues.jboss.org/browse/TEIID-3879
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 8.13, 8.12.4
>
>
> During an initial transfer or a later transfer after invalidation an error will cause the receiving node to just wait for the next load (which could be indefinite) rather than initiating it's own load.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 11 months
[JBoss JIRA] (TEIID-3878) java.lang.Integer cannot be cast to java.math.BigDecimal
by Mark Tawk (JIRA)
[ https://issues.jboss.org/browse/TEIID-3878?page=com.atlassian.jira.plugin... ]
Mark Tawk commented on TEIID-3878:
----------------------------------
You find attached a script containing the DDL of the tables along with the concerned query.
> java.lang.Integer cannot be cast to java.math.BigDecimal
> --------------------------------------------------------
>
> Key: TEIID-3878
> URL: https://issues.jboss.org/browse/TEIID-3878
> Project: Teiid
> Issue Type: Feature Request
> Reporter: Mark Tawk
> Assignee: Steven Hawkins
> Priority: Critical
> Attachments: TEIID-3878.sql
>
>
> I'm using Teiid 8.11.3 with oracle translator.
> I have an aggregated query using teiid materialized views with the following simplified criteria:
> (CASE WHEN ( "table1"."field1" = 1 ) THEN "table2"."yearfield" ELSE null END IN (2014) )
> The above criteria is reproducing a ClassCastException Integer cannot be cast to BigDecimal
> if I change the criteria to the following, it passes without a problem:
> ("table2"."yearfield" IN (2014) )
> Here is the error stack:
> java.lang.ClassCastException: java.lang.Integer cannot be cast to java.math.BigDecimal
> at java.math.BigDecimal.compareTo(BigDecimal.java:219)
> at org.teiid.query.sql.symbol.Constant$2.compare(Constant.java:99)
> at org.teiid.query.eval.Evaluator.compare(Evaluator.java:581)
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:322)
> at org.teiid.query.eval.Evaluator.internalEvaluateTVL(Evaluator.java:236)
> at org.teiid.query.eval.Evaluator.evaluateTVL(Evaluator.java:225)
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:219)
> at org.teiid.query.processor.relational.JoinNode.matchesCriteria(JoinNode.java:353)
> at org.teiid.query.processor.relational.EnhancedSortMergeJoinStrategy.process(EnhancedSortMergeJoinStrategy.java:460)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:227)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)
> at org.teiid.query.processor.BatchCollector$BatchProducerTupleSource.nextTuple(BatchCollector.java:94)
> at org.teiid.query.processor.relational.GroupingNode.groupSortPhase(GroupingNode.java:490)
> at org.teiid.query.processor.relational.GroupingNode.nextBatchDirect(GroupingNode.java:366)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:148)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146)
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:457)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:339)
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:267)
> at org.teiid.dqp.internal.process.DQPCore.executeRequest(DQPCore.java:306)
> at org.teiid.dqp.internal.process.DQPCore.executeRequest(DQPCore.java:238)
> at sun.reflect.GeneratedMethodAccessor260.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.teiid.transport.LocalServerConnection$1$1.call(LocalServerConnection.java:175)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:260)
> at org.teiid.transport.LocalServerConnection$1.invoke(LocalServerConnection.java:173)
> at com.sun.proxy.$Proxy31.executeRequest(Unknown Source)
> at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:667)
> at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:533)
> at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:1068)
> at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:320)
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 11 months
[JBoss JIRA] (TEIID-3878) java.lang.Integer cannot be cast to java.math.BigDecimal
by Mark Tawk (JIRA)
[ https://issues.jboss.org/browse/TEIID-3878?page=com.atlassian.jira.plugin... ]
Mark Tawk updated TEIID-3878:
-----------------------------
Attachment: TEIID-3878.sql
> java.lang.Integer cannot be cast to java.math.BigDecimal
> --------------------------------------------------------
>
> Key: TEIID-3878
> URL: https://issues.jboss.org/browse/TEIID-3878
> Project: Teiid
> Issue Type: Feature Request
> Reporter: Mark Tawk
> Assignee: Steven Hawkins
> Priority: Critical
> Attachments: TEIID-3878.sql
>
>
> I'm using Teiid 8.11.3 with oracle translator.
> I have an aggregated query using teiid materialized views with the following simplified criteria:
> (CASE WHEN ( "table1"."field1" = 1 ) THEN "table2"."yearfield" ELSE null END IN (2014) )
> The above criteria is reproducing a ClassCastException Integer cannot be cast to BigDecimal
> if I change the criteria to the following, it passes without a problem:
> ("table2"."yearfield" IN (2014) )
> Here is the error stack:
> java.lang.ClassCastException: java.lang.Integer cannot be cast to java.math.BigDecimal
> at java.math.BigDecimal.compareTo(BigDecimal.java:219)
> at org.teiid.query.sql.symbol.Constant$2.compare(Constant.java:99)
> at org.teiid.query.eval.Evaluator.compare(Evaluator.java:581)
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:322)
> at org.teiid.query.eval.Evaluator.internalEvaluateTVL(Evaluator.java:236)
> at org.teiid.query.eval.Evaluator.evaluateTVL(Evaluator.java:225)
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:219)
> at org.teiid.query.processor.relational.JoinNode.matchesCriteria(JoinNode.java:353)
> at org.teiid.query.processor.relational.EnhancedSortMergeJoinStrategy.process(EnhancedSortMergeJoinStrategy.java:460)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:227)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)
> at org.teiid.query.processor.BatchCollector$BatchProducerTupleSource.nextTuple(BatchCollector.java:94)
> at org.teiid.query.processor.relational.GroupingNode.groupSortPhase(GroupingNode.java:490)
> at org.teiid.query.processor.relational.GroupingNode.nextBatchDirect(GroupingNode.java:366)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:148)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146)
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:457)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:339)
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:267)
> at org.teiid.dqp.internal.process.DQPCore.executeRequest(DQPCore.java:306)
> at org.teiid.dqp.internal.process.DQPCore.executeRequest(DQPCore.java:238)
> at sun.reflect.GeneratedMethodAccessor260.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.teiid.transport.LocalServerConnection$1$1.call(LocalServerConnection.java:175)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:260)
> at org.teiid.transport.LocalServerConnection$1.invoke(LocalServerConnection.java:173)
> at com.sun.proxy.$Proxy31.executeRequest(Unknown Source)
> at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:667)
> at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:533)
> at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:1068)
> at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:320)
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 11 months
[JBoss JIRA] (TEIID-3879) Error during state transfer prevents a node from loading later
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-3879:
-------------------------------------
Summary: Error during state transfer prevents a node from loading later
Key: TEIID-3879
URL: https://issues.jboss.org/browse/TEIID-3879
Project: Teiid
Issue Type: Bug
Components: Query Engine
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 8.13, 8.12.4
During an initial transfer or a later transfer after invalidation an error will cause the receiving node to just wait for the next load (which could be indefinite) rather than initiating it's own load.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 11 months
[JBoss JIRA] (TEIID-3872) Error with odata entity create with generated keys
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3872?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-3872:
----------------------------------
Component/s: JDBC Connector
Query Engine
> Error with odata entity create with generated keys
> --------------------------------------------------
>
> Key: TEIID-3872
> URL: https://issues.jboss.org/browse/TEIID-3872
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector, Query Engine
> Environment: MacOS X El Capitan, Teiid 8.12.2, Jbossdev studio, Oracle 11g
> Reporter: Ivan Lucas Vargas
> Assignee: Steven Hawkins
>
> Forum thread: https://developer.jboss.org/message/947527
> When trying to insert a record thru odata2 request when the ID field is mapped as an Oracle Sequence as described in the documentation as *<element name>:SEQUENCE=<sequence name>.<sequence value> *(https://docs.jboss.org/author/display/teiid812final/Oracle+Translator), the following error occurs:
> TEIID16013 Error occurred producing OData result.: java.lang.IllegalArgumentException: Cannot infer EdmType for java type: oracle.sql.ROWID
> at org.odata4j.core.OProperties.simple(OProperties.java:40) [odata-core-0.8.10.jar:0.8.10]
> at org.teiid.odata.ODataSQLBuilder.buildEntityKey(ODataSQLBuilder.java:678) [classes:]
> at org.teiid.odata.TeiidProducer.createEntity(TeiidProducer.java:232) [classes:]
> at org.odata4j.producer.resources.EntitiesRequestResource.createEntity(EntitiesRequestResource.java:129) [odata-core-0.8.10.jar:0.8.10]
> at org.odata4j.producer.resources.EntitiesRequestResource.createEntity(EntitiesRequestResource.java:116) [odata-core-0.8.10.jar:0.8.10]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_45]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_45]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_45]
> at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_45]
> at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:168) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]
> at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]
> at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]
> at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]
> at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:541) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]
> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:523) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]
> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:125) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]
> at org.teiid.odata.ODataServletContainerDispatcher.service(ODataServletContainerDispatcher.java:118) [classes:]
> at org.teiid.odata.ODataServlet.service(ODataServlet.java:65) [classes:]
> at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.3.Final.jar:7.5.3.Final]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.3.Final.jar:7.5.3.Final]
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.3.Final.jar:7.5.3.Final]
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.3.Final.jar:7.5.3.Final]
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:512) [jbossweb-7.5.3.Final.jar:7.5.3.Final]
> at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.0.Final-redhat-15.jar:7.5.0.Final-redhat-15]
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) [jbossweb-7.5.3.Final.jar:7.5.3.Final]
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.3.Final.jar:7.5.3.Final]
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.3.Final.jar:7.5.3.Final]
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.5.3.Final.jar:7.5.3.Final]
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854) [jbossweb-7.5.3.Final.jar:7.5.3.Final]
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.5.3.Final.jar:7.5.3.Final]
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.3.Final.jar:7.5.3.Final]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_45]
>
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 11 months
[JBoss JIRA] (TEIID-3872) Error with odata entity create with generated keys
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3872?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-3872:
----------------------------------
Summary: Error with odata entity create with generated keys (was: Oracle Sequence error: Cannot infer EdmType for java type: oracle.sql.ROWID)
> Error with odata entity create with generated keys
> --------------------------------------------------
>
> Key: TEIID-3872
> URL: https://issues.jboss.org/browse/TEIID-3872
> Project: Teiid
> Issue Type: Bug
> Environment: MacOS X El Capitan, Teiid 8.12.2, Jbossdev studio, Oracle 11g
> Reporter: Ivan Lucas Vargas
> Assignee: Steven Hawkins
>
> Forum thread: https://developer.jboss.org/message/947527
> When trying to insert a record thru odata2 request when the ID field is mapped as an Oracle Sequence as described in the documentation as *<element name>:SEQUENCE=<sequence name>.<sequence value> *(https://docs.jboss.org/author/display/teiid812final/Oracle+Translator), the following error occurs:
> TEIID16013 Error occurred producing OData result.: java.lang.IllegalArgumentException: Cannot infer EdmType for java type: oracle.sql.ROWID
> at org.odata4j.core.OProperties.simple(OProperties.java:40) [odata-core-0.8.10.jar:0.8.10]
> at org.teiid.odata.ODataSQLBuilder.buildEntityKey(ODataSQLBuilder.java:678) [classes:]
> at org.teiid.odata.TeiidProducer.createEntity(TeiidProducer.java:232) [classes:]
> at org.odata4j.producer.resources.EntitiesRequestResource.createEntity(EntitiesRequestResource.java:129) [odata-core-0.8.10.jar:0.8.10]
> at org.odata4j.producer.resources.EntitiesRequestResource.createEntity(EntitiesRequestResource.java:116) [odata-core-0.8.10.jar:0.8.10]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_45]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_45]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_45]
> at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_45]
> at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:168) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]
> at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]
> at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]
> at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]
> at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:541) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]
> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:523) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]
> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:125) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]
> at org.teiid.odata.ODataServletContainerDispatcher.service(ODataServletContainerDispatcher.java:118) [classes:]
> at org.teiid.odata.ODataServlet.service(ODataServlet.java:65) [classes:]
> at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.3.Final.jar:7.5.3.Final]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.3.Final.jar:7.5.3.Final]
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.3.Final.jar:7.5.3.Final]
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.3.Final.jar:7.5.3.Final]
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:512) [jbossweb-7.5.3.Final.jar:7.5.3.Final]
> at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.0.Final-redhat-15.jar:7.5.0.Final-redhat-15]
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) [jbossweb-7.5.3.Final.jar:7.5.3.Final]
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.3.Final.jar:7.5.3.Final]
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.3.Final.jar:7.5.3.Final]
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.5.3.Final.jar:7.5.3.Final]
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854) [jbossweb-7.5.3.Final.jar:7.5.3.Final]
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.5.3.Final.jar:7.5.3.Final]
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.3.Final.jar:7.5.3.Final]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_45]
>
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 11 months
[JBoss JIRA] (TEIID-3878) java.lang.Integer cannot be cast to java.math.BigDecimal
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3878?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-3878:
---------------------------------------
Can you provide the DDL for table1/table2?
> java.lang.Integer cannot be cast to java.math.BigDecimal
> --------------------------------------------------------
>
> Key: TEIID-3878
> URL: https://issues.jboss.org/browse/TEIID-3878
> Project: Teiid
> Issue Type: Feature Request
> Reporter: Mark Tawk
> Assignee: Steven Hawkins
> Priority: Critical
>
> I'm using Teiid 8.11.3 with oracle translator.
> I have an aggregated query using teiid materialized views with the following simplified criteria:
> (CASE WHEN ( "table1"."field1" = 1 ) THEN "table2"."yearfield" ELSE null END IN (2014) )
> The above criteria is reproducing a ClassCastException Integer cannot be cast to BigDecimal
> if I change the criteria to the following, it passes without a problem:
> ("table2"."yearfield" IN (2014) )
> Here is the error stack:
> java.lang.ClassCastException: java.lang.Integer cannot be cast to java.math.BigDecimal
> at java.math.BigDecimal.compareTo(BigDecimal.java:219)
> at org.teiid.query.sql.symbol.Constant$2.compare(Constant.java:99)
> at org.teiid.query.eval.Evaluator.compare(Evaluator.java:581)
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:322)
> at org.teiid.query.eval.Evaluator.internalEvaluateTVL(Evaluator.java:236)
> at org.teiid.query.eval.Evaluator.evaluateTVL(Evaluator.java:225)
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:219)
> at org.teiid.query.processor.relational.JoinNode.matchesCriteria(JoinNode.java:353)
> at org.teiid.query.processor.relational.EnhancedSortMergeJoinStrategy.process(EnhancedSortMergeJoinStrategy.java:460)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:227)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)
> at org.teiid.query.processor.BatchCollector$BatchProducerTupleSource.nextTuple(BatchCollector.java:94)
> at org.teiid.query.processor.relational.GroupingNode.groupSortPhase(GroupingNode.java:490)
> at org.teiid.query.processor.relational.GroupingNode.nextBatchDirect(GroupingNode.java:366)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:148)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146)
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:457)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:339)
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:267)
> at org.teiid.dqp.internal.process.DQPCore.executeRequest(DQPCore.java:306)
> at org.teiid.dqp.internal.process.DQPCore.executeRequest(DQPCore.java:238)
> at sun.reflect.GeneratedMethodAccessor260.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.teiid.transport.LocalServerConnection$1$1.call(LocalServerConnection.java:175)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:260)
> at org.teiid.transport.LocalServerConnection$1.invoke(LocalServerConnection.java:173)
> at com.sun.proxy.$Proxy31.executeRequest(Unknown Source)
> at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:667)
> at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:533)
> at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:1068)
> at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:320)
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 11 months