nxshell - problem with session EventProcessingPolicy methods

Started by suphu, September 24, 2018, 04:55:46 PM

Previous topic - Next topic

suphu

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

Victor Kirhenshtein

Hi,

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

Best regards,
Victor

suphu

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

suphu

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