Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
EvgenyAU
Explorer

Java errors while running web_api_show_package

Hello all,

 

I am trying to run remotely Policy Visualization api from my Win10 station to export policies from MDM R80.30 to HTML.

 

Using the latest jar version from Github, receiving Java errors:

Exception in thread "main" java.lang.NullPointerException
at com.checkpoint.mgmt_api.objects.PolicyPackage.toJson(PolicyPackage.java:79)
at com.checkpoint.mgmt_api.objects.IndexView.toJson(IndexView.java:64)
at com.checkpoint.mgmt_api.examples.ShowPackageTool.buildIndexHtmlPage(ShowPackageTool.java:1606)
at com.checkpoint.mgmt_api.examples.ShowPackageTool.main(ShowPackageTool.java:184)

 

I tried both Oracle and 3d party Java with no luck.

 

Please advise.

Evgeny

0 Kudos
6 Replies
PhoneBoy
Admin
Admin

Why not run this directly from the management server?

0 Kudos
EvgenyAU
Explorer

Because we don't have access to it. It is a big company with some strict and weird policies.

 

0 Kudos
PhoneBoy
Admin
Admin

Did you follow the build instructions in the GitHub?
It has a few dependencies (including a specific library of ours).
Also tagging @chkp-royl 

0 Kudos
EvgenyAU
Explorer

No, I am using ready-to-use jar artifact mentioned in README. Do you reckon it makes any difference?

0 Kudos
chkp-royl
Employee
Employee

Hi Evgeny,

This exception may happen if the policy package doesn't have NAT layer. If so, try to execute tool again with parameter --show-nat-policy false

We will fix that issue in the next version of the tool.

 

Thanks,

Roy

0 Kudos
EvgenyAU
Explorer

It does have NAT layer.

But I managed to create tarball by running it remotely on MDM server rather than on CMA using the full command:

java -jar web_api_show_package-jar-with-dependencies.jar -c -m ADDRESS -d DOMAIN_NAME -k POLICY_NAME --show-threat-policy false

 

Thanks for your help.

 

0 Kudos