n = reqdProviders.getLength();
//int providersLoaded = 0;
for (int i = 0; i < n; i++)
{
Provider provider;
Node reqdProvider = reqdProviders.item(i);
String providerName;
String providerClass;
int requestedPosition = 0;
if (Node.ELEMENT_NODE == reqdProvider.getNodeType())
{
Element prov = (Element) reqdProvider;
if (prov.hasAttribute("class"))
{
providerClass = prov.getAttribute("class");
}
else
{
log.warn("A provider element must, at the very least, have a class attribute: " + prov);
continue;
}
try
{
provider = (Provider) Class.forName(providerClass).newInstance();
}
catch (InstantiationException e1)
{
log.warn("Unable to instantiate an instance of the JCE Provider class " + providerClass, e1);
continue;
}
catch (IllegalAccessException e1)
{
log.warn("No permission to access the JCE Provider class " + providerClass, e1);
continue;
}
catch (ClassNotFoundException e1)
{
log.warn("Could not find the JCE Provider class " + providerClass, e1);
continue;
}
catch (ClassCastException e1)
{
log.warn("The Class " + providerClass + " is not a java.security.Provider");
continue;
}
providerName = provider.getName();
if (prov.hasAttribute("position"))
{
try
{