Exception in thread "main" com.prosysopc.ua.client.ConnectException: Failed to retrieve endpoints. The server is not available: opc.tcp://10.4.144.131:48010 ServiceResult=Bad_EncodingError (0x80060000) "Encoding halted because of invalid data in the objects being serialized."
at com.prosysopc.ua.client.UaClient.discoverEndpoints(Unknown Source)
at com.prosysopc.ua.client.UaClient.k(Unknown Source)
at com.prosysopc.ua.client.UaClient.p(Unknown Source)
at com.prosysopc.ua.client.UaClient.connect(Unknown Source)
at com.schott.indit.test.OpcUaClient.main(OpcUaClient.java:21)
Caused by: org.opcfoundation.ua.common.ServiceResultException: Bad_EncodingError (0x80060000) "Encoding halted because of invalid data in the objects being serialized."
at org.opcfoundation.ua.transport.tcp.io.TcpConnection$ReadThread.run(Unknown Source)
I tried it with diffrent versions of the OPC UA SDK up to 2.1.0-436 (Evaluation), JRE7 and JRE8.
But it is possible to connect to the IBH OPC server using your tool UaExpert (I use very old version 1.01.329.0.175)
There is not much information so it is hard to say. It probably does not matter, but it would be nice to know what the Misc.cre... method does. Anyway that error indicates that something could not be encoded into binary before sending it. It could happen on either side of the communication.
Options:
- Turn stack logging to DEBUG or TRACE level
- Check server logs
- Check with wireshark that is the error on responses (if the error is on client side then most likely the request is not even sent)
xception in thread "main" com.prosysopc.ua.client.ConnectException: Failed to retrieve endpoints. The server is not available: opc.tcp://10.4.144.131:48010 ServiceResult=Bad_EncodingError (0x80060000) "Encoding halted because of invalid data in the objects being serialized."
at com.prosysopc.ua.client.UaClient.discoverEndpoints(Unknown Source)
at com.prosysopc.ua.client.UaClient.k(Unknown Source)
at com.prosysopc.ua.client.UaClient.p(Unknown Source)
at com.prosysopc.ua.client.UaClient.connect(Unknown Source)
at com.schott.indit.test.OpcUaClient.main(OpcUaClient.java:35)
Caused by: org.opcfoundation.ua.common.ServiceResultException: Bad_EncodingError (0x80060000) "Encoding halted because of invalid data in the objects being serialized."
at org.opcfoundation.ua.transport.tcp.io.TcpConnection$ReadThread.run(Unknown Source)