[JBoss JIRA] (TEIID-3457) Teiid 8.9.1 throw null exception when use AVG function on jboss-eap 6.3
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3457?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3457.
---------------------------------
> Teiid 8.9.1 throw null exception when use AVG function on jboss-eap 6.3
> -----------------------------------------------------------------------
>
> Key: TEIID-3457
> URL: https://issues.jboss.org/browse/TEIID-3457
> Project: Teiid
> Issue Type: Bug
> Reporter: Xian Liu
> Assignee: Steven Hawkins
> Fix For: 8.10
>
>
> 13:21:26,858 ERROR [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue20) N8zPomvnqZWy TEIID30019 Unexpected exception for request N8zPomvnqZWy.8: java.lang.NullPointerException
> at java.util.ArrayList.addAll(ArrayList.java:559) [rt.jar:1.7.0_71]
> at org.teiid.query.function.aggregate.Avg.getStateTypes(Avg.java:104) [teiid-engine-8.9.1.jar:8.9.1]
> at org.teiid.query.processor.relational.GroupingNode.collectionPhase(GroupingNode.java:415) [teiid-engine-8.9.1.jar:8.9.1]
> at org.teiid.query.processor.relational.GroupingNode.nextBatchDirect(GroupingNode.java:337) [teiid-engine-8.9.1.jar:8.9.1]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278) [teiid-engine-8.9.1.jar:8.9.1]
> at org.teiid.query.processor.relational.LimitNode.nextBatchDirect(LimitNode.java:102) [teiid-engine-8.9.1.jar:8.9.1]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278) [teiid-engine-8.9.1.jar:8.9.1]
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146) [teiid-engine-8.9.1.jar:8.9.1]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278) [teiid-engine-8.9.1.jar:8.9.1]
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:136) [teiid-engine-8.9.1.jar:8.9.1]
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) [teiid-engine-8.9.1.jar:8.9.1]
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.9.1.jar:8.9.1]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.9.1.jar:8.9.1]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.9.1.jar:8.9.1]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:449) [teiid-engine-8.9.1.jar:8.9.1]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:331) [teiid-engine-8.9.1.jar:8.9.1]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.9.1.jar:8.9.1]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:259) [teiid-engine-8.9.1.jar:8.9.1]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:274) [teiid-engine-8.9.1.jar:8.9.1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.9.1.jar:8.9.1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.9.1.jar:8.9.1]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_71]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_71]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_71]
> teiid installer: teiid-8.9.1-jboss-dist.zip
> jboss installer: jboss-eap-6.3.0.zip
> original mysql data:
> DROP TABLE IF EXISTS `time_function_test`;
> CREATE TABLE `time_function_test` (
> `id` int(11) NOT NULL,
> `start_time` timestamp NULL DEFAULT NULL,
> `end_time` timestamp NULL DEFAULT NULL,
> PRIMARY KEY (`id`)
> ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
> LOCK TABLES `time_function_test` WRITE;
> INSERT INTO `time_function_test` VALUES (1,'2007-12-31 16:00:01','2009-12-31 16:00:01'),(2,NULL,NULL);
> UNLOCK TABLES;
> vdb definition:
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <vdb name="test" version="1">
> <description>raw db data</description>
> <model name="TeiidTest">
> <property name="importer.useFullSchemaName" value="false"/>
> <property name="importer.tableTypes" value="TABLE,VIEW"/>
> <source name="test" translator-name="mysql5" connection-jndi-name="java:jboss/datasources/teiid-test-DS"/>
> </model>
> <data-role name="ReadOnly" allow-create-temporary-tables="true">
> <description>Allow ReadOnly access to all data for any teiid-admins user</description>
> <permission>
> <resource-name>TeiidTest</resource-name>
> <allow-create>false</allow-create>
> <allow-read>true</allow-read>
> <allow-update>false</allow-update>
> </permission>
> <mapped-role-name>teiid-role</mapped-role-name>
> </data-role>
> </vdb>
> teiid query:
> SELECT
> AVG(TIMESTAMPDIFF(SQL_TSI_SECOND, tf.start_time, tf.end_time))
> FROM
> time_function_test tf
> GROUP BY id
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 2 months
[JBoss JIRA] (TEIID-3477) NPE when trying to use OData service with void functions
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3477?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3477.
---------------------------------
> NPE when trying to use OData service with void functions
> --------------------------------------------------------
>
> Key: TEIID-3477
> URL: https://issues.jboss.org/browse/TEIID-3477
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Affects Versions: 8.3
> Reporter: Jaime Meritt
> Assignee: Ramesh Reddy
> Priority: Minor
> Labels: Beta2
> Fix For: 8.11
>
>
> I have Teiid configured to work with OData sources and tested it successfully with the Northwind v2 endpoint. However, when trying to use my custom OData service I get an NPE during the metadata import process. After some debugging I have tracked this down to a null returnType coming back from the following code in the ODataMetadataProcessor which will see a null for void functions. I looked for a translator property to suppress import of procedures to work around it but have yet to find anything that will help so I think this requires a code change to workaround.
>
> // add return type
> EdmType returnType = function.getReturnType();
> if (returnType.isSimple()) {
> mf.addProcedureParameter(...
> }
>
> Appreciate any help you can provide. Thanks, Jaime
> See stack trace below
> Caused by: java.lang.NullPointerException
> at org.teiid.translator.odata.ODataMetadataProcessor.addFunctionImportAsProcedure(ODataMetadataProcessor.java:396)
> at org.teiid.translator.odata.ODataMetadataProcessor.getMetadata(ODataMetadataProcessor.java:119)
> at org.teiid.translator.odata.ODataMetadataProcessor.process(ODataMetadataProcessor.java:92)
> at org.teiid.translator.odata.ODataExecutionFactory.getMetadata(ODataExecutionFactory.java:112)
> at org.teiid.translator.odata.ODataExecutionFactory.getMetadata(ODataExecutionFactory.java:53)
> at org.teiid.query.metadata.NativeMetadataRepository.getMetadata(NativeMetadataRepository.java:83)
> at org.teiid.query.metadata.NativeMetadataRepository.loadMetadata(NativeMetadataRepository.java:60)
> at org.teiid.query.metadata.ChainingMetadataRepository.loadMetadata(ChainingMetadataRepository.java:55)
> at org.teiid.runtime.EmbeddedServer.loadMetadata(EmbeddedServer.java:762)
> at org.teiid.runtime.AbstractVDBDeployer.loadMetadata(AbstractVDBDeployer.java:168)
> at org.teiid.runtime.EmbeddedServer.deployVDB(EmbeddedServer.java:712)
> at org.teiid.runtime.EmbeddedServer.deployVDB(EmbeddedServer.java:653)
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 2 months