Skip to content

importPolicy Issue #1

Description

@kholbrook1303

When running importPolicy from OpenDXL EPO Client, I am returned with:
Error: Response failed with error code 0. Message: java.lang.reflect.InvocationTargetException (0)

BTW - This works fine with the web/python EPO API.

I get this when setting the "file" parameter as any of the following:

  1. file:/// (As per documentation)
  2. @ (As per Web API documentation)

This is correlated back to ePolicy Orchestrator Orion.log as either of the 3 (I have tried all 3 hoping it was a path syntax error):
Caused by: java.lang.IllegalArgumentException: file not found 'file:////home/policy/Policy.xml'. It should be a fully qualified name.
at com.mcafee.epo.policy.ui.command.ImportPoliciesCommand.setFile(ImportPoliciesCommand.java:202)
... 49 more
Caused by: java.lang.IllegalArgumentException: file not found 'file:///home/policy/Policy.xml'. It should be a fully qualified name.
at com.mcafee.epo.policy.ui.command.ImportPoliciesCommand.setFile(ImportPoliciesCommand.java:202)
... 49 more
Caused by: java.lang.IllegalArgumentException: file not found '@/home/policy/Policy.xml'. It should be a fully qualified name.
at com.mcafee.epo.policy.ui.command.ImportPoliciesCommand.setFile(ImportPoliciesCommand.java:202)
... 49 more

I am absolutely certain this path is correct from the client machine interacting with DXL. Do note this is coming from linux so not sure if that has any play in the problem or not.

I have also tried loading the XML and passing the buffer but no dice.... please advise.

res = epo_client.run_command("policy.importPolicy", {"file": kwargs['policy'], "force": "true"}, output_format=OutputFormat.JSON)

kwargs['policy'] = 'file:////home/policy/Policy.xml'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions