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
Custom CallCustom Call 

Unable to generate jar from partner WSDL

Hello,

When trying to generate jar from Partner wsdl - Version 54.0
I see Null Pointer Exception, I beleive from force-wsc-54.0.0

I am using following jars

  1. force-wsc-54.0.0
  2. ST-4.3.1
  3. rhino-1.7.14
  4. antlr-runtime-3.5.2
  5. tools.jar from jdk1.8.0_181

Moved all the jars to one folder and tried the following from command prompt. 

java -classpath tools.jar;force-wsc-54.0.0.jar;ST-4.3.1.jar;rhino-1.7.14.jar;antlr-runtime-3.5.2.jar com.sforce.ws.tools.wsdlc partner.wsdl sf-partner.jar
Output from command prompt
 
[WSC][wsdlc.main:72]Generating Java files from schema ...
[WSC][wsdlc.main:72]Generated 701 java files.
Exception in thread "main" java.lang.NullPointerException
        at com.sforce.ws.codegen.Compiler.<init>(Compiler.java:48)
        at com.sforce.ws.codegen.Generator.compileTypes(Generator.java:136)
        at com.sforce.ws.tools.wsdlc.run(wsdlc.java:129)
        at com.sforce.ws.tools.wsdlc.run(wsdlc.java:163)
        at com.sforce.ws.tools.wsdlc.main(wsdlc.java:72)

Thank you. 
 

 

Custom CallCustom Call
Solved this.
PATH variable was pointing to Oracle\Java\javapath causing Line 48 of Cmpiler.java from com.sforce.ws.codegen ToolProvider.getSystemJavaCompiler() to return null.
Removed that and added Java path C:\Program Files\Java\jdk1.8.0_181\bin solved it. 
partner.jar created successfully.