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

karthik commented on PLC4X-313:
-------------------------------

Chris- Thanks a lot for your support.  POM.xml file added the 0.9.0-SNAPSHOT 
dependency

and execute the HelloPlc4xSubscription  file facing the below error.

 File :  
https://github.com/apache/plc4x/blob/rel/0.8/plc4j/examples/hello-world-plc4x-subscription/src/main/java/org/apache/plc4x/java/examples/helloplc4x/subscription/HelloPlc4xSubscription.java

 

17:09:41.863 [nioEventLoopGroup-2-1] ERROR 
org.apache.plc4x.java.opcua.context.SecureChannel - Failed to connect to opc ua 
server for the following reason:- 2153119744, BadTooManySessions
Exception in thread "main" 
org.apache.plc4x.java.api.exceptions.PlcConnectionException: 
java.util.concurrent.ExecutionException: 
org.apache.plc4x.java.api.exceptions.PlcIoException: Connection terminated by 
remote
 at 
org.apache.plc4x.java.spi.connection.DefaultNettyPlcConnection.connect(DefaultNettyPlcConnection.java:133)
 at 
org.apache.plc4x.java.PlcDriverManager.getConnection(PlcDriverManager.java:74)
 at org.apache.plc4x.java.api.exceptions.PlcIoException: Connection terminated 
by remote
 at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
 at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
 at 
org.apache.plc4x.java.spi.connection.DefaultNettyPlcConnection.connect(DefaultNettyPlcConnection.java:124)
 ... 3 more
Caused by: org.apache.plc4x.java.api.exceptions.PlcIoException: Connection 
terminated by remote
 at 
org.apache.plc4x.java.spi.connection.DefaultNettyPlcConnection.lambda$connect$1(DefaultNettyPlcConnection.java:115)
 at 
io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578)
 at 
io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:552)
 at 
io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:491)
 at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:616)
 at io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:605)
 at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:104)
 at 
io.netty.channel.DefaultChannelPromise.trySuccess(DefaultChannelPromise.java:84)
 at 
io.netty.channel.AbstractChannel$CloseFuture.setClosed(AbstractChannel.java:1182)
 at 
io.netty.channel.AbstractChannel$AbstractUnsafe.doClose0(AbstractChannel.java:773)
 at 
io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:749)
 at 
io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:620)
 at 
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.closeOnRead(AbstractNioByteChannel.java:105)
 at 
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:174)
 at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719)
 at 
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
 at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
 at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
 at 
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
 at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
 at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
 at java.lang.Thread.run(Thread.java:745)

> 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.3.4#803005)

Reply via email to