1 2 Previous Next 25 Replies Latest reply on Feb 19, 2016 1:40 AM by Pranav K

    Certain fields not visible in Salesforce source model

    Pranav K Novice

      Hi,

       

      I had created a source model atop a Salesforce connection, I noticed that I am not able to see some of the fields that Salesforce exposes corresponding to D&B company (for eg DunsNumber). On exploring more I found out that they are supported in a later API version than the one that currently sits in Teiid i.e. v22.

       

      I believe that the Teiid version should be upgraded to the latest one or one of the later version (to support for possibly many shortfalls); as v22 is way too off and old from the current v35.

      I realize that this might cause some backward compatibility issues as mentioned in TEIID-3192, but should this still be blocking for a long pending upgrade / shouldnt there be any easy way round this?

       

      Thanks,

      Pranav

        • 1. Re: Certain fields not visible in Salesforce source model
          Steven Hawkins Master

          > I believe that the Teiid version should be upgraded to the latest one or one of the later version (to support for possibly many shortfalls); as v22 is way too off and old from the current v35.

           

          See [TEIID-3492] Provide a mechanism for users to modify the salesforce api version - JBoss Issue Tracker

           

          For convenience we may end up including an additional kitting of the latest api version, but that is not in 8.12 yet.

           

          > I realize that this might cause some backward compatibility issues as mentioned in TEIID-3192, but should this still be blocking for a long pending upgrade / shouldnt there be any easy way round this?


          At least up to version 34 the jars are compatible, so the workaround is to update the kitted saleforce module with newer jars / modify the module.xml.  You would also update the url to the newer api version when configuring the connection pool.  The downside, which may not be an issue for you, is that then you won't have the v22 connectivity.

          • 2. Re: Certain fields not visible in Salesforce source model
            Pranav K Novice

            Thanks Steven,

             

            I am using Teiid Embedded, so I would be using the newer API-jars with that.

            I tried using the utility developed for building connector-translator to build with v34. It is however not building properly using maven 3 that I have, I'm getting incremental build errors due to invalid artifacts being downloaded from the repositories.

            I am using the maven settings.xml conf file provided at teiid/teiid · GitHub

            Following is one such error I receive at the beginning of the build process, I was however able to bypass this particular one by editing the downloaded parent artifact(pom file) to point to other available versions of artifact. But such errors keep showing up rendering this well-intentioned utilility as not particularly usable.

             

            org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:

            [WARNING] Malformed POM C:\maven\apache-maven-3.0.3\repository\org\jboss\integration-platform\jboss-integration-platform-parent\6.0.0.CR25\jboss-integration-platform-parent-6.0.0.CR25.pom: Expected root element 'project' but found 'html' (position: START_TAG seen <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">\n<html>... @2:7)  @ C:\maven\apache-maven-3.0.3\repository\org\jboss\integration-plat

            form\jboss-integration-platform-parent\6.0.0.CR25\jboss-integration-platform-parent-6.0.0.CR25.pom, line 2, column 7

            [FATAL] 'groupId' is missing. @ [unknown-group-id]:[unknown-artifact-id]:[unknown-version], C:\maven\apache-maven-3.0.3\repository\org\jboss\integration-platform\jboss-integration-platform-parent\6.0.0.CR25\jboss-integration-platform-parent-6.0.0.CR25.pom, line 2, column 7

            [FATAL] 'artifactId' is missing. @ [unknown-group-id]:[unknown-artifact-id]:[unknown-version], C:\maven\apache-maven-3.0.3\repository\org\jboss\integration-platform\jboss-integration-platform-parent\6.0.0.CR25\jboss-integration-platform-parent-6.0.0.CR25.pom, line 2, column 7

            [FATAL] 'version' is missing. @ [unknown-group-id]:[unknown-artifact-id]:[unknown-version], C:\maven\apache-maven-3.0.3\repository\org\jboss\integration-platform\jboss-integration-platform-parent\6.0.0.CR25\jboss-integration-platform-parent-6.0.0.CR25.pom, line 2, column 7

             

             

                    at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:339)

                    at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:632)

                    at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:581)

                    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:233)

                    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)

                    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)

                    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)

                    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)

                    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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)

                    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)

                    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)

                    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

             

            Pranav

            • 3. Re: Certain fields not visible in Salesforce source model
              Steven Hawkins Master

              > I am using Teiid Embedded, so I would be using the newer API-jars with that.

               

              With embedded it's sufficient to just update the salesforce jars.  Just use the corresponding api version in the connection url.

               

              > Following is one such error I receive at the beginning of the build process, I was however able to bypass this particular one by editing the downloaded parent artifact(pom file) to point to other available versions of artifact. But such errors keep showing up rendering this well-intentioned utilility as not particularly usable.

               

              That's not an issue with the utlity.  It looks like either the repository is having issues or the EAP folks have moved some artifacts.  Either way that is not expected.  We'll double check what is going on.

              • 4. Re: Certain fields not visible in Salesforce source model
                Steven Hawkins Master

                I'm able to get the parent pom without issue now.  Are you still seeing the same issue after removing the local repository copy?

                • 5. Re: Certain fields not visible in Salesforce source model
                  Pranav K Novice

                  Thanks Steve,

                   

                  Hi Steve,

                   

                  I was able to proceed further in building the utility by deleting the invalid artifacts, but after a while it failed again giving me enforcer error, I bypassed that for the meantime with '-Denforcer.skip=true'and it failed at the following point:

                   

                  [ERROR] Failed to execute goal on project translator-salesforce-34: Could not resolve dependencies for project org.jboss.teiid.connectors.salesforce-34:translator-salesforce-34:bundle:1.0-SNAPSHOT: The following artifacts could not be resolved: org.jboss.teiid:teiid-api:jar:8.12.0.Alpha2-SNAPSHOT, org.jboss.teiid:teiid-common-core:jar:8.12.0.Alpha2-SNAPSHOT, org.jboss.teiid.connectors:translator-s

                  alesforce:jar:8.12.0.Alpha2-SNAPSHOT: Could not find artifact org.jboss.teiid:teiid-api:jar:8.12.0.Alpha2-SNAPSHOT in jboss-developer-repository-group (http://repository.jboss.org/nexus/content/groups/developer/) -> [Help 1]

                   

                  However, my scenario involving the Salesforce connector usage in Embedded, I was able to proceed and solve my issue of missing fields by excluding v22 and providing v34.

                   

                  Pranav

                  • 6. Re: Certain fields not visible in Salesforce source model
                    Steven Hawkins Master

                    > I was able to proceed further in building the utility by deleting the invalid artifacts, but after a while it failed again giving me enforcer error, I bypassed that for the meantime with '-Denforcer.skip=true'and it failed at the following point:

                     

                    Seems like you are hitting another repository issue.  I'll have to look into why that seems unresolvable, or if it's another temporary issue.

                     

                    > However, my scenario involving the Salesforce connector usage in Embedded, I was able to proceed and solve my issue of missing fields by excluding v22 and providing v34.

                     

                    Yes, that is sufficient for embedded, when you only want a single version of connectivity.  Generating a new translator/resource adapter is suited more for EAP usage.

                    • 7. Re: Certain fields not visible in Salesforce source model
                      Steven Hawkins Master

                      For eap usage we've captured: https://issues.jboss.org/browse/TEIID-3727

                       

                      For embedded we'll make it clearer in the documentation how to change the salesforce version or simply omit kitting the v22 jars.

                      • 8. Re: Certain fields not visible in Salesforce source model
                        Pranav K Novice

                        Thanks for the clarification/resolution Steve and Ramesh.

                        • 9. Re: Certain fields not visible in Salesforce source model
                          Pranav K Novice

                          Hi Steve/Ramesh,

                           

                          I was trying out the new -34 kit that you have uploaded as a separate translator/connector project. I noticed that the older salesforce translator classes were available (as transitive dependencies), but on the same lines, none of the old connector classes (SalesforceConnectionImpl etc) were available anymore, this old connector project wasnt getting available as part of the new connectors dependency.

                          I also tried on another machine for a quick verification and had the same observation, so just thought of putting this up

                           

                          Pranav

                          • 10. Re: Certain fields not visible in Salesforce source model
                            Steven Hawkins Master

                            > I also tried on another machine for a quick verification and had the same observation, so just thought of putting this up

                             

                            I don't quite understand what issue you are seeing.  The new 34 translator module directly includes the older translator jar and depends upon the 34 salesforce api, which it exports.  The new 34 connector module is essentially the same as the old one, using the same jar, and depends upon the new 34 translator. 

                            • 11. Re: Certain fields not visible in Salesforce source model
                              Pranav K Novice

                              Thanks Steve,

                               

                              I had already understood by looking at the poms what you are trying to explain. But I didnt notice this expected behavior for the case of connectors (usage of the old connector jar after unpacking it). I just replaced the <artifactId>connector-salesforce</artifactId> with <artifactId>connector-salesforce-34</artifactId> and expected my calling code to function as it is (looking at the poms). The classes in the translator project were getting available as expected but all the connector classes began to show "red" on my IDE.

                              The pom dependency analyzer listed the old translator as a dependency but not the old connector, due to which its classes were not available.

                              Capture.PNG

                              • 12. Re: Certain fields not visible in Salesforce source model
                                Steven Hawkins Master

                                Now I see what you are saying.  This isn't a kitting issue, but an issue with using the poms.  The 34 connector has a rar dependency on the base connector project.  What IDE are you using?  It may have an issue with resolving a rar dependency.

                                • 13. Re: Certain fields not visible in Salesforce source model
                                  Pranav K Novice

                                  Yeah, I see the rar dependency, but I dont think it's an IDE related issue. I'm not even able to build the project using maven (assuming it was only the IDE which was causing the issue).

                                  I'm using Intellij IDEA 14.1.

                                  • 14. Re: Certain fields not visible in Salesforce source model
                                    Steven Hawkins Master

                                    > I'm not even able to build the project using maven (assuming it was only the IDE which was causing the issue)

                                     

                                    I don't think that you'll be able to have just a dependency on the 34 connector - as it has the rar dependency is marked as provided.  The workaround would be best to add a dependency to the base connector as well.

                                    1 2 Previous Next