[JBoss JIRA] (TEIID-5192) Osisoft Translator - selecting ABS on a long value causes NPE
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-5192?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on TEIID-5192:
------------------------------------------------
Van Halbert <vhalbert(a)redhat.com> changed the Status of [bug 1530204|https://bugzilla.redhat.com/show_bug.cgi?id=1530204] from MODIFIED to ON_QA
> Osisoft Translator - selecting ABS on a long value causes NPE
> -------------------------------------------------------------
>
> Key: TEIID-5192
> URL: https://issues.jboss.org/browse/TEIID-5192
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 8.12.x-6.4
> Reporter: Andrej Šmigala
> Assignee: Ramesh Reddy
> Fix For: 8.12.x-6.4, 10.1
>
>
> Running a query such as
> {code:sql}
> SELECT LongNum, ABS(LongNum) AS ABSLongNum FROM BQT2.SmallB
> {code}
> results in a NullPointerException while translating the results. The type of LongNum column on the datasource is int64.
> This does not happen with other column types (integer, float, double).
> When running an equivalent query directly against the Osisoft PI datasource, the correct results are returned and the type of the ABS column is Single (i.e. float). It appears the translator tries to get the ABS value as long, see stacktrace.
> Stacktrace:
> {noformat}
> [org.jboss.jca.core.connectionmanager.listener.TxConnectionListener] (Worker15_QueryProcessorQueue84) IJ000305: Connection error occured: org.jboss.jca.core.connectionmanager.listener.TxConnectionListener@4b1e4616[state=NORMAL managed connection=org.jboss.jca.adapters.jdbc.local.LocalManagedConnection@51027396 connection handles=1 lastUse=1514883684240 trackByTx=false pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool@39789e04 pool internal context=SemaphoreArrayListManagedConnectionPool@6732a357[pool=osisoft] xaResource=LocalXAResourceImpl@52da36f6[connectionListener=4b1e4616 connectionManager=63a083c7 warned=false currentXid=null productName=PI SQL Data Access Server 1.5.16302.2 using PIOLEDBENT productVersion=PIOLEDBENT: 1.4.2.95 jndiName=java:/osisoft] txSync=null]: java.lang.NullPointerException
> at com.osisoft.jdbc.ResultSetImpl.getLong(ResultSetImpl.java:478)
> at org.jboss.jca.adapters.jdbc.WrappedResultSet.getLong(WrappedResultSet.java:1094)
> at org.teiid.translator.jdbc.JDBCExecutionFactory.retrieveValue(JDBCExecutionFactory.java:1004) [translator-jdbc-8.12.11.6_4-redhat-64-9.jar:8.12.11.6_4-redhat-64-9]
> at org.teiid.translator.jdbc.pi.PIExecutionFactory.retrieveValue(PIExecutionFactory.java:322) [translator-jdbc-8.12.11.6_4-redhat-64-9.jar:8.12.11.6_4-redhat-64-9]
> at org.teiid.translator.jdbc.JDBCQueryExecution.next(JDBCQueryExecution.java:344) [translator-jdbc-8.12.11.6_4-redhat-64-9.jar:8.12.11.6_4-redhat-64-9]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.handleBatch(ConnectorWorkItem.java:431)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.more(ConnectorWorkItem.java:234)
> at sun.reflect.GeneratedMethodAccessor170.invoke(Unknown Source) [:1.8.0_141]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_141]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_141]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy79.more(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:309)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_141]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:284)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_141]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_141]
> at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_141]
> 10:01:31,699 WARN [org.teiid.CONNECTOR] (Worker15_QueryProcessorQueue84) Connector worker process failed for atomic-request=xcwUXrxLs9We.26.0.18: org.teiid.translator.TranslatorException: Unexpected exception while translating results: Error
> at org.teiid.translator.jdbc.JDBCQueryExecution.next(JDBCQueryExecution.java:351) [translator-jdbc-8.12.11.6_4-redhat-64-9.jar:8.12.11.6_4-redhat-64-9]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.handleBatch(ConnectorWorkItem.java:431)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.more(ConnectorWorkItem.java:234)
> at sun.reflect.GeneratedMethodAccessor170.invoke(Unknown Source) [:1.8.0_141]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_141]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_141]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy79.more(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:309)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_141]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:284)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_141]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_141]
> at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_141]
> Caused by: java.sql.SQLException: Error
> at org.jboss.jca.adapters.jdbc.WrappedConnection.checkException(WrappedConnection.java:1687)
> at org.jboss.jca.adapters.jdbc.WrappedStatement.checkException(WrappedStatement.java:1267)
> at org.jboss.jca.adapters.jdbc.WrappedResultSet.checkException(WrappedResultSet.java:4063)
> at org.jboss.jca.adapters.jdbc.WrappedResultSet.getLong(WrappedResultSet.java:1098)
> at org.teiid.translator.jdbc.JDBCExecutionFactory.retrieveValue(JDBCExecutionFactory.java:1004) [translator-jdbc-8.12.11.6_4-redhat-64-9.jar:8.12.11.6_4-redhat-64-9]
> at org.teiid.translator.jdbc.pi.PIExecutionFactory.retrieveValue(PIExecutionFactory.java:322) [translator-jdbc-8.12.11.6_4-redhat-64-9.jar:8.12.11.6_4-redhat-64-9]
> at org.teiid.translator.jdbc.JDBCQueryExecution.next(JDBCQueryExecution.java:344) [translator-jdbc-8.12.11.6_4-redhat-64-9.jar:8.12.11.6_4-redhat-64-9]
> ... 18 more
> Caused by: java.lang.NullPointerException
> at com.osisoft.jdbc.ResultSetImpl.getLong(ResultSetImpl.java:478)
> at org.jboss.jca.adapters.jdbc.WrappedResultSet.getLong(WrappedResultSet.java:1094)
> ... 21 more
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months
[JBoss JIRA] (TEIID-5194) Osisoft translator - MAX and MIN on boolean column cause an error
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-5194?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on TEIID-5194:
------------------------------------------------
Van Halbert <vhalbert(a)redhat.com> changed the Status of [bug 1530289|https://bugzilla.redhat.com/show_bug.cgi?id=1530289] from MODIFIED to ON_QA
> Osisoft translator - MAX and MIN on boolean column cause an error
> -----------------------------------------------------------------
>
> Key: TEIID-5194
> URL: https://issues.jboss.org/browse/TEIID-5194
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 8.12.x-6.4
> Reporter: Andrej Šmigala
> Assignee: Ramesh Reddy
> Fix For: 8.12.x-6.4, 10.1
>
>
> Running a query such as
> {code:sql}
> SELECT MAX(BooleanValue) FROM BQT1.SmallA
> {code}
> fails with the following exception:
> {noformat}
> java.lang.ClassCastException: java.lang.Byte cannot be cast to java.lang.Boolean
> at com.osisoft.jdbc.ResultSetImpl.getBoolean(ResultSetImpl.java:407)
> at org.jboss.jca.adapters.jdbc.WrappedResultSet.getBoolean(WrappedResultSet.java:594)
> ... 22 more
> {noformat}
> Same issue occurs when using MIN.
> Running an equivalent query directly against the Osisoft PI datasource returns the correct result, with the return type being int8 (i.e. byte)
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months
[JBoss JIRA] (TEIID-5216) JBOSS - Teiid 9.2.1 unable to return DateTimeOffset ODatatype values
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5216?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5216.
-----------------------------------
Resolution: Done
Resolving by adding a doc note about using the automatically imported metadata and expectations for the native type property.
> JBOSS - Teiid 9.2.1 unable to return DateTimeOffset ODatatype values
> --------------------------------------------------------------------
>
> Key: TEIID-5216
> URL: https://issues.jboss.org/browse/TEIID-5216
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Affects Versions: 9.2.1
> Environment: All
> Reporter: Pushkar Kamra
> Assignee: Steven Hawkins
> Fix For: 10.1
>
> Attachments: screenshot-1.png
>
>
> During the time of requesting ODatatype - DateTimeOffset from the from the following service - http://services.odata.org/V4/Northwind/Northwind.svc/
> Query - Select * from Employees.
> Using the above query it is unable to return DateTimeOffset values for it and returns the
> following error -
> java.lang.IllegalArgumentException: No enum constant org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind.TimeOffset
> at java.lang.Enum.valueOf(Enum.java:238)
> at org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind.valueOf(EdmPrimitiveTypeKind.java:24)
> at org.teiid.olingo.common.ODataTypeManager.parseLiteral(ODataTypeManager.java:332)
> at org.teiid.olingo.common.ODataTypeManager.convertToTeiidRuntimeType(ODataTypeManager.java:184)
> at org.teiid.translator.odata4.BaseQueryExecution.buildRow(BaseQueryExecution.java:244)
> at org.teiid.translator.odata4.ODataQueryExecution.next(ODataQueryExecution.java:122)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.handleBatch(ConnectorWorkItem.java:435)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.more(ConnectorWorkItem.java:238)
> at sun.reflect.GeneratedMethodAccessor480.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:220)
> at com.sun.proxy.$Proxy398.more(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:309)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:282)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> From the initial level analysis and observation is has been observed teiid class - ODataTypeManager in that parselitreals method where ODatatype.Substring(4) is done which is causing the issue which is changing DateTimeOffset to TimeOffset and when it tries to find the Enum constant from the EdmPrimitiveTypeKind list it is unable find the changed name and this seems to be causing the issue in accessing the DateTimeOffset type datas from the containing tables.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months
[JBoss JIRA] (TEIID-5221) OData4 Translator generates invalid metadata
by Ramesh Reddy (JIRA)
Ramesh Reddy created TEIID-5221:
-----------------------------------
Summary: OData4 Translator generates invalid metadata
Key: TEIID-5221
URL: https://issues.jboss.org/browse/TEIID-5221
Project: Teiid
Issue Type: Bug
Components: Misc. Connectors, OData
Affects Versions: 8.12
Reporter: Ramesh Reddy
Assignee: Ramesh Reddy
The OData V4 translator does not generate metadata correctly in situations
1) When multiple navigations are defined on the EnitityType.
2) The PSEDEO column usage is incorrect, as this should be only used with ComplexType structures when the association to EntityType is made. But this is also used in cases where incorrect referential constraints are used. This may lead to the additional columns on Entities which are hard to resolve during the runtime.
3) Usage of MERGE property is also incorrect when multiple navigation properties are defined as these may be overridden for (1)
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months
[JBoss JIRA] (TEIID-5216) JBOSS - Teiid 9.2.1 unable to return DateTimeOffset ODatatype values
by Pushkar Kamra (JIRA)
[ https://issues.jboss.org/browse/TEIID-5216?page=com.atlassian.jira.plugin... ]
Pushkar Kamra commented on TEIID-5216:
--------------------------------------
Hello Steven,
Issue seems to be resolved with Native type as changing into it worked fine.
Thanks, for the quick response and assistance for this issue.
thanks,
Pushkar
> JBOSS - Teiid 9.2.1 unable to return DateTimeOffset ODatatype values
> --------------------------------------------------------------------
>
> Key: TEIID-5216
> URL: https://issues.jboss.org/browse/TEIID-5216
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Affects Versions: 9.2.1
> Environment: All
> Reporter: Pushkar Kamra
> Assignee: Steven Hawkins
> Fix For: 10.1
>
> Attachments: screenshot-1.png
>
>
> During the time of requesting ODatatype - DateTimeOffset from the from the following service - http://services.odata.org/V4/Northwind/Northwind.svc/
> Query - Select * from Employees.
> Using the above query it is unable to return DateTimeOffset values for it and returns the
> following error -
> java.lang.IllegalArgumentException: No enum constant org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind.TimeOffset
> at java.lang.Enum.valueOf(Enum.java:238)
> at org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind.valueOf(EdmPrimitiveTypeKind.java:24)
> at org.teiid.olingo.common.ODataTypeManager.parseLiteral(ODataTypeManager.java:332)
> at org.teiid.olingo.common.ODataTypeManager.convertToTeiidRuntimeType(ODataTypeManager.java:184)
> at org.teiid.translator.odata4.BaseQueryExecution.buildRow(BaseQueryExecution.java:244)
> at org.teiid.translator.odata4.ODataQueryExecution.next(ODataQueryExecution.java:122)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.handleBatch(ConnectorWorkItem.java:435)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.more(ConnectorWorkItem.java:238)
> at sun.reflect.GeneratedMethodAccessor480.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:220)
> at com.sun.proxy.$Proxy398.more(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:309)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:282)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> From the initial level analysis and observation is has been observed teiid class - ODataTypeManager in that parselitreals method where ODatatype.Substring(4) is done which is causing the issue which is changing DateTimeOffset to TimeOffset and when it tries to find the Enum constant from the EdmPrimitiveTypeKind list it is unable find the changed name and this seems to be causing the issue in accessing the DateTimeOffset type datas from the containing tables.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months
[JBoss JIRA] (TEIID-4380) ODatat 4 deep insert works for only a single expand
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4380?page=com.atlassian.jira.plugin... ]
Steven Hawkins edited comment on TEIID-4380 at 1/17/18 3:51 PM:
----------------------------------------------------------------
[~mkosiarc] The resolution of this issue was to throw an exception if more than one expand was used. The title was not updated to reflect that it did not test/address anything with the number of levels. I've updated the title. A new issue would be needed if you find a problem with the number of expansion levels.
was (Author: shawkins):
[~mkosiarc] The resolution of this issue was to throw an exception if more than one expand was used. The title was not updated to reflect that it did not test/address anything with the number of levels.
> ODatat 4 deep insert works for only a single expand
> ---------------------------------------------------
>
> Key: TEIID-4380
> URL: https://issues.jboss.org/browse/TEIID-4380
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 9.1, 8.12.x-6.4
>
>
> Inserting an entity with a graph more complicated than a single expand won't work as expected - in most cases an exception will be thrown after the inserts are performed / committed.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months
[JBoss JIRA] (TEIID-4380) ODatat 4 deep insert works for only a single expand level
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4380?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4380:
---------------------------------------
[~mkosiarc] The resolution of this issue was to throw an exception if more than one expand was used. The title was not updated to reflect that it did not test/address anything with the number of levels.
> ODatat 4 deep insert works for only a single expand level
> ---------------------------------------------------------
>
> Key: TEIID-4380
> URL: https://issues.jboss.org/browse/TEIID-4380
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 9.1, 8.12.x-6.4
>
>
> Inserting an entity with a graph more complicated than a single expand won't work as expected - in most cases an exception will be thrown after the inserts are performed / committed.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months