4 Replies Latest reply on Sep 12, 2016 10:44 AM by rareddy

    Issue using salesforce-34 api

    tomesc

      Hi,

      I am currently evaluating teiid and I am really excited. But now I have a strange issue. Maybe realted to https://developer.jboss.org/thread/263098 and [TEIID-3981] Salesforce-34 connector dependency on "com.force.api" is wrong - JBoss Issue Tracker.

      As server I use wildfly 10.0.0.Final and teiid-9.1.0.Beta1. In the standalone.xml I configured the resource adapters "salesforce" and "salesforce-34". And I defined two VDB's, one for salesforce and one for salesforce-34.

      Both work fine with squirell as client.

       

      My own written java standalone client (based on the quickstarts and https://docs.jboss.org/author/display/teiid830final/Connecting+to+Teiid+-+SimpleClient+Example) works proper with v22 only. As soon as I use a WHERE condition to select a certain ID, the v34 version throws the following exception:

       

      java.lang.NoSuchMethodError: Remote java.lang.NoSuchMethodError: com.sforce.soap.partner.QueryResult.setRecords([Lcom/sforce/soap/partner/sobject/SObject;>V

      at org.teiid.resource.adapter.salesforce.SalesforceConnectionImpl.retrieve(SalesforceConnectionImpl.java:456)

      at org.teiid.translator.salesforce.execution.QueryExecutionImpl.execute(QueryExecutionImpl.java:206)

      at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:367)

      ...

       

      My client use the jdbc driver teiid-9.1.0.Beta1-jdbc.jar and has no other dependencies. It makes also no difference if I use org.teiid.jdbc.TeiidDataSource or org.teiid.jdbc.TeiidDriver.

      By the way: The same issue I have if I try to use salesforce-34 from an EJB that runs within the teiid server.

       

      Any ideas?

      Very thanks in advance.

      Thomas

        • 1. Re: Issue using salesforce-34 api
          rareddy

          Hello Thomas,

           

          Welcome to Teiid community. We appreciate your consideration in using Teiid.

           

          The issue is not with JDBC connection, but the salesforce-34 translator itself and its dependencies. Even though we packaged "34" version with 34 version of Salesforce partner libraries, we compiled the code using 22 version, and thus missed a interface method change between these two versions. If you can open JIRA here Teiid - JBoss Issue Tracker  about this issue, we will see we try to fix for the next milestone build.

           

          Thanks


          Ramesh..

          • 2. Re: Issue using salesforce-34 api
            shawkins

            It's a very subtle change as the code compiles against 22 and 34 - however the method changes from SObject[] to ISObject[] in 34 (SObject is the only concrete ISObject) thus the issue.  So we'll need some kind of override logic in the 34 resource adapter to account for this.

            • 3. Re: Issue using salesforce-34 api
              tomesc

              Very thank's for the prompt replies.

              I opened a jira as requested: https://issues.jboss.org/browse/TEIID-4439

               

              However I am a bit confused that it seem to work fine with SQuirrel. SQuirrel use the same JDBC Driver. In my case the only difference is the Java runtime, version, 1.7 (SQuirrel) vs. version 1.8 (my application).

              Strange...

              • 4. Re: Issue using salesforce-34 api
                rareddy

                I suspect when you are going over SquirreL it may be hitting 22 version of the SF. Java runtime shouldn't affect either.