Sunday, June 4, 2023

Null Pointer at com.sforce.ws.codegen.Compiler.(Compiler.java:48)

When compiling enterprise.wsdl with  force-wsc-58.0.0-uber.jar I was getting the following exception:


$ java -classpath force-wsc-58.0.0-uber.jar com.sforce.ws.tools.wsdlc enterprise-58-0.wsdl enterprise-58-0.0.jar

[WSC][wsdlc.main:72]Generating Java files from schema ...

[WSC][wsdlc.main:72]Generated 2724 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:137)

        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)


To resolve this issue, I pointed to Oracle JDK and that resolved the issue:

$ /c/jdk1-8-0_202/bin/java -classpath force-wsc-58.0.0-uber.jar com.sforce.ws.tools.wsdlc enterprise-58-0.wsdl enterprise-58-0.0.jar
[WSC][wsdlc.main:72]Generating Java files from schema ...
[WSC][wsdlc.main:72]Generated 2724 java files.
[WSC][wsdlc.main:72]Compiled 2728 java files.
[WSC][wsdlc.main:72]Generating jar file ... enterprise-58-0.0.jar
[WSC][wsdlc.main:72]Generated jar file enterprise-58-0.0.jar

Use SSH Keys to clone GIT Repository using SSH

  1. Generate a New SSH Key Pair bash ssh-keygen -t rsa -b 4096 -C "HSingh@MindTelligent.com" -t rsa specifies the type of key (...