[JBoss JIRA] (TEIID-3015) ODATA: Duplicate NavigationProperty name
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3015?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3015.
---------------------------------
> ODATA: Duplicate NavigationProperty name
> ----------------------------------------
>
> Key: TEIID-3015
> URL: https://issues.jboss.org/browse/TEIID-3015
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Affects Versions: 8.3
> Reporter: Ramesh Reddy
> Assignee: Ramesh Reddy
> Labels: Beta3
> Fix For: 8.8, 8.7.1
>
>
> Entity 1: TransferRule
> Entity 2: FinancialAccount
> TransferRule
> - sourceAccount : FinancialAccount
> - destination : FinancialAccount
> - other attributes
> the mapping to this for odata resolves to
> <NavigationProperty Name="financialaccount" Relationship="LivingODS.transferrule_destinationfinancial_account_id_fk" FromRole="transferrule" ToRole="financialaccount" />
> <NavigationProperty Name="financialaccount" Relationship="LivingODS.transferrule_sourcefinancial_account_id_fk" FromRole="transferrule"
> ToRole="financialaccount" />
> The navigation property name is duplicated with in transfer rule entity.
> Hence some of the Odata client see it as ambiguous element
> Is there a way to customise the Name to
> Name="src_financialaccount" and
> Name="dest_financialaccount"
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 10 months
[JBoss JIRA] (TEIID-3207) JDBC native query with literals
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3207?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3207.
---------------------------------
> JDBC native query with literals
> -------------------------------
>
> Key: TEIID-3207
> URL: https://issues.jboss.org/browse/TEIID-3207
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 8.9, 8.10
> Reporter: Tom Arnold
> Assignee: Steven Hawkins
> Fix For: 8.9
>
>
> I'm trying to do something like this in the DDL section of my VDB. Basically the idea is to have my code use the simplified functions, and then have a different VDB for each database I'm sitting on. For example, Postgres would implement ANYINTERACT with ST_Intersects() instead.
>
> {code}
> create foreign function "RECT"(
> "X1" double,
> "Y1" double,
> "X2" double,
> "Y2" double
> ) returns object options (
> "teiid_rel:native-query" 'sdo_geometry(2003, 8307, null, sdo_elem_info_array(1, 1003, 3), sdo_ordinate_array($1, $2, $3, $4))'
> );
> create foreign function "ANYINTERACT"(
> "G1" object,
> "G2" object
> ) returns boolean options (
> "teiid_rel:native-query" 'sdo_anyinteract($1, $2) = \'TRUE\''
> );
> {code}
>
> First off, I can't get this to work because I can't figure out how to escape the quotes around TRUE. As a workaround I tried this instead, opting to just do the "= 'TRUE'" in the query.
> {code}
> create foreign function "ANYINTERACT"(
> "G1" object,
> "G2" object
> ) returns string options (
> "teiid_rel:native-query" 'sdo_anyinteract($1, $2)''
> );
>
> select foo_id from foo_spatial where anyinteract(footprint,rect(-20,-20,20,20)) = 'TRUE';
> {code}
> Unfortunately that fails with an exception...
> {code}
> 20:21:39,581 ERROR [org.teiid.PROCESSOR] (Worker17_QueryProcessorQueue8155) KptxrAvVK+yw TEIID30019 Unexpected exception for request KptxrAvVK+yw.11: java.lang.reflect.UndeclaredThrowableException
> at com.sun.proxy.$Proxy46.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:298) [teiid-engine-8.10.0.Alpha1-SNAPSHOT.jar:8.10.0.Alpha1-SNAPSHOT]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:110) [teiid-engine-8.10.0.Alpha1-SNAPSHOT.jar:8.10.0.Alpha1-SNAPSHOT]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:107) [teiid-engine-8.10.0.Alpha1-SNAPSHOT.jar:8.10.0.Alpha1-SNAPSHOT]
> at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_71]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:58) [teiid-engine-8.10.0.Alpha1-SNAPSHOT.jar:8.10.0.Alpha1-SNAPSHOT]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:274) [teiid-engine-8.10.0.Alpha1-SNAPSHOT.jar:8.10.0.Alpha1-SNAPSHOT]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.10.0.Alpha1-SNAPSHOT.jar:8.10.0.Alpha1-SNAPSHOT]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.10.0.Alpha1-SNAPSHOT.jar:8.10.0.Alpha1-SNAPSHOT]
> 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]
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.GeneratedMethodAccessor128.invoke(Unknown Source) [:1.7.0_71]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_71]
> at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_71]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:208) [teiid-engine-8.10.0.Alpha1-SNAPSHOT.jar:8.10.0.Alpha1-SNAPSHOT]
> ... 12 more
> Caused by: java.lang.ClassCastException: org.teiid.language.Argument cannot be cast to org.teiid.language.Parameter
> at org.teiid.translator.jdbc.JDBCBaseExecution.bind(JDBCBaseExecution.java:94)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:122)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:327) [teiid-engine-8.10.0.Alpha1-SNAPSHOT.jar:8.10.0.Alpha1-SNAPSHOT]
> ... 16 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 10 months
[JBoss JIRA] (TEIID-2906) bind variables and sql appear when exception thrown
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2906?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-2906.
---------------------------------
> bind variables and sql appear when exception thrown
> ---------------------------------------------------
>
> Key: TEIID-2906
> URL: https://issues.jboss.org/browse/TEIID-2906
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 8.4
> Environment: - JDV 6.0.0
> Reporter: Hisanobu Okuda
> Assignee: Steven Hawkins
> Fix For: 8.7, 8.4.2
>
> Attachments: PreparedStatementTest.java, test.vdb
>
>
> When a query causes an exception, bind variables and sql are written in teiid-command.log and are sent to a client.
> teiid-command.log:-
> {code}
> 19:36:19,942 WARN [org.teiid.PROCESSOR] (Worker8_QueryProcessorQueue29) TEIID30020 Processing exception for request 6jFRdyvDG5bU.0
> 'TEIID30504 New_MySQL: 0 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: ['hokuda'] SQL: SELECT g_0.`USERNAM
> E`, g_0.`PASSWORD`, g_0.`USERROLE` FROM `LOGIN`.`USERS` AS g_0 WHERE g_0.`USERNAME` = ?]'. Originally TeiidProcessingException 'Can
> not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.' MysqlIO.java:3039.
> Enable more detailed logging to see the entire stacktrace.
> {code}
> printStackTrace() at client side:-
> {code}
> org.teiid.jdbc.TeiidSQLException: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 New_MySQL: 0 TEIID11008:TEI
> ID11004 Error executing statement(s): [Prepared Values: ['hokuda'] SQL: SELECT g_0.`USERNAME`, g_0.`PASSWORD`, g_0.`USERROLE` FROM
> `LOGIN`.`USERS` AS g_0 WHERE g_0.`USERNAME` = ?]
> at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:135)
> at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:71)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 10 months