[JBoss JIRA] (TEIID-3959) dynamic VDB, Not loading UDF , Showing class Not Found .
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3959?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3959.
---------------------------------
> dynamic VDB, Not loading UDF , Showing class Not Found .
> -----------------------------------------------------------
>
> Key: TEIID-3959
> URL: https://issues.jboss.org/browse/TEIID-3959
> Project: Teiid
> Issue Type: Quality Risk
> Components: Server
> Affects Versions: 8.12.2
> Environment: Windows 7, 64 bit
> Reporter: Durgadatta Sahu
> Assignee: Steven Hawkins
> Fix For: 9.0, 8.12.5
>
> Attachments: UDFVDB.vdb, UDFVDB.vdb
>
>
> Hi I am new to TEIID , and trying to deploy UDF and corresponding JAR at run time .
> It is showing following exception:-
> 10:46:47,729 INFO [org.teiid.RUNTIME] (teiid-async-threads - 6) TEIID50030 VDB DDS_TEST_VDB.1 model "modelsource" metadata loaded. End Time: 2/6/16 10:46 AM
> 10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) Exception in thread "teiid-async-threads - 6" org.teiid.metadata.MetadataException: TEIID30387 Could not load UDF "getDouble", since its invocation class "com.my.app.Demo" could not be found.
> 10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at org.teiid.query.function.FunctionTree.createFunctionDescriptor(FunctionTree.java:325)
> 10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at org.teiid.query.function.FunctionTree.addFunction(FunctionTree.java:212)
> 10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at org.teiid.query.function.FunctionTree.<init>(FunctionTree.java:102)
> 10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at org.teiid.deployers.CompositeVDB.buildTransformationMetaData(CompositeVDB.java:93)
> 10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at org.teiid.deployers.CompositeVDB.metadataLoadFinished(CompositeVDB.java:286)
> 10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at org.teiid.deployers.VDBRepository.finishDeployment(VDBRepository.java:297)
> 10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at org.teiid.runtime.AbstractVDBDeployer.metadataLoaded(AbstractVDBDeployer.java:244)
> 10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at org.teiid.jboss.VDBService.access$1200(VDBService.java:81)
> 10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at org.teiid.jboss.VDBService$6.run(VDBService.java:416)
> 10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at org.teiid.jboss.VDBService$7.run(VDBService.java:446)
> 10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> 10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> 10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at java.lang.Thread.run(Thread.java:745)
> 10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at org.jboss.threads.JBossThread.run(JBossThread.java:122)
> 10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) Caused by: java.lang.ClassNotFoundException: com.my.app.Demo from [Module "deployment.udfa-vdb.xml:main" from Service Module Loader]
> 10:46:47,729 ERROR [stderr] (teiid-async-threads - 6) at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213)
> 10:46:47,739 ERROR [stderr] (teiid-async-threads - 6) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459)
> 10:46:47,739 ERROR [stderr] (teiid-async-threads - 6) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408)
> 10:46:47,739 ERROR [stderr] (teiid-async-threads - 6) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389)
> 10:46:47,739 ERROR [stderr] (teiid-async-threads - 6) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134)
> 10:46:47,739 ERROR [stderr] (teiid-async-threads - 6) at java.lang.Class.forName0(Native Method)
> 10:46:47,739 ERROR [stderr] (teiid-async-threads - 6) at java.lang.Class.forName(Class.java:340)
> 10:46:47,739 ERROR [stderr] (teiid-async-threads - 6) at org.teiid.query.function.UDFSource.getInvocationClass(UDFSource.java:43)
> 10:46:47,739 ERROR [stderr] (teiid-async-threads - 6) at org.teiid.query.function.FunctionTree.createFunctionDescriptor(FunctionTree.java:315)
> 10:46:47,739 ERROR [stderr] (teiid-async-threads - 6) ... 13 more
> ===============================
> I have crated a dynamic VDB and define UDF details as follows
> <?xml version="1.0" encoding="utf-8"?>
> <vdb name="DDS_TEST_VDB" version="1">
> <model name="modelsource" type='VIRTUAL' >
> <property name ="lib" value ="com.my.app"></property>
> <metadata type="DDL">
> <![CDATA[
> create virtual function getDouble(key Long) returns Double
> options (
> java_class 'com.my.app.Demo',
> java_method 'getValue'
> );
> ]]>
> </metadata>
> </model>
> </vdb>
> And I have deployed my jar file and module.xml in following path,
> \teiid-8.12.2-server\teiid-8.12.2\modules\com\my\app\main\
> module.xml :
> <?xml version="1.0" encoding="UTF-8"?>
>
> <module xmlns="urn:jboss:module:1.1" name="com.my.app">
>
> <resources>
> <resource-root path="myapp.jar"/>
> <!-- Insert resources here -->
> </resources>
> <dependencies>
> </dependencies>
> </module>
> Thanks,
> Durga
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 4 months
[JBoss JIRA] (TEIID-4402) Insert statement with a date field fails
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4402?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-4402.
---------------------------------
> Insert statement with a date field fails
> ----------------------------------------
>
> Key: TEIID-4402
> URL: https://issues.jboss.org/browse/TEIID-4402
> Project: Teiid
> Issue Type: Bug
> Components: Salesforce Connector
> Affects Versions: 9.0.2
> Environment: WildFly Full 9.0.2.Final (WildFly Core 1.0.2.Final)
> Teiid 9.0.2
> jdk1.8.0_101
> Salesforce sandbox
> Salesforce connectors / translators: salesforce and salesforce-34
> Reporter: J Price
> Assignee: Steven Hawkins
> Fix For: 9.1, 9.0.4
>
>
> I have a custom object created in Salesforce which has date fields. The model has the fields identified as date correctly. When specifying a date using an insert statement I receive an error back from Salesforce:
> _
> org.teiid.runtime.client.TeiidClientException: java.lang.RuntimeException: Remote org.teiid.core.TeiidProcessingException: TEIID30504 Sandbox: Start Date: value not of required type: 2016-03-17_
> I have tried forcing it to a date using the parsedate function as well as passing it as is.
> I setup a proxy to try and identify the cause and found that the datatype being passed in the underlying SOAP request is xsd:string instead of xsd:date.
> Using fiddler I duplicated the underlying SOAP request, but changed the types to xsd:date, and resubmitted the request successfully.
> ----
> As an example I have created a simple custom object in salesforce. The DDL for the imported object is as follows:
> {{
> CREATE TABLE SimpleDateObjectDemo__c (
> Id VARCHAR(18) DEFAULT Generated upon creation NOT NULL,
> OwnerId VARCHAR(18),
> IsDeleted BOOLEAN,
> Name VARCHAR(80),
> Start_Date__c DATE
> );
> }}
> The following query produces the same error:
> {{
> INSERT INTO Sandbox.SimpleDateObjectDemo__c (Start_Date__c)
> VALUES ('2001-01-01')
> }}
> The above query results in the following log messages:
> {{
> 14:43:28,743 INFO [org.teiid.PLANNER] (Worker3_QueryProcessorQueue19) ffLmdSxeJfyw
> ============================================================================
> USER COMMAND:
> INSERT INTO Sandbox.SimpleDateObjectDemo__c (Start_Date__c) VALUES ({d'2001-01-01'})
> ----------------------------------------------------------------------------
> OPTIMIZE:
> INSERT INTO Sandbox.SimpleDateObjectDemo__c (Start_Date__c) VALUES ({d'2001-01-01'})
> ----------------------------------------------------------------------------
> GENERATE CANONICAL:
> INSERT INTO Sandbox.SimpleDateObjectDemo__c (Start_Date__c) VALUES ({d'2001-01-01'})
> CANONICAL PLAN:
> Project(groups=[], props={PROJECT_COLS=[Count]})
> Source(groups=[Sandbox.SimpleDateObjectDemo__c], props={ATOMIC_REQUEST=INSERT INTO Sandbox.SimpleDateObjectDemo__c (Start_Date__c) VALUES ({d'2001-01-01'}), VIRTUAL_COMMAND=INSERT INTO Sandbox.SimpleDateObjectDemo__c (Start_Date__c) VALUES ({d'2001-01-01'})})
> ============================================================================
> EXECUTING PlaceAccess
> AFTER:
> Project(groups=[], props={PROJECT_COLS=[Count]})
> Access(groups=[Sandbox.SimpleDateObjectDemo__c], props={SOURCE_HINT=null, MODEL_ID=Schema name=Sandbox, nameInSource=null, uuid=mmuuid:e1fb1f99-dc05-42fc-9e59-1ff9c172756e})
> Source(groups=[Sandbox.SimpleDateObjectDemo__c], props={ATOMIC_REQUEST=INSERT INTO Sandbox.SimpleDateObjectDemo__c (Start_Date__c) VALUES ({d'2001-01-01'}), VIRTUAL_COMMAND=INSERT INTO Sandbox.SimpleDateObjectDemo__c (Start_Date__c) VALUES ({d'2001-01-01'})})
> ============================================================================
> EXECUTING RaiseAccess
> AFTER:
> Access(groups=[Sandbox.SimpleDateObjectDemo__c], props={SOURCE_HINT=null, MODEL_ID=Schema name=Sandbox, nameInSource=null, uuid=mmuuid:e1fb1f99-dc05-42fc-9e59-1ff9c172756e})
> Project(groups=[], props={PROJECT_COLS=[Count]})
> Source(groups=[Sandbox.SimpleDateObjectDemo__c], props={ATOMIC_REQUEST=INSERT INTO Sandbox.SimpleDateObjectDemo__c (Start_Date__c) VALUES ({d'2001-01-01'}), VIRTUAL_COMMAND=INSERT INTO Sandbox.SimpleDateObjectDemo__c (Start_Date__c) VALUES ({d'2001-01-01'})})
> ============================================================================
> EXECUTING AssignOutputElements
> AFTER:
> Access(groups=[Sandbox.SimpleDateObjectDemo__c], props={SOURCE_HINT=null, MODEL_ID=Schema name=Sandbox, nameInSource=null, uuid=mmuuid:e1fb1f99-dc05-42fc-9e59-1ff9c172756e, OUTPUT_COLS=[Count]})
> Project(groups=[], props={PROJECT_COLS=[Count], OUTPUT_COLS=[Count]})
> Source(groups=[Sandbox.SimpleDateObjectDemo__c], props={ATOMIC_REQUEST=INSERT INTO Sandbox.SimpleDateObjectDemo__c (Start_Date__c) VALUES ({d'2001-01-01'}), VIRTUAL_COMMAND=INSERT INTO Sandbox.SimpleDateObjectDemo__c (Start_Date__c) VALUES ({d'2001-01-01'}), OUTPUT_COLS=[Count]})
> ============================================================================
> EXECUTING CalculateCost
> AFTER:
> Access(groups=[Sandbox.SimpleDateObjectDemo__c], props={SOURCE_HINT=null, MODEL_ID=Schema name=Sandbox, nameInSource=null, uuid=mmuuid:e1fb1f99-dc05-42fc-9e59-1ff9c172756e, OUTPUT_COLS=[Count], EST_CARDINALITY=-1.0})
> Project(groups=[], props={PROJECT_COLS=[Count], OUTPUT_COLS=[Count], EST_CARDINALITY=-1.0})
> Source(groups=[Sandbox.SimpleDateObjectDemo__c], props={ATOMIC_REQUEST=INSERT INTO Sandbox.SimpleDateObjectDemo__c (Start_Date__c) VALUES ({d'2001-01-01'}), VIRTUAL_COMMAND=INSERT INTO Sandbox.SimpleDateObjectDemo__c (Start_Date__c) VALUES ({d'2001-01-01'}), OUTPUT_COLS=[Count], EST_CARDINALITY=-1.0})
> ============================================================================
> EXECUTING PlanSorts
> AFTER:
> Access(groups=[Sandbox.SimpleDateObjectDemo__c])
> Project(groups=[])
> Source(groups=[Sandbox.SimpleDateObjectDemo__c])
> ============================================================================
> EXECUTING CollapseSource
> AFTER:
> Access(groups=[Sandbox.SimpleDateObjectDemo__c], props={SOURCE_HINT=null, MODEL_ID=Schema name=Sandbox, nameInSource=null, uuid=mmuuid:e1fb1f99-dc05-42fc-9e59-1ff9c172756e, OUTPUT_COLS=[Count], EST_CARDINALITY=-1.0, ATOMIC_REQUEST=INSERT INTO Sandbox.SimpleDateObjectDemo__c (Start_Date__c) VALUES ({d'2001-01-01'})})
> ============================================================================
> CONVERTING PLAN TREE TO PROCESS TREE
> PROCESS PLAN =
> AccessNode(0) output=[Count] INSERT INTO Sandbox.SimpleDateObjectDemo__c (Start_Date__c) VALUES ({d'2001-01-01'})
> ============================================================================
> ----------------------------------------------------------------------------
> OPTIMIZATION COMPLETE:
> PROCESSOR PLAN:
> AccessNode(0) output=[Count] INSERT INTO Sandbox.SimpleDateObjectDemo__c (Start_Date__c) VALUES ({d'2001-01-01'})
> ============================================================================
> 14:43:30,088 WARN [org.teiid.CONNECTOR] (Worker4_QueryProcessorQueue20) ffLmdSxeJfyw Connector worker process failed for atomic-request=ffLmdSxeJfyw.0.0.0: org.teiid.translator.TranslatorException: Start Date: value not of required type: 2001-01-01
> at org.teiid.translator.salesforce.execution.InsertExecutionImpl.execute(InsertExecutionImpl.java:121)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem$1.execute(ConnectorWorkItem.java:403)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:365)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy57.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)
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> 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)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: javax.resource.ResourceException: Start Date: value not of required type: 2001-01-01
> at org.teiid.resource.adapter.salesforce.SalesforceConnectionImpl.analyzeResult(SalesforceConnectionImpl.java:403)
> at org.teiid.resource.adapter.salesforce.SalesforceConnectionImpl.create(SalesforceConnectionImpl.java:368)
> at org.teiid.translator.salesforce.execution.InsertExecutionImpl.execute(InsertExecutionImpl.java:89)
> ... 19 more
> 14:43:30,093 WARN [org.teiid.PROCESSOR] (Worker3_QueryProcessorQueue21) ffLmdSxeJfyw TEIID30020 Processing exception for request ffLmdSxeJfyw.0 'TEIID30504 Sandbox: Start Date: value not of required type: 2001-01-01'. Originally TeiidProcessingException SalesforceConnectionImpl.java:403. Enable more detailed logging to see the entire stacktrace.
> }}
> The SOAP request produced for the above query is as follows:
> {{
> <?xml version="1.0" encoding="UTF-8"?>
> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <env:Header>
> <CallOptions xmlns="urn:partner.soap.sforce.com">
> <client>RedHat/MetaMatrix/</client>
> <defaultNamespace xsi:nil="true" />
> </CallOptions>
> <SessionHeader xmlns="urn:partner.soap.sforce.com">
> <sessionId>REMOVED</sessionId>
> </SessionHeader>
> </env:Header>
> <env:Body>
> <m:create xmlns:m="urn:partner.soap.sforce.com" xmlns:sobj="urn:sobject.partner.soap.sforce.com">
> <m:sObjects>
> <sobj:type xsi:type="xsd:string">SimpleDateObjectDemo__c</sobj:type>
> <sobj:Start_Date__c xsi:type="xsd:string">2001-01-01</sobj:Start_Date__c>
> </m:sObjects>
> </m:create>
> </env:Body>
> </env:Envelope>
> }}
> The XMI for the above table is as follows:
> {{
> <relational:BaseTable xmi:uuid="mmuuid:878a18c9-359c-4756-b192-79ed7c91d7af" name="SimpleDateObjectDemo__c" nameInSource="SimpleDateObjectDemo__c">
> <columns xmi:uuid="mmuuid:22b29abc-6d51-475e-891c-6a19a4869cee" name="Id" nameInSource="Id" nativeType="id" length="18" nullable="NO_NULLS" defaultValue="Generated upon creation" uniqueKeys="mmuuid/f1d6a7d7-cdff-4bc9-b1df-61096c31aacf">
> <type href="http://www.w3.org/2001/XMLSchema#string"/>
> </columns>
> <columns xmi:uuid="mmuuid:4b64550b-057f-49d5-ac44-6f4275508a0c" name="OwnerId" nameInSource="OwnerId" nativeType="id" length="18">
> <type href="http://www.w3.org/2001/XMLSchema#string"/>
> </columns>
> <columns xmi:uuid="mmuuid:cc2969bd-98fd-4918-b6e2-6c0b98407f8b" name="IsDeleted" nameInSource="IsDeleted" nativeType="boolean">
> <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
> </columns>
> <columns xmi:uuid="mmuuid:0c42849d-7b8c-4bc9-8472-bf976c9946db" name="Name" nameInSource="Name" nativeType="string" length="80">
> <type href="http://www.w3.org/2001/XMLSchema#string"/>
> </columns>
> <columns xmi:uuid="mmuuid:c085614b-49b8-4e30-810b-13f0e8d337c5" name="Start_Date__c" nameInSource="Start_Date__c" nativeType="date">
> <type href="http://www.w3.org/2001/XMLSchema#date"/>
> </columns>
> <primaryKey xmi:uuid="mmuuid:f1d6a7d7-cdff-4bc9-b1df-61096c31aacf" name="Id_PK" columns="mmuuid/22b29abc-6d51-475e-891c-6a19a4869cee"/>
> </relational:BaseTable>
> }}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 4 months
[JBoss JIRA] (TEIID-3559) Refactor Object and Infinispan translator / connectors
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3559?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3559.
---------------------------------
> Refactor Object and Infinispan translator / connectors
> ------------------------------------------------------
>
> Key: TEIID-3559
> URL: https://issues.jboss.org/browse/TEIID-3559
> Project: Teiid
> Issue Type: Task
> Components: Misc. Connectors
> Reporter: Van Halbert
> Assignee: Van Halbert
> Priority: Optional
> Fix For: 9.0, 8.12.5
>
>
> Now that JDG has reworked its remote-cache and changed (reduced) what dependencies its exposed, there's now more common code between the object/infinispan-cache translator/connector and the infinispan-cache-dsl translator/connector. I think refactoring can eliminate issues with support and ensure common behavior across all the code.
> Where is common code seen:
> - searching (i.e., DSLSearch)
> - updates (InfinispanUpdateExecution)
> - ClassRegistry
> (for starters)
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 4 months
[JBoss JIRA] (TEIID-3886) Redshift - query ends with error message "Query cancelled on user's request"
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3886?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3886.
---------------------------------
> Redshift - query ends with error message "Query cancelled on user's request"
> ----------------------------------------------------------------------------
>
> Key: TEIID-3886
> URL: https://issues.jboss.org/browse/TEIID-3886
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 8.12.3
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Fix For: 8.13, 8.12.4
>
>
> If one query ends with PSQLException, every next query ends with exception with error message "Query cancelled on user's request". This happens even if new connection to VDB is created.
> Query 1: select convert(timevalue, time) from source.smalla
> Query 2: select 1 from source.smalla
> Result of query 1 (see TEIID-3885):
> {code:text}
> 14:26:56,197 WARN [org.teiid.PROCESSOR] (Worker17_QueryProcessorQueue187) TEIID30020 Processing exception for request 0iWdE3mYfqbA.0 'TEIID30504 rs: 0 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT cast(date_trunc('second', g_0.timevalue) AS time) FROM smalla AS g_0]'. Originally TeiidProcessingException 'ERROR: Specified types or functions (one per INFO message) not supported on Redshift tables.' QueryExecutorImpl.java:2157.: org.teiid.core.TeiidProcessingException: TEIID30504 rs: 0 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT cast(date_trunc('second', g_0.timevalue) AS time) FROM smalla AS g_0]
> at org.teiid.dqp.internal.process.DataTierTupleSource.exceptionOccurred(DataTierTupleSource.java:401) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:161) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:374) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:470) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348) [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_40]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_40]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_40]
> Caused by: org.teiid.translator.jdbc.JDBCExecutionException: 0 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT cast(date_trunc('second', g_0.timevalue) AS time) FROM smalla AS g_0]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:349) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at sun.reflect.GeneratedMethodAccessor189.invoke(Unknown Source) [:1.8.0_40]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_40]
> at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_40]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at com.sun.proxy.$Proxy124.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_40]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) [teiid-engine-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> ... 6 more
> Caused by: org.postgresql.util.PSQLException: ERROR: Specified types or functions (one per INFO message) not supported on Redshift tables.
> at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
> at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
> at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:302)
> at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:462)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:123)
> ... 17 more
> {code}
> Result of query 2:
> {code:text}
> 14:35:06,805 DEBUG [org.teiid.CONNECTOR] (Worker20_QueryProcessorQueue200) Source-specific command: SELECT 1 FROM smalla AS g_0
> 14:35:06,983 WARN [org.teiid.CONNECTOR] (Worker20_QueryProcessorQueue200) Connector worker process failed for atomic-request=bD3A8iB3KL+0.3.0.48: org.teiid.translator.jdbc.JDBCExecutionException: 0 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT 1 FROM smalla AS g_0]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131) [translator-jdbc-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:349)
> at sun.reflect.GeneratedMethodAccessor189.invoke(Unknown Source) [:1.8.0_40]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_40]
> at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_40]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy124.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_40]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> 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_40]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_40]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_40]
> Caused by: org.postgresql.util.PSQLException: ERROR: Query cancelled on user's request
> at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
> at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
> at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:302)
> at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:462)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:123) [translator-jdbc-8.12.3.redhat-1.jar:8.12.3.redhat-1]
> ... 17 more
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 4 months
[JBoss JIRA] (TEIID-3802) HANA translator modifies boolean to tinyint in type conversion
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3802?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3802.
---------------------------------
> HANA translator modifies boolean to tinyint in type conversion
> --------------------------------------------------------------
>
> Key: TEIID-3802
> URL: https://issues.jboss.org/browse/TEIID-3802
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.7.1.6_2
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Fix For: 8.12.2, 8.13
>
>
> Teiid modifies boolean data type to tinyint before pushing the query down to the HANA instance.
> This brings following issue while having a query similar to this one:
> {code:sql}
> SELECT BQT1.SMallA.BooleanValue,cast(BQT2.SmallB.CharValue as boolean) FROM BQT1.SmallA,BQT2.SmallB WHERE BQT1.SmallA.BooleanValue = cast(BQT2.SmallB.CharValue as boolean)
> {code}
> which Teiid modifies to:
> {code:sql}
> SELECT g_0."BOOLEANVALUE", cast(g_1."CHARVALUE" AS tinyint) FROM "BQT1"."SMALLA" AS g_0, "BQT2"."SMALLB" AS g_1 WHERE g_0."BOOLEANVALUE" = cast(g_1."CHARVALUE" AS tinyint)
> {code}
> But the problem is not present for:
> {code:sql}
> SELECT BQT1.SMallA.BooleanValue FROM BQT1.SmallA WHERE BQT1.SmallA.BooleanValue = cast(BQT1.SmallA.CharValue as boolean)
> {code}
> It seems that the Cartesian product and comparing values from different sources are the cause of the issue. But HANA has internal type BOOLEAN, so there might be no point at modifying the type to TINYINT after all. I also checked, that the pushed query (which causes the issue) with the casting altered to BOOLEAN runs well on HANA. The following query returns expected results when pushed directly to HANA instance:
> {code:sql}
> SELECT g_0."BOOLEANVALUE", cast(g_1."CHARVALUE" AS boolean) FROM "BQT1"."SMALLA" AS g_0, "BQT2"."SMALLB" AS g_1 WHERE g_0."BOOLEANVALUE" = cast(g_1."CHARVALUE" AS boolean)
> {code}
> NOTE: The CharValue columns are modelled as VARCHAR/string in fact. Thus the cast is a valid operation.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 4 months