NetXMS Support Forum

English Support => General Support => Topic started by: bikeprata on May 04, 2015, 09:52:47 PM

Title: NxShell Interaction Help - Strange error in script
Post by: bikeprata on May 04, 2015, 09:52:47 PM
Hello everyone!

I'm creating a script to populate nodes from my network, getting them from a ".csv" file. It's working pretty fine, but I can't use the method "setIpAdress()" from NXCObjectCreationData. In the method call bellow "cd" is a NXCObjectCreationData object and "objectIp" is a string with the IP formated such as in "192.168.2.1".

cd.setIpAddress(InetAddress.getByName(objectIp))

When I execute the script I get the following error:

QuoteTypeError: setIpAddress(): 1st arg can't be coerced to org.netxms.base.InetAddressEx

I couldn't find the class org.netxms.base.InetAddressEx on the API and it's stated on the NCXObjectCreationData reference that "setIpAdress()" should receive an InetAdress instance.

Could you guys help me on this?

Thanks in advance!

Edit: I'm using the 2.0.M4 version.