SELECTing data from salesforce with a WHERE condition which includes
ID results in a NPE
----------------------------------------------------------------------------------------
Key: TEIID-1402
URL:
https://issues.jboss.org/browse/TEIID-1402
Project: Teiid
Issue Type: Bug
Components: Salesforce Connector
Affects Versions: 7.1.1, 7.3
Environment: Teiid 7.1.x, 7.2 and current 7.3 Alpha2 trunk running on EAP 5.1
Reporter: Wanja Pernath
Assignee: Steven Hawkins
Fix For: 7.1.1, 7.3
Steps to reproduce:
1. Use teiid-designer to import salesforce structure
2. Build and deploy a VDB to teiid<version>
3. Now find an existing ID of for example an Account
// just to get a valid ID
select ID from Account where Name like 'xyz';
// now try to fetch the Account with just ID in WHERE condition
select ID, Name from Account where ID = 'xyz.id'
You'll get a NPE with the following stacktrace (this is current subversion trunk).
Note, this only happens if you're using salesforce connector. It does not happen if
the table is materialized.
2010-12-20 23:27:22,753 DEBUG [org.teiid.CONNECTOR] (Worker185_QueryProcessorQueue2804)
uPHr01U+UKiU.0.1.231 Create State
2010-12-20 23:27:22,754 DEBUG [org.teiid.CONNECTOR] (Worker186_QueryProcessorQueue2805)
uPHr01U+UKiU.0.1.231 Processing NEW request: SELECT gss.salesforce.Account.Id,
gss.salesforce.Account.Name FROM gss.salesforce.Account WHERE gss.salesforce.Account.Id =
'001A000000K65hEIAR'
2010-12-20 23:27:23,805 ERROR [org.jboss.remoting.transport.http.HTTPClientInvoker]
(Worker186_QueryProcessorQueue2805) Error creating SSL Socket Factory for client invoker:
Error initializing socket factory SSL context: Can not find truststore url.
2010-12-20 23:27:24,926 DEBUG [org.teiid.CONNECTOR] (Worker186_QueryProcessorQueue2805)
Login was successful for username wpernath(a)redhat.com.gss
2010-12-20 23:27:24,928 ERROR [org.jboss.remoting.transport.http.HTTPClientInvoker]
(Worker186_QueryProcessorQueue2805) Error creating SSL Socket Factory for client invoker:
Error initializing socket factory SSL context: Can not find truststore url.
2010-12-20 23:27:26,125 DEBUG [org.teiid.CONNECTOR] (Worker186_QueryProcessorQueue2805)
uPHr01U+UKiU.0.1.231 Obtained execution
2010-12-20 23:27:26,125 DEBUG [org.teiid.CONNECTOR] (Worker186_QueryProcessorQueue2805)
gss.uPHr01U+UKiU.uPHr01U+UKiU.0.1: Incoming Query: SELECT Account.Id, Account.Name FROM
Account WHERE Account.Id = '001A000000K65hEIAR'
2010-12-20 23:27:26,125 ERROR [org.teiid.CONNECTOR] (Worker186_QueryProcessorQueue2805)
Connector worker process failed for atomic-request=uPHr01U+UKiU.0.1.231
java.lang.NullPointerException
at
org.teiid.translator.salesforce.execution.visitors.SelectVisitor.getIdInCriteria(SelectVisitor.java:214)
at
org.teiid.translator.salesforce.execution.QueryExecutionImpl.execute(QueryExecutionImpl.java:140)
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:263)
at
org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:281)
at
org.teiid.dqp.internal.process.DataTierTupleSource.access$000(DataTierTupleSource.java:71)
at
org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:123)
at
org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:120)
at org.teiid.dqp.internal.process.DQPCore$FutureWork.run(DQPCore.java:108)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:188)
at
org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:116)
at
org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:290)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
2010-12-20 23:27:26,126 ERROR [org.teiid.PROCESSOR] (Worker185_QueryProcessorQueue2806)
Unexpected exception for request uPHr01U+UKiU.0
java.lang.NullPointerException
at
org.teiid.translator.salesforce.execution.visitors.SelectVisitor.getIdInCriteria(SelectVisitor.java:214)
at
org.teiid.translator.salesforce.execution.QueryExecutionImpl.execute(QueryExecutionImpl.java:140)
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:263)
at
org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:281)
at
org.teiid.dqp.internal.process.DataTierTupleSource.access$000(DataTierTupleSource.java:71)
at
org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:123)
at
org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:120)
at org.teiid.dqp.internal.process.DQPCore$FutureWork.run(DQPCore.java:108)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:188)
at
org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:116)
at
org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:290)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
2010-12-20 23:27:26,126 DEBUG [org.teiid.CONNECTOR] (Worker186_QueryProcessorQueue2807)
uPHr01U+UKiU.0.1.231 Processing Close : SELECT gss.salesforce.Account.Id,
gss.salesforce.Account.Name FROM gss.salesforce.Account WHERE gss.salesforce.Account.Id =
'001A000000K65hEIAR'
2010-12-20 23:27:26,126 DEBUG [org.teiid.CONNECTOR] (Worker186_QueryProcessorQueue2807)
SynchQueryExecution.close() called
2010-12-20 23:27:26,126 DEBUG [org.teiid.CONNECTOR] (Worker186_QueryProcessorQueue2807)
uPHr01U+UKiU.0.1.231 Closed execution
2010-12-20 23:27:26,126 DEBUG [org.teiid.CONNECTOR] (Worker186_QueryProcessorQueue2807)
uPHr01U+UKiU.0.1.231 Remove State
2010-12-20 23:27:26,126 DEBUG [org.teiid.CONNECTOR] (Worker186_QueryProcessorQueue2807)
uPHr01U+UKiU.0.1.231 Closed connection
--
This message is automatically generated by JIRA.
For more information on JIRA, see: