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
appbuddyappbuddy 

Can't Hit Partner/Metadata API from GAE / WSC Problem with java.net.Proxy not supported

I am working to develop a Java application that hits the Salesforce Partner API and Metadata API from Google App Engine.  The java examples in the Partner API, the Metadata API documentation and links like this, http://wiki.developerforce.com/index.php/Force.com_for_Google_App_Engine_Setup_Guide_Java, advise to use WSC (the Force.com Web Services Connector).  It turns out that this is supposedly the only way you can generate Java proxy classes from the Partner and Metadata WSDLs because Google App Engine doesn't support classes from Apache Axis or JAX-RPC jars.

When I deploy my project to GAE and try to hit it, I get an error in GAE that says, "java.lang.NoClassDefFoundError: Could not initialize class com.google.apphosting.runtime.security.shared.stub.java.net.Proxy".  This is because java.net.Proxy is a restricted class for Google App Engine and references to it appear in the WSC library in the ConnectorConfig.class file.

I've also downloaded and added wsc-gae.jar and followed the code examples in this link, http://code.google.com/p/sfdc-wsc/wiki/WscFromGae, but no luck. (notice the comment at the bottom of this post where someone runs into the same problem.  I don't see how the wsc-gae.jar file will help because references to java.net.Proxy still appear in ConnectorConfig.java).

I am trying to do this all with wsc-22.jar.  I generated my metadata and partner jars from WSC version 22. I'm following code that is pretty much from the examples in the docs and that's not working. 

 

Any ideas?   Thanks!