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
NikkiNikki 

3.0 API binding failure

The following code snippet (pulled directly from the Salesforce 3.0 API samples) fails with the following message: Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission org.apache.commons.discovery.log.level read)

private SoapBindingStub binding;
try
{
binding = (SoapBindingStub) new SforceServiceLocator().getSoap();
}
catch (ServiceException jre)
{
//This is a rare error indeed since as of this point, we have not
//tried to communicate with the web service
if (jre.getLinkedCause() != null)
jre.getLinkedCause().printStackTrace();

throw new RuntimeException(jre.getMessage());
}

I have no idea how to fix this, because I haven't even tried to authenticate at this point. Any suggestions?

Thanks in advance,
Nikki
adamgadamg
My guess is that your JRE isn't authorized to dynamically load classes, which is typically the case with applets - are you running as an applet or java application?
NikkiNikki
It is a java application.
adamgadamg
Are you able to run the pre-packaged JAR/application from the java getting started package?
NikkiNikki
No, I get the same exception from this line:
binding = (SoapBindingStub) new SforceServiceLocator().getSoap();
NikkiNikki
I got it, I was running inside a security manager. Thanks for the help.