1 2 Previous Next 25 Replies Latest reply on Feb 19, 2016 1:40 AM by pranavk Go to original post
      • 15. Re: Certain fields not visible in Salesforce source model
        pranavk

        Hi,

         

        v34 alternare kit mechanism has been working fine for me. I noticed a basic error yesterday while working on a simple query of the form -> "select * from Account where Id='000091003AAAQZ'".

        I noticed that code in the QueryExecutionImpl.execute() method goes to call the SalesforceConnectionImpl.retrieve() instead of query() method as the canRetrieve() call returns true for this query's case.

        The retrieve method fails showing the following exception. I checked my loaded classes in the classloader, and there didnt seem to be any duplicates or conflicts, I could see only version of the Salesforce classes. But the dependency analyzer of my IDE shows a conflict while analyzing the pom for my project showing that both v22 and v34 Salesforce dependency are available.

        This issue was not there with such a query without the v34 kit (on v22).

         

        [Worker0_QueryProcessorQueue13] ERROR org.teiid.CONNECTOR  - Connector worker process failed for atomic-request=kjDyg+tKyoXq.6.0.0

          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:459)

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

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

               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:497)

               at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)

               at com.sun.proxy.$Proxy314.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     

         

        Thanks,

        Pranav

        • 16. Re: Certain fields not visible in Salesforce source model
          rareddy

          You should open separate discussion on this.

          • 17. Re: Certain fields not visible in Salesforce source model
            shawkins

            Pranav,

             

            Yes it does look like the versions are being mixed.  Are you using embedded or the server and are you using the v34 translator and the v34 resource adapter in this scenario?

             

            Steve

            • 18. Re: Certain fields not visible in Salesforce source model
              pranavk

              Hi,

               

              Ramesh, I just thought that my point was directly related to the Salesforce upgrade performed as an outcome of this thread, hence I continued on this. I can certainly start another discussion post this.

               

              Steve, I am using Teiid embedded, with the v34 translator and resource adapter in my scenario (which is getting mixed up because the v34 is dependent on the base translator and connector, which in turn is dependent on Salesforce v22). I see the purpose of dependencyManagement tags would be to override the versions but its usage seems to conflict. For some reason I am not able to build the Teiid connector, translator hence I am not able to try my changes. I have to see why that would be happening.

               

              Please also let me know if you want me to start another discussion.

               

              Pranav

              • 19. Re: Certain fields not visible in Salesforce source model
                shawkins

                So there are two related issues here:

                 

                How to manage your development time classpath and how to manage your runtime classpath.

                 

                What Teiid version are you using?

                 

                > For some reason I am not able to build the Teiid connector, translator hence I am not able to try my changes.

                 

                Are you starting with the standard source tree, or are you creating a new maven project?  If it's the latter what does your pom look like?

                 

                On the runtime,  and what is building the classpath?

                • 20. Re: Certain fields not visible in Salesforce source model
                  pranavk

                  Hi Steve,

                   

                  The second issue is off the deck, I figure its an issue at my end.

                   

                  For the first and the main issue>

                  Yes runtime and development time classpath variation. I noticed this issue on Teiid 8.12.0 but just to be sure, I also tried with 8.13 and this issue persisted.

                  • 21. Re: Certain fields not visible in Salesforce source model
                    rareddy

                    Pranav,

                     

                    There is no new information from above. Teiid configuration is setup for deployment in the EAP. For embedded, you would need to mimic that behavior, in setting up that classpath.

                     

                    That means to use the "34" version you need both (using 8.12.4)

                            <resource-root path="translator-salesforce-8.12.4.jar" />     

                            <resource-root path="translator-salesforce-34-8.12.4.jar" />

                     

                    then salesfore "34" library

                     

                    force-partner-api-34.0.0.jar

                    force-wsc-34.0.0.jar

                     

                    then rest of the dependencies. If you are using 8.13, the dependency structure of the salesforce-34 translator module should be setup correctly, so if you depend on this project in your maven project, that should pull in the right dependencies.

                     

                    Ramesh..

                    • 22. Re: Certain fields not visible in Salesforce source model
                      pranavk

                      Thanks Ramesh,

                       

                      I get the fact that earlier we needed to include both the usual translator and the translator-34 kit for things to work, and 8.13 onwards I see that we dont need to anymore. Including just the 34 translator and connectors brings the base connector and translator too, as its dependency.

                      But even following this; while the rest of the things work fine for me, the issue related to the retrieve() call still persists. I guess there is still some mix-up due which I still see that NoSuchMethodError as stated above.

                       

                      Pranav

                      • 23. Re: Certain fields not visible in Salesforce source model
                        rareddy

                        Pranav,

                         

                        I believe there is bug in the pom.xml for the "connector-salesforce-34" module. The maven dependency tree on this module is showing like

                         

                        [INFO] org.jboss.teiid.connectors:connector-salesforce-34:jar:9.0.0.Alpha1-SNAPSHOT
                        [INFO] +- org.jboss.teiid.connectors:connector-salesforce:jar:9.0.0.Alpha1-SNAPSHOT:compile
                        [INFO] |  +- org.jboss.teiid:teiid-api:jar:9.0.0.Alpha1-SNAPSHOT:compile
                        [INFO] |  +- org.jboss.spec.javax.resource:jboss-connector-api_1.7_spec:jar:1.0.0.Final:compile
                        [INFO] |  +- org.jboss.teiid.connectors:translator-salesforce:jar:9.0.0.Alpha1-SNAPSHOT:compile
                        [INFO] |  |  +- com.force.api:force-partner-api:jar:22.0.0:compile
                        [INFO] |  |  \- com.force.api:force-wsc:jar:22.0.0:compile
                        [INFO] |  +- org.apache.cxf:cxf-rt-frontend-jaxrs:jar:3.0.5:compile
                        [INFO] |  |  +- javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile
                        [INFO] |  |  \- javax.annotation:javax.annotation-api:jar:1.2:compile
                        [INFO] |  +- org.apache.cxf:cxf-rt-rs-client:jar:3.0.5:compile
                        [INFO] |  +- org.apache.cxf:cxf-core:jar:3.0.5:compile
                        [INFO] |  |  \- org.codehaus.woodstox:woodstox-core-asl:jar:4.2.0:compile
                        [INFO] |  |    \- org.codehaus.woodstox:stax2-api:jar:3.1.4:compile
                        [INFO] |  +- org.apache.cxf:cxf-rt-bindings-xml:jar:3.0.5:compile
                        [INFO] |  \- org.apache.cxf:cxf-rt-transports-http:jar:3.0.5:compile
                        

                         

                        see the "com.force.api:force-partner-api:jar:22.0.0" dependency, that should not be the case. A corrected one looks like


                        [INFO] org.jboss.teiid.connectors:connector-salesforce-34:jar:9.0.0.Alpha1-SNAPSHOT
                        [INFO] +- org.jboss.teiid.connectors:connector-salesforce:jar:9.0.0.Alpha1-SNAPSHOT:compile
                        [INFO] |  +- org.jboss.teiid:teiid-api:jar:9.0.0.Alpha1-SNAPSHOT:compile
                        [INFO] |  +- org.jboss.spec.javax.resource:jboss-connector-api_1.7_spec:jar:1.0.0.Final:compile
                        [INFO] |  +- org.apache.cxf:cxf-rt-frontend-jaxrs:jar:3.0.5:compile
                        [INFO] |  |  +- javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile
                        [INFO] |  |  \- javax.annotation:javax.annotation-api:jar:1.2:compile
                        [INFO] |  +- org.apache.cxf:cxf-rt-rs-client:jar:3.0.5:compile
                        [INFO] |  +- org.apache.cxf:cxf-core:jar:3.0.5:compile
                        [INFO] |  |  \- org.codehaus.woodstox:woodstox-core-asl:jar:4.2.0:compile
                        [INFO] |  |    \- org.codehaus.woodstox:stax2-api:jar:3.1.4:compile
                        [INFO] |  +- org.apache.cxf:cxf-rt-bindings-xml:jar:3.0.5:compile
                        [INFO] |  \- org.apache.cxf:cxf-rt-transports-http:jar:3.0.5:compile
                        [INFO] +- org.jboss.teiid.connectors:translator-salesforce-34:jar:9.0.0.Alpha1-SNAPSHOT:compile
                        [INFO] |  +- com.force.api:force-partner-api:jar:34.0.0:compile
                        [INFO] |  +- com.force.api:force-wsc:jar:34.0.0:compile
                        [INFO] |  |  \- org.antlr:ST4:jar:4.0.7:compile
                        [INFO] |  |    \- org.antlr:antlr-runtime:jar:3.4:compile
                        [INFO] |  |        \- antlr:antlr:jar:2.7.7:compile
                        [INFO] |  \- org.jboss.teiid.connectors:translator-salesforce:jar:9.0.0.Alpha1-SNAPSHOT:compile
                        

                         

                        So, is you can log a JIRA, I will fix it and push into next version of 8.13.2 and 9.0.Alpha1

                         

                        Ramesh..

                        • 25. Re: Certain fields not visible in Salesforce source model
                          pranavk

                          Yes that's what it was. Thanks Ramesh

                          1 2 Previous Next