[JBoss JIRA] (TEIID-4608) Insert statement - multi-value insert into view - incorrect type resolution if first tuple contains NULL
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4608?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-4608:
----------------------------------
Component/s: Query Engine
Fix Version/s: 9.2
9.0.6
9.1.2
Priority: Blocker (was: Major)
There is an issue in the trigger action planning logic that causing the null value in the first projection to be mapped to all null values (including columns that are not changing). This causes values to be misaligned in subsequent projections. Also upping the priority since this could insert inappropriate data.
> Insert statement - multi-value insert into view - incorrect type resolution if first tuple contains NULL
> --------------------------------------------------------------------------------------------------------
>
> Key: TEIID-4608
> URL: https://issues.jboss.org/browse/TEIID-4608
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.12.5
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Priority: Blocker
> Fix For: 9.2, 9.0.6, 9.1.2
>
>
> If first tuple of multi-value insert contains NULL value (regular statement, not prepared statement), Teiid is not able to resolve types properly.
> *Example 1:*
> IntKey - primary key, type integer
> IntNum - regular column, type integer
> {code:sql}
> INSERT INTO tablea (IntKey, IntNum) VALUES (1, null), (2, 2);
> {code}
> This query ends with ClassCastException:
> {code:plain}
> 14:24:39,133 ERROR [org.teiid.CONNECTOR] (Worker8_QueryProcessorQueue105) Connector worker process failed for atomic-request=8V7FTKxvQ5zY.14.0.34: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Float
> at org.teiid.translator.jdbc.JDBCExecutionFactory.bindValue(JDBCExecutionFactory.java:957) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.translator.jdbc.sybase.BaseSybaseExecutionFactory.bindValue(BaseSybaseExecutionFactory.java:147) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.translator.jdbc.JDBCBaseExecution.bind(JDBCBaseExecution.java:107) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.translator.jdbc.JDBCUpdateExecution.executeTranslatedCommand(JDBCUpdateExecution.java:243) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.translator.jdbc.JDBCUpdateExecution.execute(JDBCUpdateExecution.java:84) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem$1.execute(ConnectorWorkItem.java:402)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364)
> at sun.reflect.GeneratedMethodAccessor137.invoke(Unknown Source) [:1.8.0-internal]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0-internal]
> at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0-internal]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy48.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)
> at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:142)
> at org.teiid.query.processor.relational.ProjectIntoNode.checkExitConditions(ProjectIntoNode.java:257)
> at org.teiid.query.processor.relational.ProjectIntoNode.nextBatchDirect(ProjectIntoNode.java:228)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282)
> 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:472)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348)
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> 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:1142) [rt.jar:1.8.0-internal]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0-internal]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0-internal]
> 14:24:39,136 ERROR [org.teiid.PROCESSOR] (Worker8_QueryProcessorQueue105) TEIID30019 Unexpected exception for request 8V7FTKxvQ5zY.14: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Float
> at org.teiid.translator.jdbc.JDBCExecutionFactory.bindValue(JDBCExecutionFactory.java:957)
> at org.teiid.translator.jdbc.sybase.BaseSybaseExecutionFactory.bindValue(BaseSybaseExecutionFactory.java:147)
> at org.teiid.translator.jdbc.JDBCBaseExecution.bind(JDBCBaseExecution.java:107)
> at org.teiid.translator.jdbc.JDBCUpdateExecution.executeTranslatedCommand(JDBCUpdateExecution.java:243)
> at org.teiid.translator.jdbc.JDBCUpdateExecution.execute(JDBCUpdateExecution.java:84)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem$1.execute(ConnectorWorkItem.java:402) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at sun.reflect.GeneratedMethodAccessor137.invoke(Unknown Source) [:1.8.0-internal]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0-internal]
> at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0-internal]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at com.sun.proxy.$Proxy48.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:142) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.ProjectIntoNode.checkExitConditions(ProjectIntoNode.java:257) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.ProjectIntoNode.nextBatchDirect(ProjectIntoNode.java:228) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:472) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0-internal]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0-internal]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0-internal]
> {code}
> If I switch tuples, no exception occurs and insert finishes successfully.
> {code:sql}
> INSERT INTO tablea (IntKey, IntNum) VALUES (2, 2), (1, null);
> {code}
> *Example 2*
> IntKey - primary key, type integer
> CharValue - regular column, type char
> {code:sql}
> INSERT INTO tablea (IntKey, CharValue) VALUES (1, null), (2, convert('+', char));
> {code}
> This query ends with TEIID30328 Unable to evaluate convert(X.expr2, short):...
> {code:plain}
> 14:41:35,053 WARN [org.teiid.PROCESSOR] (Worker14_QueryProcessorQueue136) TEIID30020 Processing exception for request 8V7FTKxvQ5zY.30 'TEIID30328 Unable to evaluate convert(X.expr2, short): TEIID30384 Error while evaluating function convert'. Originally ExpressionEvaluationException 'TEIID10076 Invalid conversion from type class java.lang.Character with value '+' to type class java.lang.Short' DataTypeManager.java:940. Enable more detailed logging to see the entire stacktrace.
> {code}
> Again, switching tuples resolves the issue.
> {code:sql}
> INSERT INTO tablea (IntKey, CharValue) VALUES (2, convert('+', char)), (1, null);
> {code}
> This occurs only in case of view with defined _trigger instead of insert_. Here is my VDB for MSSQL, but I can see same behavior for MySql and PostgreSQL
> {code:xml}
> <metadata type="DDL">
> CREATE FOREIGN TABLE SmallA (IntKey integer PRIMARY KEY,
> StringKey string,
> IntNum integer,
> StringNum string,
> FloatNum float,
> LongNum bigint,
> DoubleNum double,
> ByteNum smallint,
> DateValue date,
> TimeValue time,
> TimestampValue timestamp,
> BooleanValue boolean,
> CharValue char(1),
> ShortValue smallint,
> BigIntegerValue decimal,
> BigDecimalValue decimal,
> ObjectValue blob)
> OPTIONS (UPDATABLE 'TRUE');
> </metadata>
> ...
> <metadata type="DDL"><
> CREATE VIEW SmallA (IntKey integer PRIMARY KEY,
> StringKey string,
> IntNum integer,
> StringNum string,
> FloatNum float,
> LongNum long,
> DoubleNum double,
> ByteNum byte,
> DateValue date,
> TimeValue time,
> TimestampValue timestamp,
> BooleanValue boolean,
> CharValue char,
> ShortValue short,
> BigIntegerValue biginteger,
> BigDecimalValue bigdecimal,
> ObjectValue object)
> OPTIONS (UPDATABLE 'TRUE')
> AS
> SELECT IntKey, StringKey, IntNum,
> StringNum, FloatNum, LongNum, DoubleNum,
> convert(ByteNum, byte) AS ByteNum, DateValue, TimeValue, TimestampValue,
> BooleanValue, CharValue, ShortValue,
> convert(BigIntegerValue, biginteger) AS BigIntegerValue, BigDecimalValue,
> convert(ObjectValue, object) AS ObjectValue
> FROM Source.SmallA;
> CREATE TRIGGER ON SmallA INSTEAD OF INSERT AS FOR EACH ROW
> BEGIN ATOMIC
> INSERT INTO Source.smalla (IntKey, StringKey, IntNum, StringNum, FloatNum, LongNum, DoubleNum, ByteNum, DateValue, TimeValue, TimestampValue, BooleanValue, CharValue, ShortValue, BigIntegerValue, BigDecimalValue, ObjectValue) VALUES
> (NEW.IntKey, NEW.StringKey, NEW.IntNum, NEW.StringNum, NEW.FloatNum, NEW.LongNum, NEW.DoubleNum, NEW.ByteNum, NEW.DateValue, NEW.TimeValue, NEW.TimestampValue,
> NEW.BooleanValue, NEW.CharValue, NEW.ShortValue, NEW.BigIntegerValue, NEW.BigDecimalValue, to_bytes(convert(NEW.ObjectValue, string), 'UTF-8'));
> END;
> </metadata>
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 4 months
[JBoss JIRA] (TEIID-4614) statement executeOlapQuery quietly fails
by Johnathon Lee (JIRA)
[ https://issues.jboss.org/browse/TEIID-4614?page=com.atlassian.jira.plugin... ]
Johnathon Lee commented on TEIID-4614:
--------------------------------------
[~shawkins] ok, I'll go back to how I was testing.
I added the exception block as prior testing was showing the block exiting on cellSet = stmt.executeOlapQuery(mdxQuery) with no other feedback... I'll see if I was missing something.
> statement executeOlapQuery quietly fails
> ----------------------------------------
>
> Key: TEIID-4614
> URL: https://issues.jboss.org/browse/TEIID-4614
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 9.x, 8.7.9.6_2
> Reporter: Johnathon Lee
> Assignee: Steven Hawkins
>
> cellSet = stmt.executeOlapQuery(mdxQuery) in OlapQueryExecution is quietly failing.
> modify execute method to add Exception catch and printStackTrace
> {code:java}
> // Some comments here
> public void execute() throws TranslatorException {
> try {
> stmt = this.connection.createStatement();
> cellSet = stmt.executeOlapQuery(mdxQuery);
> CellSetAxis rowAxis = this.cellSet.getAxes().get(Axis.ROWS.axisOrdinal());
> rowPositionIterator = rowAxis.iterator();
> columnsAxis = cellSet.getAxes().get(Axis.COLUMNS.axisOrdinal());
> colWidth = rowAxis.getAxisMetaData().getHierarchies().size() + this.columnsAxis.getPositions().size();
> } catch (SQLException e) {
> throw new TranslatorException(e);
> } catch (Exception e) {
> e.printStackTrace();
> } finally {
> System.out.println("in finally block");
> }
> }
> {code}
> run existing tests to see (not catching the exception has all tests passing)
> {code:java}
> Running org.teiid.translator.olap.TestOlapTranslator
> org.teiid.core.TeiidRuntimeException
> at org.teiid.translator.olap.OlapQueryExecution.execute(OlapQueryExecution.java:100)
> at org.teiid.translator.olap.TestOlapTranslator.testCannedProcedure(TestOlapTranslator.java:67)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
> at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
> at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
> at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
> at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
> at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
> in finally block
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.541 sec <<< FAILURE! - in org.teiid.translator.olap.TestOlapTranslator
> testCannedProcedure(org.teiid.translator.olap.TestOlapTranslator) Time elapsed: 0.54 sec <<< FAILURE!
> java.lang.AssertionError: null
> at org.junit.Assert.fail(Assert.java:86)
> at org.junit.Assert.fail(Assert.java:95)
> at org.teiid.translator.olap.TestOlapTranslator.testCannedProcedure(TestOlapTranslator.java:68)
> Results :
> Failed tests:
> TestOlapTranslator.testCannedProcedure:68 null
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 4 months
[JBoss JIRA] (TEIID-4298) Support in Odata4 for the Partner NavigationProperty attribute
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-4298?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration updated TEIID-4298:
-------------------------------------------
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1401028
Bugzilla Update: Perform
> Support in Odata4 for the Partner NavigationProperty attribute
> --------------------------------------------------------------
>
> Key: TEIID-4298
> URL: https://issues.jboss.org/browse/TEIID-4298
> Project: Teiid
> Issue Type: Enhancement
> Components: OData
> Affects Versions: 9.0
> Reporter: Mirco Marchitiello
> Assignee: Ramesh Reddy
> Labels: alpha2
> Fix For: 9.2
>
>
> in Teiid 9.0 it would be useful to create a bidirectional link between tables, like in odata2
> for example:
> <EntityType Name="Product">
> <Key>
> <PropertyRef Name="ProductID"/>
> </Key>
> <Property Name="ProductID" Type="Edm.Int32" Nullable="false" p5:StoreGeneratedPattern="Identity"/>
> <Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40"/>
> <Property Name="SupplierID" Type="Edm.Int32"/>
> <Property Name="CategoryID" Type="Edm.Int32"/>
> <Property Name="QuantityPerUnit" Type="Edm.String" MaxLength="20"/>
> <Property Name="UnitPrice" Type="Edm.Decimal" Precision="19" Scale="4"/>
> <Property Name="UnitsInStock" Type="Edm.Int16"/>
> <Property Name="UnitsOnOrder" Type="Edm.Int16"/><Property Name="ReorderLevel" Type="Edm.Int16"/>
> <Property Name="Discontinued" Type="Edm.Boolean" Nullable="false"/>
> <NavigationProperty Name="Category" Type="NorthwindModel.Category" Partner="Products">
> <ReferentialConstraint Property="CategoryID" ReferencedProperty="CategoryID"/>
> </NavigationProperty>
> <NavigationProperty Name="Order_Details" Type="Collection(NorthwindModel.Order_Detail)" Partner="Product"/>
> <NavigationProperty Name="Supplier" Type="NorthwindModel.Supplier" Partner="Products">
> <ReferentialConstraint Property="SupplierID" ReferencedProperty="SupplierID"/>
> </NavigationProperty>
> </EntityType>
> <EntityType Name="Category">
> <Key>
> <PropertyRef Name="CategoryID"/>
> </Key>
> <Property Name="CategoryID" Type="Edm.Int32" Nullable="false" p5:StoreGeneratedPattern="Identity"/>
> <Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15"/>
> <Property Name="Description" Type="Edm.String" MaxLength="max"/>
> <Property Name="Picture" Type="Edm.Binary" MaxLength="max"/>
> <NavigationProperty Name="Products" Type="Collection(NorthwindModel.Product)" Partner="Category"/>
> </EntityType>
> It seems that the two tables are related through NavigationProperty and Partner
> In fact I can see all the Categories of a certain Product
> http://services.odata.org/V4/Northwind/Northwind.svc/Products(10)/Category
> or viceversa the products of a certain Category
> http://services.odata.org/V4/Northwind/Northwind.svc/Categories(8)/Products
> While in Teiid using odata2 this works just by creating a FK from one table to the other one, with odata4 this does not happen
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 4 months
[JBoss JIRA] (TEIID-4614) statement executeOlapQuery quietly fails
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4614?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-4614.
-----------------------------------
Resolution: Rejected
Unchecked exceptions are simply handled in the ConnectorWorkItem - it does not quietly fail.
> statement executeOlapQuery quietly fails
> ----------------------------------------
>
> Key: TEIID-4614
> URL: https://issues.jboss.org/browse/TEIID-4614
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 9.x, 8.7.9.6_2
> Reporter: Johnathon Lee
> Assignee: Steven Hawkins
>
> cellSet = stmt.executeOlapQuery(mdxQuery) in OlapQueryExecution is quietly failing.
> modify execute method to add Exception catch and printStackTrace
> {code:java}
> // Some comments here
> public void execute() throws TranslatorException {
> try {
> stmt = this.connection.createStatement();
> cellSet = stmt.executeOlapQuery(mdxQuery);
> CellSetAxis rowAxis = this.cellSet.getAxes().get(Axis.ROWS.axisOrdinal());
> rowPositionIterator = rowAxis.iterator();
> columnsAxis = cellSet.getAxes().get(Axis.COLUMNS.axisOrdinal());
> colWidth = rowAxis.getAxisMetaData().getHierarchies().size() + this.columnsAxis.getPositions().size();
> } catch (SQLException e) {
> throw new TranslatorException(e);
> } catch (Exception e) {
> e.printStackTrace();
> } finally {
> System.out.println("in finally block");
> }
> }
> {code}
> run existing tests to see (not catching the exception has all tests passing)
> {code:java}
> Running org.teiid.translator.olap.TestOlapTranslator
> org.teiid.core.TeiidRuntimeException
> at org.teiid.translator.olap.OlapQueryExecution.execute(OlapQueryExecution.java:100)
> at org.teiid.translator.olap.TestOlapTranslator.testCannedProcedure(TestOlapTranslator.java:67)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
> at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
> at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
> at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
> at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
> at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
> in finally block
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.541 sec <<< FAILURE! - in org.teiid.translator.olap.TestOlapTranslator
> testCannedProcedure(org.teiid.translator.olap.TestOlapTranslator) Time elapsed: 0.54 sec <<< FAILURE!
> java.lang.AssertionError: null
> at org.junit.Assert.fail(Assert.java:86)
> at org.junit.Assert.fail(Assert.java:95)
> at org.teiid.translator.olap.TestOlapTranslator.testCannedProcedure(TestOlapTranslator.java:68)
> Results :
> Failed tests:
> TestOlapTranslator.testCannedProcedure:68 null
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 4 months
[JBoss JIRA] (TEIID-4614) statement executeOlapQuery quietly fails
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4614?page=com.atlassian.jira.plugin... ]
Work on TEIID-4614 started by Steven Hawkins.
---------------------------------------------
> statement executeOlapQuery quietly fails
> ----------------------------------------
>
> Key: TEIID-4614
> URL: https://issues.jboss.org/browse/TEIID-4614
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 9.x, 8.7.9.6_2
> Reporter: Johnathon Lee
> Assignee: Steven Hawkins
>
> cellSet = stmt.executeOlapQuery(mdxQuery) in OlapQueryExecution is quietly failing.
> modify execute method to add Exception catch and printStackTrace
> {code:java}
> // Some comments here
> public void execute() throws TranslatorException {
> try {
> stmt = this.connection.createStatement();
> cellSet = stmt.executeOlapQuery(mdxQuery);
> CellSetAxis rowAxis = this.cellSet.getAxes().get(Axis.ROWS.axisOrdinal());
> rowPositionIterator = rowAxis.iterator();
> columnsAxis = cellSet.getAxes().get(Axis.COLUMNS.axisOrdinal());
> colWidth = rowAxis.getAxisMetaData().getHierarchies().size() + this.columnsAxis.getPositions().size();
> } catch (SQLException e) {
> throw new TranslatorException(e);
> } catch (Exception e) {
> e.printStackTrace();
> } finally {
> System.out.println("in finally block");
> }
> }
> {code}
> run existing tests to see (not catching the exception has all tests passing)
> {code:java}
> Running org.teiid.translator.olap.TestOlapTranslator
> org.teiid.core.TeiidRuntimeException
> at org.teiid.translator.olap.OlapQueryExecution.execute(OlapQueryExecution.java:100)
> at org.teiid.translator.olap.TestOlapTranslator.testCannedProcedure(TestOlapTranslator.java:67)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
> at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
> at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
> at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
> at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
> at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
> in finally block
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.541 sec <<< FAILURE! - in org.teiid.translator.olap.TestOlapTranslator
> testCannedProcedure(org.teiid.translator.olap.TestOlapTranslator) Time elapsed: 0.54 sec <<< FAILURE!
> java.lang.AssertionError: null
> at org.junit.Assert.fail(Assert.java:86)
> at org.junit.Assert.fail(Assert.java:95)
> at org.teiid.translator.olap.TestOlapTranslator.testCannedProcedure(TestOlapTranslator.java:68)
> Results :
> Failed tests:
> TestOlapTranslator.testCannedProcedure:68 null
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 4 months
[JBoss JIRA] (TEIID-4616) api-docs on Swagger UI error
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4616?page=com.atlassian.jira.plugin... ]
Ramesh Reddy reassigned TEIID-4616:
-----------------------------------
Assignee: Kylin Soong (was: Steven Hawkins)
> api-docs on Swagger UI error
> ----------------------------
>
> Key: TEIID-4616
> URL: https://issues.jboss.org/browse/TEIID-4616
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.12.6.6_3
> Reporter: Debbie Steigner
> Assignee: Kylin Soong
>
> The link on the Swagger UI for api-docs, shows Error - {"schemaValidationMessages":[{"level":"error","message":"Can't read from file http://127.0.0.1:8080/RestVDB/api-docs/Debbiev"}]}
> But I can enter the URL and go to the api-doc - http://127.0.0.1:8080/RestVDB/api-docs/Debbiev
> {"apiVersion":"2.0.0","swaggerVersion":"1.2","basePath":"/RestVDB","resourcePath":"/Debbiev","apis":[{"path":"/Debbiev/mytable","operations":[{"method":"POST","summary":"(XML) postmytable: null","notes":"","type":"java.io.InputStream","nickname":"postmytable","produces":["application/xml; charset=UTF-8"],"consumes":["application/xml"],"parameters":[{"name":"body","required":false,"type":"java.io.InputStream","paramType":"body","allowMultiple":false}]},{"method":"GET","summary":"(XML) getmytable: null","notes":"","type":"java.io.InputStream","nickname":"getmytable","produces":["application/xml; charset=UTF-8"],"parameters":[]}]},{"path":"/Debbiev/json/mytable","operations":[{"method":"GET","summary":"(JSON) getmytable: null","notes":"","type":"string","nickname":"getmytablejson","produces":["application/json; charset=UTF-8"],"parameters":[]},{"method":"POST","summary":"(JSON) postmytable: null","notes":"","type":"string","nickname":"postmytablejson","produces":["application/json; charset=UTF-8"],"consumes":["application/json"],"parameters":[{"name":"body","required":false,"type":"java.io.InputStream","paramType":"body","allowMultiple":false}]}]}]}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 4 months
[JBoss JIRA] (TEIID-4613) OData client does not support old servers for boolean functions
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4613?page=com.atlassian.jira.plugin... ]
Ramesh Reddy resolved TEIID-4613.
---------------------------------
Resolution: Done
Labels: alpha2 (was: )
[~damien_b] Thank you for the patch. Applied to master, will we in the next 9.2 Alpha2 release.
> OData client does not support old servers for boolean functions
> ---------------------------------------------------------------
>
> Key: TEIID-4613
> URL: https://issues.jboss.org/browse/TEIID-4613
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Affects Versions: 9.1.1
> Reporter: Damien B
> Assignee: Ramesh Reddy
> Labels: alpha2
> Fix For: 9.2
>
>
> Some old data servers does not support to be called with a filter containing a boolean function and a operator (like "Customers?$filter=substringof('Alfreds', CompanyName) eq true"), they instead want a unary operation (i.e. "Customers?$filter=substringof('Alfreds', CompanyName)"). translator-odata forces the operator presence.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 4 months
[JBoss JIRA] (TEIID-4616) api-docs on Swagger UI error
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-4616?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration updated TEIID-4616:
-------------------------------------------
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1401004
Bugzilla Update: Perform
> api-docs on Swagger UI error
> ----------------------------
>
> Key: TEIID-4616
> URL: https://issues.jboss.org/browse/TEIID-4616
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.12.6.6_3
> Reporter: Debbie Steigner
> Assignee: Steven Hawkins
>
> The link on the Swagger UI for api-docs, shows Error - {"schemaValidationMessages":[{"level":"error","message":"Can't read from file http://127.0.0.1:8080/RestVDB/api-docs/Debbiev"}]}
> But I can enter the URL and go to the api-doc - http://127.0.0.1:8080/RestVDB/api-docs/Debbiev
> {"apiVersion":"2.0.0","swaggerVersion":"1.2","basePath":"/RestVDB","resourcePath":"/Debbiev","apis":[{"path":"/Debbiev/mytable","operations":[{"method":"POST","summary":"(XML) postmytable: null","notes":"","type":"java.io.InputStream","nickname":"postmytable","produces":["application/xml; charset=UTF-8"],"consumes":["application/xml"],"parameters":[{"name":"body","required":false,"type":"java.io.InputStream","paramType":"body","allowMultiple":false}]},{"method":"GET","summary":"(XML) getmytable: null","notes":"","type":"java.io.InputStream","nickname":"getmytable","produces":["application/xml; charset=UTF-8"],"parameters":[]}]},{"path":"/Debbiev/json/mytable","operations":[{"method":"GET","summary":"(JSON) getmytable: null","notes":"","type":"string","nickname":"getmytablejson","produces":["application/json; charset=UTF-8"],"parameters":[]},{"method":"POST","summary":"(JSON) postmytable: null","notes":"","type":"string","nickname":"postmytablejson","produces":["application/json; charset=UTF-8"],"consumes":["application/json"],"parameters":[{"name":"body","required":false,"type":"java.io.InputStream","paramType":"body","allowMultiple":false}]}]}]}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 4 months