[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 resolved TEIID-3872.
-----------------------------------
Fix Version/s: 8.13
8.11.4
Resolution: Done
Refined the generated key logic to optionally use the column names and types from the teiid metadata. Also narrowed the cases in which it will work to just simple insert scenarios. We will need to come up with a mechanism to properly propagate when a procedure (typically instead of insert trigger) is used.
> 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
> Fix For: 8.13, 8.11.4
>
>
> 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-3882) Unable to convert Geometry Collection to GeoJSON
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3882?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-3882:
---------------------------------------
I'll see if we can move up to .7 instead.
> Unable to convert Geometry Collection to GeoJSON
> ------------------------------------------------
>
> Key: TEIID-3882
> URL: https://issues.jboss.org/browse/TEIID-3882
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.12.3
> Reporter: Andrej Šmigala
> Assignee: Steven Hawkins
>
> Running the following query results in the error below:
> {code:sql}
> select ST_AsGeoJson(ST_GeomFromText('GEOMETRYCOLLECTION(POINT(4 6),LINESTRING(4 6,7 10))')) as g{code}
> It appears that jts2geojson only supports converting geometry collections since version 0.6 (teiid uses version 0.4), compare https://github.com/bjornharrtell/jts2geojson/blob/v0.4.0/src/main/java/or... and https://github.com/bjornharrtell/jts2geojson/blob/0.6.0/src/main/java/org...
> {noformat}
> 16:38:00,967 WARN [org.teiid.PROCESSOR] (Worker2_QueryProcessorQueue7) TEIID30020 Processing exception for request SqO0xtySU9j7.0 'TEIID30328 Unable to evaluate ST_AsGeoJson(?): TEIID30384 Error while evaluating function st_asgeojson'. Originally ExpressionEvaluationException GeoJSONWriter.java:35.: org.teiid.api.exception.query.ExpressionEvaluationException: TEIID30328 Unable to evaluate ST_AsGeoJson(?): TEIID30384 Error while evaluating function st_asgeojson
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:695) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.rewriter.QueryRewriter.evaluate(QueryRewriter.java:2151) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.rewriter.QueryRewriter.rewriteExpressionDirect(QueryRewriter.java:2141) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.rewriter.QueryRewriter.access$000(QueryRewriter.java:101) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.rewriter.QueryRewriter$3.replaceExpression(QueryRewriter.java:640) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.sql.visitor.ExpressionMappingVisitor.visit(ExpressionMappingVisitor.java:157) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.sql.symbol.AliasSymbol.acceptVisitor(AliasSymbol.java:90) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.sql.navigator.AbstractNavigator.visitVisitor(AbstractNavigator.java:54) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.sql.navigator.PreOrPostOrderNavigator.postVisitVisitor(PreOrPostOrderNavigator.java:61) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.sql.navigator.PreOrPostOrderNavigator.visit(PreOrPostOrderNavigator.java:80) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.sql.symbol.AliasSymbol.acceptVisitor(AliasSymbol.java:90) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.sql.navigator.AbstractNavigator.visitNode(AbstractNavigator.java:63) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.sql.navigator.AbstractNavigator.visitNodes(AbstractNavigator.java:76) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.sql.navigator.PreOrPostOrderNavigator.visit(PreOrPostOrderNavigator.java:342) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.sql.lang.Select.acceptVisitor(Select.java:168) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.sql.navigator.PostOrderNavigator.doVisit(PostOrderNavigator.java:40) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.rewriter.QueryRewriter.rewriteExpressions(QueryRewriter.java:647) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.rewriter.QueryRewriter.rewriteQuery(QueryRewriter.java:484) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.rewriter.QueryRewriter.rewriteCommand(QueryRewriter.java:224) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.rewriter.QueryRewriter.rewrite(QueryRewriter.java:169) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.rewriter.QueryRewriter.rewrite(QueryRewriter.java:173) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:413) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.dqp.internal.process.Request.processRequest(Request.java:463) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:640) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:337) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_65]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_65]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_65]
> Caused by: org.teiid.api.exception.query.FunctionExecutionException: TEIID30384 Error while evaluating function st_asgeojson
> at org.teiid.query.function.FunctionDescriptor.invokeFunction(FunctionDescriptor.java:295) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:1384) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.eval.Evaluator.internalEvaluate(Evaluator.java:723) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:693) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> ... 32 more
> Caused by: org.teiid.api.exception.query.FunctionExecutionException
> at org.teiid.query.function.GeometryUtils.geometryToGeoJson(GeometryUtils.java:118) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.function.GeometryFunctionMethods.asGeoJson(GeometryFunctionMethods.java:71) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_65]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_65]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_65]
> at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_65]
> at org.teiid.query.function.FunctionDescriptor.invokeFunction(FunctionDescriptor.java:281) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> ... 35 more
> Caused by: java.lang.UnsupportedOperationException
> at org.wololo.jts2geojson.GeoJSONWriter.write(GeoJSONWriter.java:35) [jts2geojson-0.4.0.jar:]
> at org.teiid.query.function.GeometryUtils.geometryToGeoJson(GeometryUtils.java:113) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> ... 41 more
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 11 months
[JBoss JIRA] (TEIID-3882) Unable to convert Geometry Collection to GeoJSON
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-3882?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration updated TEIID-3882:
-------------------------------------------
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1296213
Bugzilla Update: Perform
> Unable to convert Geometry Collection to GeoJSON
> ------------------------------------------------
>
> Key: TEIID-3882
> URL: https://issues.jboss.org/browse/TEIID-3882
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.12.3
> Reporter: Andrej Šmigala
> Assignee: Steven Hawkins
>
> Running the following query results in the error below:
> {code:sql}
> select ST_AsGeoJson(ST_GeomFromText('GEOMETRYCOLLECTION(POINT(4 6),LINESTRING(4 6,7 10))')) as g{code}
> It appears that jts2geojson only supports converting geometry collections since version 0.6 (teiid uses version 0.4), compare https://github.com/bjornharrtell/jts2geojson/blob/v0.4.0/src/main/java/or... and https://github.com/bjornharrtell/jts2geojson/blob/0.6.0/src/main/java/org...
> {noformat}
> 16:38:00,967 WARN [org.teiid.PROCESSOR] (Worker2_QueryProcessorQueue7) TEIID30020 Processing exception for request SqO0xtySU9j7.0 'TEIID30328 Unable to evaluate ST_AsGeoJson(?): TEIID30384 Error while evaluating function st_asgeojson'. Originally ExpressionEvaluationException GeoJSONWriter.java:35.: org.teiid.api.exception.query.ExpressionEvaluationException: TEIID30328 Unable to evaluate ST_AsGeoJson(?): TEIID30384 Error while evaluating function st_asgeojson
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:695) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.rewriter.QueryRewriter.evaluate(QueryRewriter.java:2151) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.rewriter.QueryRewriter.rewriteExpressionDirect(QueryRewriter.java:2141) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.rewriter.QueryRewriter.access$000(QueryRewriter.java:101) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.rewriter.QueryRewriter$3.replaceExpression(QueryRewriter.java:640) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.sql.visitor.ExpressionMappingVisitor.visit(ExpressionMappingVisitor.java:157) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.sql.symbol.AliasSymbol.acceptVisitor(AliasSymbol.java:90) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.sql.navigator.AbstractNavigator.visitVisitor(AbstractNavigator.java:54) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.sql.navigator.PreOrPostOrderNavigator.postVisitVisitor(PreOrPostOrderNavigator.java:61) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.sql.navigator.PreOrPostOrderNavigator.visit(PreOrPostOrderNavigator.java:80) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.sql.symbol.AliasSymbol.acceptVisitor(AliasSymbol.java:90) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.sql.navigator.AbstractNavigator.visitNode(AbstractNavigator.java:63) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.sql.navigator.AbstractNavigator.visitNodes(AbstractNavigator.java:76) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.sql.navigator.PreOrPostOrderNavigator.visit(PreOrPostOrderNavigator.java:342) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.sql.lang.Select.acceptVisitor(Select.java:168) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.sql.navigator.PostOrderNavigator.doVisit(PostOrderNavigator.java:40) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.rewriter.QueryRewriter.rewriteExpressions(QueryRewriter.java:647) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.rewriter.QueryRewriter.rewriteQuery(QueryRewriter.java:484) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.rewriter.QueryRewriter.rewriteCommand(QueryRewriter.java:224) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.rewriter.QueryRewriter.rewrite(QueryRewriter.java:169) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.rewriter.QueryRewriter.rewrite(QueryRewriter.java:173) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:413) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.dqp.internal.process.Request.processRequest(Request.java:463) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:640) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:337) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_65]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_65]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_65]
> Caused by: org.teiid.api.exception.query.FunctionExecutionException: TEIID30384 Error while evaluating function st_asgeojson
> at org.teiid.query.function.FunctionDescriptor.invokeFunction(FunctionDescriptor.java:295) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:1384) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.eval.Evaluator.internalEvaluate(Evaluator.java:723) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:693) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> ... 32 more
> Caused by: org.teiid.api.exception.query.FunctionExecutionException
> at org.teiid.query.function.GeometryUtils.geometryToGeoJson(GeometryUtils.java:118) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.function.GeometryFunctionMethods.asGeoJson(GeometryFunctionMethods.java:71) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_65]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_65]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_65]
> at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_65]
> at org.teiid.query.function.FunctionDescriptor.invokeFunction(FunctionDescriptor.java:281) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> ... 35 more
> Caused by: java.lang.UnsupportedOperationException
> at org.wololo.jts2geojson.GeoJSONWriter.write(GeoJSONWriter.java:35) [jts2geojson-0.4.0.jar:]
> at org.teiid.query.function.GeometryUtils.geometryToGeoJson(GeometryUtils.java:113) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> ... 41 more
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 11 months
[JBoss JIRA] (TEIID-3882) Unable to convert Geometry Collection to GeoJSON
by Andrej Šmigala (JIRA)
Andrej Šmigala created TEIID-3882:
-------------------------------------
Summary: Unable to convert Geometry Collection to GeoJSON
Key: TEIID-3882
URL: https://issues.jboss.org/browse/TEIID-3882
Project: Teiid
Issue Type: Bug
Affects Versions: 8.12.3
Reporter: Andrej Šmigala
Assignee: Steven Hawkins
Running the following query results in the error below:
{code:sql}
select ST_AsGeoJson(ST_GeomFromText('GEOMETRYCOLLECTION(POINT(4 6),LINESTRING(4 6,7 10))')) as g{code}
It appears that jts2geojson only supports converting geometry collections since version 0.6 (teiid uses version 0.4), compare https://github.com/bjornharrtell/jts2geojson/blob/v0.4.0/src/main/java/or... and https://github.com/bjornharrtell/jts2geojson/blob/0.6.0/src/main/java/org...
{noformat}
16:38:00,967 WARN [org.teiid.PROCESSOR] (Worker2_QueryProcessorQueue7) TEIID30020 Processing exception for request SqO0xtySU9j7.0 'TEIID30328 Unable to evaluate ST_AsGeoJson(?): TEIID30384 Error while evaluating function st_asgeojson'. Originally ExpressionEvaluationException GeoJSONWriter.java:35.: org.teiid.api.exception.query.ExpressionEvaluationException: TEIID30328 Unable to evaluate ST_AsGeoJson(?): TEIID30384 Error while evaluating function st_asgeojson
at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:695) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.query.rewriter.QueryRewriter.evaluate(QueryRewriter.java:2151) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.query.rewriter.QueryRewriter.rewriteExpressionDirect(QueryRewriter.java:2141) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.query.rewriter.QueryRewriter.access$000(QueryRewriter.java:101) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.query.rewriter.QueryRewriter$3.replaceExpression(QueryRewriter.java:640) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.query.sql.visitor.ExpressionMappingVisitor.visit(ExpressionMappingVisitor.java:157) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.query.sql.symbol.AliasSymbol.acceptVisitor(AliasSymbol.java:90) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.query.sql.navigator.AbstractNavigator.visitVisitor(AbstractNavigator.java:54) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.query.sql.navigator.PreOrPostOrderNavigator.postVisitVisitor(PreOrPostOrderNavigator.java:61) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.query.sql.navigator.PreOrPostOrderNavigator.visit(PreOrPostOrderNavigator.java:80) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.query.sql.symbol.AliasSymbol.acceptVisitor(AliasSymbol.java:90) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.query.sql.navigator.AbstractNavigator.visitNode(AbstractNavigator.java:63) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.query.sql.navigator.AbstractNavigator.visitNodes(AbstractNavigator.java:76) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.query.sql.navigator.PreOrPostOrderNavigator.visit(PreOrPostOrderNavigator.java:342) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.query.sql.lang.Select.acceptVisitor(Select.java:168) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.query.sql.navigator.PostOrderNavigator.doVisit(PostOrderNavigator.java:40) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.query.rewriter.QueryRewriter.rewriteExpressions(QueryRewriter.java:647) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.query.rewriter.QueryRewriter.rewriteQuery(QueryRewriter.java:484) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.query.rewriter.QueryRewriter.rewriteCommand(QueryRewriter.java:224) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.query.rewriter.QueryRewriter.rewrite(QueryRewriter.java:169) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.query.rewriter.QueryRewriter.rewrite(QueryRewriter.java:173) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:413) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.dqp.internal.process.Request.processRequest(Request.java:463) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:640) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:337) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_65]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_65]
Caused by: org.teiid.api.exception.query.FunctionExecutionException: TEIID30384 Error while evaluating function st_asgeojson
at org.teiid.query.function.FunctionDescriptor.invokeFunction(FunctionDescriptor.java:295) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:1384) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.query.eval.Evaluator.internalEvaluate(Evaluator.java:723) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:693) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
... 32 more
Caused by: org.teiid.api.exception.query.FunctionExecutionException
at org.teiid.query.function.GeometryUtils.geometryToGeoJson(GeometryUtils.java:118) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at org.teiid.query.function.GeometryFunctionMethods.asGeoJson(GeometryFunctionMethods.java:71) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_65]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_65]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_65]
at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_65]
at org.teiid.query.function.FunctionDescriptor.invokeFunction(FunctionDescriptor.java:281) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
... 35 more
Caused by: java.lang.UnsupportedOperationException
at org.wololo.jts2geojson.GeoJSONWriter.write(GeoJSONWriter.java:35) [jts2geojson-0.4.0.jar:]
at org.teiid.query.function.GeometryUtils.geometryToGeoJson(GeometryUtils.java:113) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
... 41 more
{noformat}
--
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:
---------------------------------------
I still don't seem to have enough to reproduce this. Could you provide the Teiid DDL for the relevant views and source tables (not the oracle ddl), and does this issue occur if the source tables are not materialized and/or you use the option no cache hint?
> 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-3881) time date function doesn't return value without sorting
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3881?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-3881:
---------------------------------------
Can you provide the query plans as I'm not seeing this behavior with a simple reproduction?
> time date function doesn't return value without sorting
> -------------------------------------------------------
>
> Key: TEIID-3881
> URL: https://issues.jboss.org/browse/TEIID-3881
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.12.3
> Environment: Teiid 8.12.3 and PostgreSQL 9.3.2
> Reporter: Ivan Chan
> Assignee: Steven Hawkins
> Labels: teiid-engine
>
> HOUR(), MINUTE(), SECOND(), DAYOFMONTH(), DAYOFWEEK(), DAYOFYEAR(), MONTH(),
> QUARTER(), WEEK(), YEAR() are returning null unless sql is ordered by date time function.
> Not working query:
> select MONTH("birth_date") as "MONTH_birth_date",
> MONTH("birth_date") as "Month_Field",
> "birth_date"
> from "FoodmartDataSource_public"."employee"
> order by "birth_date"
> limit 200001
> Working query:
> select MONTH("birth_date") as "MONTH_birth_date",
> MONTH("birth_date") as "Month_Field",
> "birth_date"
> from "FoodmartDataSource_public"."employee"
> order by "birth_date", "Month_Field"
> limit 200001
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 11 months
[JBoss JIRA] (TEIID-3419) Add ability to set a default role across all VDBs
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3419?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-3419.
-----------------------------------
Fix Version/s: 8.13
8.12.4
(was: 8.11)
Resolution: Done
The initial parsing of the element was missing.
> Add ability to set a default role across all VDBs
> -------------------------------------------------
>
> Key: TEIID-3419
> URL: https://issues.jboss.org/browse/TEIID-3419
> Project: Teiid
> Issue Type: Feature Request
> Components: Server
> Reporter: Marc Shirley
> Assignee: Steven Hawkins
> Fix For: 8.13, 8.12.4
>
>
> There should be an ability to either set a default role across the server, or to restrict access by default. For example, all VDBs have a default user role that is applied before the VDB specific roles are. Alternatively, there could be a system wide flag that toggles the behavior of VDBs when no roles are defined between accessible to all or denied to all.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 11 months