Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-12963

camel-salesforce-maven-plugin generates code that does not compile

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.22.2
    • Fix Version/s: 2.24.0, 2.23.3, 2.22.5, 3.0.0
    • Component/s: camel-salesforce
    • Labels:
      None
    • Environment:

      windows 10 64bit Pro

      Java 10 same with Java 8 

       

      Description

      when running pom.xml with

      <plugin>
          <groupId>org.apache.camel.maven</groupId>
          <artifactId>camel-salesforce-maven-plugin</artifactId>
          <version>2.22.2</version>
          <executions>
              <execution>
                  <id>camel-sforce</id>
                  <phase>generate-sources</phase>
                  <goals>
                      <goal>generate</goal>
                  </goals>
              </execution>
          </executions>
          <configuration>
              <outputDirectory>${project.basedir}/src/main/java</outputDirectory>
              <version>44.0</version>
              <clientId>${my.clientId}</clientId>
              <clientSecret>${my.clientSecret}</clientSecret>
              <userName>${my.username}</userName>
              <password>${my.password}</password>
              <loginUrl>${my.loginUrl}</loginUrl>
              <packageName>com.my.entities4camel</packageName>
              <includes>
                  <include>Task</include>
              </includes>
          </configuration>
      </plugin>
      

      the generated code does not compile because of the code like

      private Account_Lookup What;
      
          @JsonProperty("What")
          public Account_Lookup getWhat() {
              return this.What;
          }
      
          @JsonProperty("What")
          public void setWhat(Account_Lookup What) {
              this.What = What;
          }
          private rtms__CarrierPayment__c_Lookup What;
      
          @JsonProperty("What")
          public rtms__CarrierPayment__c_Lookup getWhat() {
              return this.What;
          }
      
          @JsonProperty("What")
          public void setWhat(rtms__CarrierPayment__c_Lookup What) {
              this.What = What;
          }
      

       

      it seems that any field that has Salesforce "polymorphism" (able to reference any type of Entity) causes the issue.

      Task just simplest example.

      Another thing that might be important: I run on top of an installed package the fields with prefix rtms__ are from the managed package.

        Attachments

          Activity

            People

            • Assignee:
              zregvart Zoran Regvart
              Reporter:
              boris.daich Boris Daich
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 40m
                40m