NetXMS Support Forum

Please login or register.

Login with username, password and session length

Author Topic: nxshell - problem with session EventProcessingPolicy methods  (Read 453 times)

suphu

  • Newbie
  • *
  • Posts: 22
    • View Profile
nxshell - problem with session EventProcessingPolicy methods
« on: September 24, 2018, 04:55:46 pm »

Hi, I am coding in python using nxshell 2.2.8 and having problems retrieving Event Processing Policies

    epp = session.getEventProcessingPolicy()
        at java.util.Objects.requireNonNull(Objects.java:203)
        at java.util.Arrays$ArrayList.<init>(Arrays.java:3813)
        at java.util.Arrays.asList(Arrays.java:3800)
        at org.netxms.client.events.EventProcessingPolicyRule.<init>(EventProcessingPolicyRule.java:135)
        at org.netxms.client.NXCSession.getEventProcessingPolicyInternal(NXCSession.java:5897)
        at org.netxms.client.NXCSession.getEventProcessingPolicy(NXCSession.java:5912)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
java.lang.NullPointerException: java.lang.NullPointerException

    epp = session.openEventProcessingPolicy()
        at java.util.Objects.requireNonNull(Objects.java:203)
        at java.util.Arrays$ArrayList.<init>(Arrays.java:3813)
        at java.util.Arrays.asList(Arrays.java:3800)
        at org.netxms.client.events.EventProcessingPolicyRule.<init>(EventProcessingPolicyRule.java:135)
        at org.netxms.client.NXCSession.getEventProcessingPolicyInternal(NXCSession.java:5897)
        at org.netxms.client.NXCSession.openEventProcessingPolicy(NXCSession.java:5926)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
java.lang.NullPointerException: java.lang.NullPointerException
« Last Edit: September 24, 2018, 05:11:23 pm by suphu »
Logged

Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 6408
    • View Profile
Re: nxshell - problem with session EventProcessingPolicy methods
« Reply #1 on: September 24, 2018, 09:07:14 pm »

Hi,

I cannot reproduce this issue. Could be packaging error. How do you run nxshell and what package you are using?

Best regards,
Victor
Logged

suphu

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: nxshell - problem with session EventProcessingPolicy methods
« Reply #2 on: September 24, 2018, 09:20:14 pm »

From Windows 2016 Server where I have NetXMS installed.
C:\NetXMS\bin\nxshell.exe -u <myUserName> -P <myPassword>
Logged

suphu

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: nxshell - problem with session EventProcessingPolicy methods
« Reply #3 on: September 27, 2018, 01:23:30 pm »

Found the problem. 
I downloaded nxshell-2.2.8.jar and replaced C:\NetXMS\lib\nxshell.jar
Works Great!
Thanks.
Logged