[JBoss JIRA] (TEIID-4624) Integrate with Debezium for Result set cache invalidation
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-4624:
-------------------------------------
Summary: Integrate with Debezium for Result set cache invalidation
Key: TEIID-4624
URL: https://issues.jboss.org/browse/TEIID-4624
Project: Teiid
Issue Type: Enhancement
Components: Server
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 9.2
Provide debezium based out of the box support for result set cache invalidation built upon the current table level update event logic - EventDistributor.dataModification
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
[JBoss JIRA] (TEIID-4601) Infinispan DSL Translator: cannot insert into byte array column
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4601?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-4601:
------------------------------------
Just by making the change to support writing byte[] will not resolve the issue. You will end up with the protobuf serialization exception. Have to include everything that has to be done in order to support byte[], and that's
- translator change to support writing byte[]
- user has implemented custom marshaller (which has to be specified on the ressource-adapter).
> Infinispan DSL Translator: cannot insert into byte array column
> ---------------------------------------------------------------
>
> Key: TEIID-4601
> URL: https://issues.jboss.org/browse/TEIID-4601
> Project: Teiid
> Issue Type: Bug
> Components: JDG Connector
> Affects Versions: 8.12.7.6_3
> Reporter: Jan Stastny
> Assignee: Van Halbert
> Fix For: 9.2
>
>
> When a POJO class field is of type byte[] , insert into a table, which is mapped to the POJO class fails with:
> {code:plain}
> Caused by: org.teiid.translator.TranslatorException: Conversion from String to byte is not supported
> at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:624) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:579) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:572) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.handleInsert(ObjectUpdateExecution.java:208) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.executeUpdate(ObjectUpdateExecution.java:143) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.execute(ObjectUpdateExecution.java:100) ~[?:?]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem$1.execute(ConnectorWorkItem.java:404) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:366) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_102]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at com.sun.proxy.$Proxy82.execute(Unknown Source) ~[?:?]
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_102]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_102]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_102]
> at java.lang.Thread.run(Thread.java:745) ~[?:1.8.0_102]
> Caused by: java.lang.IllegalArgumentException: Conversion from String to byte is not supported
> at org.teiid.core.util.StringUtil.valueOf(StringUtil.java:797) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.core.util.StringUtil.valueOf(StringUtil.java:768) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.translator.object.ClassRegistry.executeSetMethod(ClassRegistry.java:139) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:608) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:579) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:572) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.handleInsert(ObjectUpdateExecution.java:208) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.executeUpdate(ObjectUpdateExecution.java:143) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.execute(ObjectUpdateExecution.java:100) ~[?:?]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem$1.execute(ConnectorWorkItem.java:404) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:366) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_102]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at com.sun.proxy.$Proxy82.execute(Unknown Source) ~[?:?]
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_102]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_102]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_102]
> at java.lang.Thread.run(Thread.java:745) ~[?:1.8.0_102]
> {code}
> POJO class:
> {code:java|title=SmallA.proto}
> package org.jboss.qe.jdg.remote.protobuf;
> message SmallA {
> required int32 intKey = 1;
> optional string stringNum = 2;
> required string stringKey = 3;
> optional float floatNum = 4;
> optional string bigIntegerValue = 5;
> optional int32 shortValue = 6;
> optional double doubleNum = 7;
> optional bytes objectValue = 8;
> optional int32 intNum = 9;
> optional string bigDecimalValue = 10;
> optional int64 longNum = 11;
> optional bool booleanValue = 12;
> optional int64 timeStampValue = 13;
> optional int32 byteNum = 14;
> optional int64 timeValue = 15;
> optional int64 dateValue = 16;
> optional int32 charValue = 17;
> }
> {code}
> Java code used to insert:
> {code:java}
> PreparedStatement pSt = con.prepareStatement(
> "INSERT INTO jdgSource1.SmallA(intKey,stringNum,stringKey,floatNum,bigIntegerValue,shortValue,doubleNum,objectValue,intNum,bigDecimalValue,longNum,booleanValue,timeStampValue,byteNum,timeValue,dateValue,charValue) VALUES"
> + "(1,'1','1',1.0,1,1,1,?,1,1.00,1,true,{ts '2016-01-01 12:00:00'},1,'12:00:00','2016-01-01','1')");
> pSt.setBytes(1, "1".getBytes());
> pSt.executeUpdate();
> {code}
> The cause is that internally the object translator uses StringUtil which can't handle byte type.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
[JBoss JIRA] (TEIID-4617) Olap translator: Mondrian ClassNotFoundException moving from v 3.5.0 to 3.12.0
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4617?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4617:
---------------------------------------
I didn't expect that to fail. Can you attach or show the mondrian module you are using?
> Olap translator: Mondrian ClassNotFoundException moving from v 3.5.0 to 3.12.0
> ------------------------------------------------------------------------------
>
> Key: TEIID-4617
> URL: https://issues.jboss.org/browse/TEIID-4617
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.8.6_3
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Attachments: Screenshot from 2016-12-05 07-49-16.png
>
>
> Change of version of Mondrian from 3.5.0 to 3.12.0 causes class not found exception.
> {code:plain}
> 07:44:03,800 WARN [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue10) Connector worker process failed for atomic-request=NFuIrbxSPuIu.0.3.3: org.teiid.translator.TranslatorException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/mondrianDS
> at org.teiid.translator.olap.OlapExecutionFactory.getConnection(OlapExecutionFactory.java:87) [translator-olap-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at org.teiid.translator.olap.OlapExecutionFactory.getConnection(OlapExecutionFactory.java:45) [translator-olap-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at org.teiid.translator.ExecutionFactory.getConnection(ExecutionFactory.java:202) [teiid-api-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:330)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_102]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_102]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_102]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_102]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy81.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_102]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:280)
> 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_102]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_102]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_102]
> Caused by: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/mondrianDS
> at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:151)
> at org.jboss.as.connector.subsystems.datasources.WildFlyDataSource.getConnection(WildFlyDataSource.java:69)
> at org.teiid.translator.olap.OlapExecutionFactory.getConnection(OlapExecutionFactory.java:85) [translator-olap-8.12.8.6_3-redhat-1.jar:8.12.8.6_3-redhat-1]
> ... 20 more
> Caused by: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/mondrianDS
> at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:410)
> at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:367)
> at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:499)
> at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:143)
> ... 22 more
> Caused by: javax.resource.ResourceException: IJ000658: Unexpected throwable while trying to create a connection: null
> at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:454)
> at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:457)
> at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:429)
> at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:344)
> ... 25 more
> Caused by: javax.resource.ResourceException: Could not create connection
> at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:351)
> at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:299)
> at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:858)
> at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:413)
> ... 28 more
> Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: mondrian.spi.impl.JndiDataSourceResolver from [Module "org.jboss.teiid.translator.olap:main" from local module loader @16f65612 (finder: local module finder @311d617d (roots: /home/jstastny/tmp-workspaces/workspace/modules,/home/jstastny/tmp-workspaces/workspace/modules/system/layers/dv,/home/jstastny/tmp-workspaces/workspace/modules/system/layers/base/.overlays/layer-base-jboss-eap-6.4.9.CP,/home/jstastny/tmp-workspaces/workspace/modules/system/layers/base))]
> at mondrian.util.ClassResolver$AbstractClassResolver.instantiateSafe(ClassResolver.java:84)
> at mondrian.rolap.RolapConnection.getDataSourceResolver(RolapConnection.java:471)
> at mondrian.rolap.RolapConnection.createDataSource(RolapConnection.java:427)
> at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:135)
> at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:91)
> at mondrian.olap.DriverManager.getConnection(DriverManager.java:113)
> at mondrian.olap.DriverManager.getConnection(DriverManager.java:69)
> at mondrian.olap4j.MondrianOlap4jConnection.<init>(MondrianOlap4jConnection.java:162)
> at mondrian.olap4j.FactoryJdbc4Plus$AbstractConnection.<init>(FactoryJdbc4Plus.java:323)
> at mondrian.olap4j.FactoryJdbc41Impl$MondrianOlap4jConnectionJdbc41.<init>(FactoryJdbc41Impl.java:118)
> at mondrian.olap4j.FactoryJdbc41Impl.newConnection(FactoryJdbc41Impl.java:32)
> at mondrian.olap4j.MondrianOlap4jDriver.connect(MondrianOlap4jDriver.java:97)
> at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:323)
> ... 31 more
> Caused by: java.lang.ClassNotFoundException: mondrian.spi.impl.JndiDataSourceResolver from [Module "org.jboss.teiid.translator.olap:main" from local module loader @16f65612 (finder: local module finder @311d617d (roots: /home/jstastny/tmp-workspaces/workspace/modules,/home/jstastny/tmp-workspaces/workspace/modules/system/layers/dv,/home/jstastny/tmp-workspaces/workspace/modules/system/layers/base/.overlays/layer-base-jboss-eap-6.4.9.CP,/home/jstastny/tmp-workspaces/workspace/modules/system/layers/base))]
> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at java.lang.Class.forName0(Native Method) [rt.jar:1.8.0_102]
> at java.lang.Class.forName(Class.java:348) [rt.jar:1.8.0_102]
> at mondrian.util.ClassResolver$AbstractClassResolver.forName(ClassResolver.java:92)
> at mondrian.util.ClassResolver$AbstractClassResolver.instantiateSafe(ClassResolver.java:63)
> ... 43 more
> {code}
> But the class is present in the new version of Mondrian too, see attached screenshot with decompiled jar structure.
> One workaround I found was to add dependency into olap translator's module.xml pointing at the org.mondrian module, which contains the mondrian jar.
> But this action is not required when using Mondrian 3.5.0.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
[JBoss JIRA] (TEIID-3925) Rename infinispan translators / resources adapters to align with running library mode versus access remote cache
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3925?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-3925.
-----------------------------------
Resolution: Duplicate Issue
> Rename infinispan translators / resources adapters to align with running library mode versus access remote cache
> ----------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-3925
> URL: https://issues.jboss.org/browse/TEIID-3925
> Project: Teiid
> Issue Type: Quality Risk
> Components: JDG Connector
> Affects Versions: 9.0
> Reporter: Van Halbert
> Assignee: Steven Hawkins
>
> Currently, the infinispan translators and resource adapters are named:
> - translator-infinispan-cache (infinispan-cache) / connector-infinispan.6
> - translator-infinispan-dsl (infinispan-cache-dsl) / connector-infinispan-dsl
> Suggested rename to be done in version 9 to align with infinispan 7:
> - translator-infinispan-library-mode (infinispan-library-mode) / connector-infinispan-library-mode.7
> - translator-infinispan-remote-cache (infinispan-remote-cache / connector-infinispan-remote-cache.7
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
[JBoss JIRA] (TEIID-4601) Infinispan DSL Translator: cannot insert into byte array column
by Jan Stastny (JIRA)
[ https://issues.jboss.org/browse/TEIID-4601?page=com.atlassian.jira.plugin... ]
Jan Stastny commented on TEIID-4601:
------------------------------------
[~vhalbert2] So the scenario in the description of this issue will be still valid and the error needs to be solved, right?
> Infinispan DSL Translator: cannot insert into byte array column
> ---------------------------------------------------------------
>
> Key: TEIID-4601
> URL: https://issues.jboss.org/browse/TEIID-4601
> Project: Teiid
> Issue Type: Bug
> Components: JDG Connector
> Affects Versions: 8.12.7.6_3
> Reporter: Jan Stastny
> Assignee: Van Halbert
> Fix For: 9.2
>
>
> When a POJO class field is of type byte[] , insert into a table, which is mapped to the POJO class fails with:
> {code:plain}
> Caused by: org.teiid.translator.TranslatorException: Conversion from String to byte is not supported
> at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:624) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:579) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:572) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.handleInsert(ObjectUpdateExecution.java:208) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.executeUpdate(ObjectUpdateExecution.java:143) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.execute(ObjectUpdateExecution.java:100) ~[?:?]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem$1.execute(ConnectorWorkItem.java:404) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:366) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_102]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at com.sun.proxy.$Proxy82.execute(Unknown Source) ~[?:?]
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_102]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_102]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_102]
> at java.lang.Thread.run(Thread.java:745) ~[?:1.8.0_102]
> Caused by: java.lang.IllegalArgumentException: Conversion from String to byte is not supported
> at org.teiid.core.util.StringUtil.valueOf(StringUtil.java:797) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.core.util.StringUtil.valueOf(StringUtil.java:768) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.translator.object.ClassRegistry.executeSetMethod(ClassRegistry.java:139) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:608) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:579) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:572) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.handleInsert(ObjectUpdateExecution.java:208) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.executeUpdate(ObjectUpdateExecution.java:143) ~[?:?]
> at org.teiid.translator.object.ObjectUpdateExecution.execute(ObjectUpdateExecution.java:100) ~[?:?]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem$1.execute(ConnectorWorkItem.java:404) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:366) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_102]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at com.sun.proxy.$Proxy82.execute(Unknown Source) ~[?:?]
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_102]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_102]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_102]
> at java.lang.Thread.run(Thread.java:745) ~[?:1.8.0_102]
> {code}
> POJO class:
> {code:java|title=SmallA.proto}
> package org.jboss.qe.jdg.remote.protobuf;
> message SmallA {
> required int32 intKey = 1;
> optional string stringNum = 2;
> required string stringKey = 3;
> optional float floatNum = 4;
> optional string bigIntegerValue = 5;
> optional int32 shortValue = 6;
> optional double doubleNum = 7;
> optional bytes objectValue = 8;
> optional int32 intNum = 9;
> optional string bigDecimalValue = 10;
> optional int64 longNum = 11;
> optional bool booleanValue = 12;
> optional int64 timeStampValue = 13;
> optional int32 byteNum = 14;
> optional int64 timeValue = 15;
> optional int64 dateValue = 16;
> optional int32 charValue = 17;
> }
> {code}
> Java code used to insert:
> {code:java}
> PreparedStatement pSt = con.prepareStatement(
> "INSERT INTO jdgSource1.SmallA(intKey,stringNum,stringKey,floatNum,bigIntegerValue,shortValue,doubleNum,objectValue,intNum,bigDecimalValue,longNum,booleanValue,timeStampValue,byteNum,timeValue,dateValue,charValue) VALUES"
> + "(1,'1','1',1.0,1,1,1,?,1,1.00,1,true,{ts '2016-01-01 12:00:00'},1,'12:00:00','2016-01-01','1')");
> pSt.setBytes(1, "1".getBytes());
> pSt.executeUpdate();
> {code}
> The cause is that internally the object translator uses StringUtil which can't handle byte type.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
[JBoss JIRA] (TEIID-4525) postgresql translator - remove all nulls & non printable characters
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4525?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-4525:
----------------------------------
Fix Version/s: Open To Community
> postgresql translator - remove all nulls & non printable characters
> -------------------------------------------------------------------
>
> Key: TEIID-4525
> URL: https://issues.jboss.org/browse/TEIID-4525
> Project: Teiid
> Issue Type: Feature Request
> Components: JDBC Connector
> Reporter: Omar Khan
> Priority: Minor
> Fix For: Open To Community, 10.0
>
>
> Would like to see the postgresql translator enhanced to add a feature to minimum remove nulls from text strings as some other databases i.e. Teradata allow for them where Postgres does not. This feature would behave in a similar manner as TrimSpaces, but simply remove all \u0000 characters.
> Furthermore, if possible, would like the ability to remove non printable characters to as another option provide another additional stripping mechanism, allowing the postgresql database to serve as a data cleaner if need be.
> Please refer to https://developer.jboss.org/thread/272644 for details
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years