NetXMS Support Forum

English Support => General Support => Topic started by: suphu on September 24, 2018, 04:55:46 PM

Title: nxshell - problem with session EventProcessingPolicy methods
Post by: suphu 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
Title: Re: nxshell - problem with session EventProcessingPolicy methods
Post by: Victor Kirhenshtein 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
Title: Re: nxshell - problem with session EventProcessingPolicy methods
Post by: suphu 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>
Title: Re: nxshell - problem with session EventProcessingPolicy methods
Post by: suphu 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.