[ 
https://issues.apache.org/jira/browse/PLC4X-313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17538700#comment-17538700
 ] 

Sudheer Raj commented on PLC4X-313:
-----------------------------------

Hi [~cdutz] & [~karacc],

Any luck with the 'Caused by: 
org.apache.plc4x.java.api.exceptions.PlcIoException: Connection terminated by 
remote' issue reported above ? I ran into same error when i am trying to 
connect to external OPCUA server running with security policy 'BASIC256SHA256' 
using PLC4J driver (version : plc4j-driver-opcua-0.9.1). 

Following is the connection string which i used for my testing:
{noformat}
opcua:tcp://127.0.0.1:5150?discovery=false&username=admin&password=admin&securityPolicy=Basic256Sha256&keyStoreFile=mycert2.pfx&certDirectory=security&keyStorePassword=12345
{noformat}
It seems the certificate generated is of type PFX. Hence, i manually converted 
.PFX to .DER and placed the .DER in the trusted directory of OPCUA server.

But, when i ran the OPCUA server with security policy 'None', everything works 
as expected. 

Regards,
Sudheer

> java.lang.ClassCastException: DefaultPlcSubscriptionField cannot be cast to 
> class OpcuaField
> --------------------------------------------------------------------------------------------
>
>                 Key: PLC4X-313
>                 URL: https://issues.apache.org/jira/browse/PLC4X-313
>             Project: Apache PLC4X
>          Issue Type: Bug
>          Components: Driver-OPC-UA
>    Affects Versions: 0.8.0
>            Reporter: karthik
>            Priority: Major
>
> Hi team -
> i had followed the 
> [https://github.com/apache/plc4x/tree/rel/0.8/plc4j/examples/hello-world-plc4x-subscription]
>  and facing the below error .
> version : plc4j-driver-opcua-0.8.0
> java : 1.8
> Exception in thread "main" java.util.concurrent.ExecutionException: 
> java.lang.ClassCastException: 
> org.apache.plc4x.java.spi.model.DefaultPlcSubscriptionField cannot be cast to 
> org.apache.plc4x.java.opcua.protocol.OpcuaField
>  
> please kindly provide your suggestions.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to