0

I have generate Enterprise WSDL file and downloaded to my local machine. Now I'm trying to generate the jar file with following command.

java -classpath .\..\..\..\..\..\.m2\repository\com\force\api\force-wsc\50.0.0\force-wsc-50.0.0.jar;.\..\..\..\..\..\.m2\repository\org\antlr\ST4\4.3\ST4-4.3.jar;.\..\..\..\..\..\.m2\repository\org\antlr\antlr-runtime\3.5.2\antlr-runtime-3.5.2.jar com.sforce.ws.tools.wsdlc enterprise.wsdl enterprise.jar

Following is the output from above command.

[WSC][wsdlc.main:72]Generating Java files from schema ...
[WSC][wsdlc.main:72]Generated 1270 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)

I noticed that some people has got exactly the same error. But I was unable to find a solution from those forums.

This may be a simple issue, but couldn't figure out the error using my mind.

1

My JAVA_HOME was set to an oracle version. when I corrected it, the error disappeared and jar files were generated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.