Error Compiling WSC AppEngine Partner Jar for Salesforce.com Sandbox
March 11th, 2010
I’m working on a demo for Google App Engine that connects to one of our Salesforce.com Sandboxes (hope to be done tomorrow or Monday). The Force.com Web Service Connector (WSC) project has a partner-library.jar that you can download and add to your project to get up and running quickly. However, if you want to connect to a Sandbox you have to download your Partner WSDL from your Sandbox and compile it with the wsc-gae-160.jar to generate the stub code.
To generate the stub code, run the following from the terminal:
java -classpath wsc.jar com.sforce.ws.tools.wsdlc wsdl jar.file
Where wsdl is the name of the partner WSDL file you downloaded and jar.file is the output jar file that is generated.
The problem is that seems to throw an exception on a Mac:
Exception in thread "main" java.lang.NullPointerException
at com.sforce.ws.tools.wsdlc.checkTargetFile(wsdlc.java:115)
at com.sforce.ws.tools.wsdlc.
at com.sforce.ws.tools.wsdlc.run(wsdlc.java:288)
at com.sforce.ws.tools.wsdlc.main(wsdlc.java:279)
The fix is documented here but you essentially need to supply the entire path for the outputted jar file:
java -classpath wsc-gae-16_0.jar com.sforce.ws.tools.wsdlc chatter-sandbox-partner.wsdl /users/jeff/desktop/chatter-sandbox-partner.jar
Categories: Code Sample, Google App Engine, Java, Salesforce













[...] Jars from the WSC project. I used Chatter on one of our sandboxes so I had to do a little tweaking to get the Partner jar running. Now create a new Web Application Project for App Engine and then [...]
[...] file on your desktop. If you are using a Sandbox instead of a Developer or Production org, here are instructions for running wsdlc as there are a few issues. Your console should look similar [...]
[...] Jars from the WSC project. I used Chatter on one of our sandboxes so I had to do a little tweaking to get the Partner jar running. Now create a new Web Application Project for App Engine and then [...]