I am getting following exception message while connecting to the policy server.
"The exception is Exception connecting to the Server -- An error occured while performing this operation(error code bin: 1, hex: 0x1)"
Here is the piece of code I am using:
Properties apsProperty = new Properties();
apsProperty.setProperty(EDCFactory.USERNAME_PROPERTY_NAME,"administrator");
apsProperty.setProperty(EDCFactory.PASSWORD_PROPERTY_NAME,"password");
apsProperty.setProperty(EDCFactory.MODE_PROPERTY_NAME,"ejb");
try
{
EDCFactory apsSession = EDCFactory.connect(apsProperty);
PolicyManager apsPolicyManager = apsSession.getPolicyManager();
PolicySearchFilter sf = new PolicySearchFilter();
Policy [] allPolicies = apsPolicyManager.getPolicies(sf,10);
BufferedWriter out = new BufferedWriter(new FileWriter("C:\\Policy.txt"));
TreeMap policyMap = new TreeMap();
for (int i = 0; i < allPolicies.length; i++)
{
Policy policy = (Policy) allPolicies[i];
String policyName = policy.getName();
out.write(policyName);
policyMap.put("1", policyName);
}
out.close();
arguments.setObject("outPolicyMap", policyMap);
}
catch (IOException ex)
{
System.out.println("The exception is " +ex.getMessage());
}
catch (Exception ex)
{
System.out.println("The exception is " +ex.getMessage());
}
Is there a way to get around the issue?