Bacnet Client Exception
I am developing bacnet client application. But sometimes the exception throw
java.lang.NullPointerException at com.serotonin.bacnet4j.type.Encodable.writeEncodable(Encodable.java:270) at com.serotonin.bacnet4j.service.acknowledgement.ReadPropertyAck.write(ReadPropertyAck.java:79) at com.serotonin.bacnet4j.npdu.ip.IpMessageControl.sendResponse(IpMessageControl.java:239) at com.serotonin.bacnet4j.npdu.ip.IpMessageControl.access$300(IpMessageControl.java:74) at com.serotonin.bacnet4j.npdu.ip.IpMessageControl$IncomingMessageExecutor.runImpl(IpMessageControl.java:538) at com.serotonin.bacnet4j.npdu.ip.IpMessageControl$IncomingMessageExecutor.run(IpMessageControl.java:456) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
But client is working. What is the message mean? How can ? correct it?
The property value that is being written in the response is null. I have a fix that will convert it to a BACnet Null object, but i need to confirm that this is the correct thing to do.
Thank you.What is the plan to fix this problem.
Is the problem serious for bacnet client application?
You are the first to report it. Do you have details on the ReadProperty request that is being made? In particular, do you know the property that is being requested?
The problem appears to be that a request is being made for a property whose value is null. It seems that the correct response to this situation is for an "unknown property" error to be returned to requestor. If you want to prevent the error response, make sure there is a non-null value for the property.
I've checking in the code updates as well as a new build of the jar file.
I think bacnet server application query property that not defined on client side. Is it possible.
If It is this like how can I realize this properties?
Set non-null values for the properties.
But I don't know which properties. Which properties query from server side
By The way sometimes this exception throws
com.serotonin.bacnet4j.npdu.ip.IpMessageControl$MessageValidationAssertionException: Network messages are not supported
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I don't know which properties the server is asking for either.
Another post explains that exception (which is really just a warning).
the serotonin stack does not 'yet' support network messages: (ipmessagecontrol.java)
// Network layer protocol control information. See 6.2.2
NPCI npci = new NPCI(queue);
if (npci.getVersion() != 1)
throw new MessageValidationAssertionException("Invalid protocol version: " + npci.getVersion());
return; // silently
// throw new MessageValidationAssertionException("Network messages are not supported");
we have tons of networkmessages, so i tried to hide this.
if you use the add or removelistelementrequest and you see this message more often. then i know your code is buggy ;-)
I've implemented the silent ignoring of network messages. But i don't understand your last statement. I thought the list element stuff was fixed. What does it have to do with network messages?
when adding a bacnet device into the recipientlist of the device to be monitored it will try to locate the 'remote' listener.
in case the bacnet network is the same it send a whois to 'that' device. when the bacnet network is different, then it searches for the router with a who-is-router-to-network.
you remember that the getAddress used the bacnet port as network? in this case the device to be monitored isses frequently a who-is-router-to-network with parameter destination-network equal to 47808.
in the beginning i din't understand that why until i verified the getAddress function.
Right. So this is fixed now, correct?
:-) absolutely - i am happy it works.