You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@plc4x.apache.org by "Alessandro Rossignoli (Jira)" <ji...@apache.org> on 2020/05/28 08:53:00 UTC
[jira] [Commented] (PLC4X-200) OPC-UA Driver not connecting if
params string is not provided
[ https://issues.apache.org/jira/browse/PLC4X-200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17118465#comment-17118465 ]
Alessandro Rossignoli commented on PLC4X-200:
---------------------------------------------
Looks like the regex expression is able to get the params String = "" if there is a trailing "/" on the address.
So basically:
* this *is working* opcua:tcp://localhost:4840/
* this *{color:#FF0000}is not working{color}* {color:#172b4d}opcua:tcp://localhost:4840{color}
{color:#172b4d}I think that for trivial cases we could apply a simple fix that could be:{color}
* {color:#172b4d}appending the trailing "/" if missing{color}
* {color:#172b4d}check and ignore the null value for the params{color}
> OPC-UA Driver not connecting if params string is not provided
> -------------------------------------------------------------
>
> Key: PLC4X-200
> URL: https://issues.apache.org/jira/browse/PLC4X-200
> Project: Apache PLC4X
> Issue Type: Bug
> Components: Driver-OPC-UA
> Affects Versions: 0.7.0
> Reporter: Alessandro Rossignoli
> Priority: Major
> Labels: newbie
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> When creating a new connection to the driver without params, using the TCP transport method, the driver will throw a null pointer exception.
> method: private static String getOptionString(String params)
> file: _OpcuaTcpPlcConnection.java_ line 558
> I am not really an expert of the OPC UA specificatin, but I think that a null check for this could solve the problem easily.
> This issue was not present on version 0.5.0, now upgrading to 0.7.0 the connection cannot be established and I am pretty sure that the getOptionString method that was introduced is the cause of this.
>
> I am available for a PR
--
This message was sent by Atlassian Jira
(v8.3.4#803005)