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.(wsdlc.java:66)
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


VN:F [1.9.22_1171]
Rating: 9.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Error Compiling WSC AppEngine Partner Jar for Salesforce.com Sandbox, 9.0 out of 10 based on 1 rating

Categories: Code Sample, Google App Engine, Java, Salesforce

Leave a comment

Comments Feed3 Comments

  1. Integrate Chatter & Twitter on Google App Engine using OAuth | News of the technical world

    [...] 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 [...]

  2. Java Command Line App Using the Salesforce WSC | Jeff Douglas – Technology, Coding and Bears… OH MY!

    [...] 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 [...]

  3. Integrate Chatter & Twitter on Google App Engine using OAuth | Jeff Douglas - Technology, Coding and Bears... OH MY!

    [...] 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 [...]

Leave a comment

Feed

http://blog.jeffdouglas.com / Error Compiling WSC AppEngine Partner Jar for Salesforce.com Sandbox