function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
satyaprakash palsatyaprakash pal 

JAVA Bulk API

I am going to use JAVA Bulk API to pull the data from SFDC table.
for that I am trying to convert  partner.wsdl to partner.jar file, for this

A)

B) Getting error while running "mvn clean package" command.

D:\JAVA_BULK_API\wsc-master>mvn clean package
Picked up _JAVA_OPTIONS: -Xmx2048M
[INFO] Scanning for projects...
Downloading: https://repo.maven.apache.org/maven2/org/sonatype/oss/oss-parent/7/oss-parent-7.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.force.api:force-wsc:38.0.4: Could not transfer artifact org.sonatype.oss:oss-parent:pom:7 from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target and 'parent.relativePath' points at wrong local POM @ line 3, column 11
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project com.force.api:force-wsc:38.0.4 (D:\JAVA_BULK_API\wsc-master\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for com.force.api:force-wsc:38.0.4: Could not transfer artifact org.sonatype.oss:oss-parent:pom:7 from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target and 'parent.relativePath' points at wrong local POM @ line 3, column 11 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

D:\JAVA_BULK_API\wsc-master>

Note:
POM File:

<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.force.api</groupId>
  <artifactId>force-wsc</artifactId>
  <packaging>jar</packaging>
  <version>38.0.4</version>
  <name>force-wsc</name>
  <description>Force.com Web Service Connector</description>
  <url>http://www.force.com</url>
  <licenses>
    <license>
      <name>BSD License (FreeBSD)</name>
      <url>LICENSE.md</url>
      <distribution>repo</distribution>
      <comments>A business-friendly OSS license</comments>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:git://github.com/forcedotcom/wsc.git</connection>
    <developerConnection>scm:git:git://github.com/forcedotcom/wsc.git</developerConnection>
    <url>git@github.com/forcedotcom/wsc</url>
  </scm>
  <developers>
    <!-- see mailing list -->
  </developers>
  <mailingLists>
    <mailingList>
      <name>Database.com SDK for Java Issues</name>
      <archive>https://github.com/forcedotcom/java-sdk/issues?state=closed</archive>
      <subscribe>https://github.com/forcedotcom/java-sdk/toggle_watch</subscribe>
      <unsubscribe>https://github.com/forcedotcom/java-sdk/toggle_watch</unsubscribe>
      <post>https://github.com/forcedotcom/java-sdk/issues/new</post>
    </mailingList>
  </mailingLists>
  <dependencies>
    <dependency>
      <groupId>org.antlr</groupId>
      <artifactId>ST4</artifactId>
      <version>4.0.7</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.8.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.appengine</groupId>
      <artifactId>appengine-api-1.0-sdk</artifactId>
      <version>1.7.3</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.codehaus.jackson</groupId>
      <artifactId>jackson-core-asl</artifactId>
      <version>1.9.13</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.jackson</groupId>
      <artifactId>jackson-mapper-asl</artifactId>
      <version>1.9.13</version>
    </dependency>
    <dependency>
      <groupId>commons-beanutils</groupId>
      <artifactId>commons-beanutils</artifactId>
      <version>1.7.0</version>
    </dependency>
  </dependencies>
  <profiles>
    <profile>
      <id>doclint-java8-disable</id>
      <activation>
        <jdk>[1.8,)</jdk>
      </activation>
      <properties>
        <javadoc.opts>-Xdoclint:none</javadoc.opts>
      </properties>
    </profile>
  </profiles>
  <build>
    <resources>
      <resource>
        <filtering>false</filtering>
        <directory>${basedir}</directory>
        <includes>
          <include>LICENSE.md</include>
        </includes>
      </resource>
      <resource>
        <filtering>false</filtering>
        <directory>${basedir}/src/main/java</directory>
        <includes>
          <include>**</include>
        </includes>
        <excludes>
          <exclude>**/*.java</exclude>
        </excludes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>2.0</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <relocations>
                <!-- repackage antlr to prevent namespace collision on classpath in core app -->
                <relocation>
                  <pattern>org.antlr</pattern>
                  <shadedPattern>com.sforce.ws.shade.org.antlr</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>antlr</pattern>
                  <shadedPattern>com.sforce.ws.shade.antlr</shadedPattern>
                </relocation>
                <!-- repackage string template to prevent namespace collision on classpath in core app -->
                <relocation>
                  <pattern>org.stringtemplate</pattern>
                  <shadedPattern>com.sforce.ws.shade.org.stringtemplate</shadedPattern>
             </relocation>
                <!-- jackson is also in core, prevent namespace collission -->
                <relocation>
                  <pattern>org.codehaus.jackson</pattern>
                  <shadedPattern>com.sforce.ws.shade.org.codehaus.jackson</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.commons</pattern>
                  <shadedPattern>com.sforce.ws.shade.org.apache.commons</shadedPattern>
                </relocation>
              </relocations>
              <createDependencyReducedPom>false</createDependencyReducedPom>
              <shadedArtifactAttached>true</shadedArtifactAttached>
              <shadedClassifierName>uber</shadedClassifierName>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.4.3</version>
        <configuration>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.3.1</version>
        <configuration>
          <includes>
            <include>**</include>
          </includes>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.1.2</version>
        <executions>
          <execution>
            <id>attach-source</id>
            <phase>package</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.7</version>
        <configuration>
          <additionalparam>${javadoc.opts}</additionalparam>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadoc</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    
   <plugin>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>1.2</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>package</phase>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
 
      <plugin>
        <groupId>com.mycila.maven-license-plugin</groupId>
        <artifactId>maven-license-plugin</artifactId>
        <version>1.8.0</version>
        <configuration>
          <header>license.txt</header>
          <excludes>
            <exclude>src/test/resources/codegeneration/*.java</exclude>
          </excludes>
          <includes>
            <include>**/*.java</include>
          </includes>
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
     </plugin>
  <plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-surefire-plugin</artifactId>
   <version>2.7.1</version>
   <configuration>
    <forkMode>always</forkMode>
                <useManifestOnlyJar>false</useManifestOnlyJar>
   </configuration>
  </plugin>
    </plugins>
  </build>
</project>













B )

I am runing below command but it is giving error:
"Error: Could not find or load main class com.sforce.ws.tools.wsdlc"

C:\Users\satpal>java -classpath D:\JAVA_BULK_API\force-wsc-38.0.0.jar:js-1.7R2.jar.jar:ST4-4.0.7.jar:antlr-runtime-3.5.2.jar com.sforce.ws.tools.wsdlc D:\JAVA_BULK_API\partner.wsdl .\partner.jar

Picked up _JAVA_OPTIONS: -Xmx1024M
Error: Could not find or load main class com.sforce.ws.tools.wsdlc

Note:
1) I downloaded following jar file:
        force-wsc-38.0.0.jar;
        js-1.7R2.jar.jar;
        ST4-4.0.7.jar;
        antlr-runtime-3.5.2.jar;