委托翻译链接
Delegate Translator Chaining
我试图通过链接 VDB.xml 来委派翻译人员,但在调用后出现错误。
委托翻译器假设拦截对下面的实际委托翻译器的调用并执行计算。
计算由 TEIID_SESSION 中的 属性 集驱动,作为有效负载与语句对象
一起传递
我的vdb.xml:
<source connection-jndi-name="java:/SourceModel" name="SourceModel" translator-name="delegate"/>
<translator name="delegate" type="calcDelegate">
<property name="delegateName" value="sqlserver" />
</translator>
当我在 teiid_session 中设置 属性 并在 SQL 客户端中设置 运行 查询时,出现以下错误:
org.jkiss.dbeaver.model.sql.DBSQLException: SQL Error [38000]: org.teiid.language.Join cannot be cast to org.teiid.language.NamedTable
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:134)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeStatement(SQLQueryJob.java:488)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.lambda[=11=](SQLQueryJob.java:425)
at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:170)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeSingleQuery(SQLQueryJob.java:417)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.extractData(SQLQueryJob.java:775)
at org.jkiss.dbeaver.ui.editors.sql.SQLEditor$QueryResultsContainer.readData(SQLEditor.java:2914)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.lambda[=11=](ResultSetJobDataRead.java:111)
at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:170)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.run(ResultSetJobDataRead.java:109)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetViewer.run(ResultSetViewer.java:3423)
at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:103)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.teiid.jdbc.TeiidSQLException: org.teiid.language.Join cannot be cast to org.teiid.language.NamedTable
at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:135)
at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:71)
at org.teiid.jdbc.StatementImpl.postReceiveResults(StatementImpl.java:723)
at org.teiid.jdbc.StatementImpl.access0(StatementImpl.java:65)
at org.teiid.jdbc.StatementImpl.onCompletion(StatementImpl.java:561)
at org.teiid.client.util.ResultsFuture.done(ResultsFuture.java:135)
at org.teiid.client.util.ResultsFuture.access0(ResultsFuture.java:40)
at org.teiid.client.util.ResultsFuture.receiveResults(ResultsFuture.java:79)
at org.teiid.net.socket.SocketServerInstanceImpl.receivedMessage(SocketServerInstanceImpl.java:284)
at org.teiid.net.socket.SocketServerInstanceImpl.read(SocketServerInstanceImpl.java:322)
at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.teiid.net.socket.SocketServerConnectionFactory$ShutdownHandler.invoke(SocketServerConnectionFactory.java:98)
at com.sun.proxy.$Proxy22.read(Unknown Source)
at org.teiid.net.socket.SocketServerInstanceImpl$RemoteInvocationHandler.get(SocketServerInstanceImpl.java:421)
at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:570)
at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:1076)
at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:339)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.execute(JDBCStatementImpl.java:338)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:131)
... 12 more
Caused by: org.teiid.core.TeiidException: org.teiid.language.Join cannot be cast to org.teiid.language.NamedTable
at org.teiid.client.ResultsMessage.setException(ResultsMessage.java:196)
at org.teiid.dqp.internal.process.RequestWorkItem.sendError(RequestWorkItem.java:1115)
at org.teiid.dqp.internal.process.RequestWorkItem.close(RequestWorkItem.java:591)
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:374)
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:275)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:282)
at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
at org.teiid.dqp.internal.process.ThreadReuseExecutor.run(ThreadReuseExecutor.java:210)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassCastException: org.teiid.language.Join cannot be cast to org.teiid.language.NamedTable
at com.lgc.dsl.translators.unitConvert.delegate.UnitConvertResultSetExecution.execute(UnitConvertResultSetExecution.java:126)
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:367)
at sun.reflect.GeneratedMethodAccessor740.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.invoke(ConnectorManager.java:220)
at com.sun.proxy.$Proxy193.execute(Unknown Source)
at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)
at org.teiid.dqp.internal.process.DataTierTupleSource.call(DataTierTupleSource.java:112)
at org.teiid.dqp.internal.process.DataTierTupleSource.call(DataTierTupleSource.java:108)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
基于
Caused by: java.lang.ClassCastException: org.teiid.language.Join cannot be cast to org.teiid.language.NamedTable
at com.lgc.dsl.translators.unitConvert.delegate.UnitConvertResultSetExecution.execute(UnitConvertResultSetExecution.java:126)
问题似乎出在自定义翻译器的逻辑假设上。 UnitConvertResultSetExecution中引用的方法和行号你调试了吗?
我试图通过链接 VDB.xml 来委派翻译人员,但在调用后出现错误。 委托翻译器假设拦截对下面的实际委托翻译器的调用并执行计算。 计算由 TEIID_SESSION 中的 属性 集驱动,作为有效负载与语句对象
一起传递我的vdb.xml:
<source connection-jndi-name="java:/SourceModel" name="SourceModel" translator-name="delegate"/>
<translator name="delegate" type="calcDelegate">
<property name="delegateName" value="sqlserver" />
</translator>
当我在 teiid_session 中设置 属性 并在 SQL 客户端中设置 运行 查询时,出现以下错误:
org.jkiss.dbeaver.model.sql.DBSQLException: SQL Error [38000]: org.teiid.language.Join cannot be cast to org.teiid.language.NamedTable
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:134)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeStatement(SQLQueryJob.java:488)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.lambda[=11=](SQLQueryJob.java:425)
at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:170)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeSingleQuery(SQLQueryJob.java:417)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.extractData(SQLQueryJob.java:775)
at org.jkiss.dbeaver.ui.editors.sql.SQLEditor$QueryResultsContainer.readData(SQLEditor.java:2914)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.lambda[=11=](ResultSetJobDataRead.java:111)
at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:170)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.run(ResultSetJobDataRead.java:109)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetViewer.run(ResultSetViewer.java:3423)
at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:103)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.teiid.jdbc.TeiidSQLException: org.teiid.language.Join cannot be cast to org.teiid.language.NamedTable
at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:135)
at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:71)
at org.teiid.jdbc.StatementImpl.postReceiveResults(StatementImpl.java:723)
at org.teiid.jdbc.StatementImpl.access0(StatementImpl.java:65)
at org.teiid.jdbc.StatementImpl.onCompletion(StatementImpl.java:561)
at org.teiid.client.util.ResultsFuture.done(ResultsFuture.java:135)
at org.teiid.client.util.ResultsFuture.access0(ResultsFuture.java:40)
at org.teiid.client.util.ResultsFuture.receiveResults(ResultsFuture.java:79)
at org.teiid.net.socket.SocketServerInstanceImpl.receivedMessage(SocketServerInstanceImpl.java:284)
at org.teiid.net.socket.SocketServerInstanceImpl.read(SocketServerInstanceImpl.java:322)
at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.teiid.net.socket.SocketServerConnectionFactory$ShutdownHandler.invoke(SocketServerConnectionFactory.java:98)
at com.sun.proxy.$Proxy22.read(Unknown Source)
at org.teiid.net.socket.SocketServerInstanceImpl$RemoteInvocationHandler.get(SocketServerInstanceImpl.java:421)
at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:570)
at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:1076)
at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:339)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.execute(JDBCStatementImpl.java:338)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:131)
... 12 more
Caused by: org.teiid.core.TeiidException: org.teiid.language.Join cannot be cast to org.teiid.language.NamedTable
at org.teiid.client.ResultsMessage.setException(ResultsMessage.java:196)
at org.teiid.dqp.internal.process.RequestWorkItem.sendError(RequestWorkItem.java:1115)
at org.teiid.dqp.internal.process.RequestWorkItem.close(RequestWorkItem.java:591)
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:374)
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:275)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:282)
at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
at org.teiid.dqp.internal.process.ThreadReuseExecutor.run(ThreadReuseExecutor.java:210)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassCastException: org.teiid.language.Join cannot be cast to org.teiid.language.NamedTable
at com.lgc.dsl.translators.unitConvert.delegate.UnitConvertResultSetExecution.execute(UnitConvertResultSetExecution.java:126)
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:367)
at sun.reflect.GeneratedMethodAccessor740.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.invoke(ConnectorManager.java:220)
at com.sun.proxy.$Proxy193.execute(Unknown Source)
at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)
at org.teiid.dqp.internal.process.DataTierTupleSource.call(DataTierTupleSource.java:112)
at org.teiid.dqp.internal.process.DataTierTupleSource.call(DataTierTupleSource.java:108)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
基于
Caused by: java.lang.ClassCastException: org.teiid.language.Join cannot be cast to org.teiid.language.NamedTable
at com.lgc.dsl.translators.unitConvert.delegate.UnitConvertResultSetExecution.execute(UnitConvertResultSetExecution.java:126)
问题似乎出在自定义翻译器的逻辑假设上。 UnitConvertResultSetExecution中引用的方法和行号你调试了吗?