takraj opened a new issue, #1105:
URL: https://github.com/apache/plc4x/issues/1105

   ### What happened?
   
   If I attempt to access an OPC-UA node by GUID, I'm getting the following 
exception:
   ```
   Exception in thread "main" java.lang.ArrayStoreException: arraycopy: source 
type java.lang.Long is not an array
        at java.base/java.lang.System.arraycopy(Native Method)
        at 
org.apache.plc4x.java.opcua.protocol.OpcuaProtocolLogic.generateNodeId(OpcuaProtocolLogic.java:234)
        at 
org.apache.plc4x.java.opcua.protocol.OpcuaProtocolLogic.read(OpcuaProtocolLogic.java:146)
        at 
org.apache.plc4x.java.spi.optimizer.BaseOptimizer.lambda$optimizedRead$0(BaseOptimizer.java:107)
        at 
org.apache.plc4x.java.spi.optimizer.BaseOptimizer.send(BaseOptimizer.java:150)
        at 
org.apache.plc4x.java.spi.optimizer.BaseOptimizer.optimizedRead(BaseOptimizer.java:107)
        at 
org.apache.plc4x.java.spi.connection.AbstractPlcConnection.read(AbstractPlcConnection.java:167)
        at 
org.apache.plc4x.java.spi.messages.DefaultPlcReadRequest.execute(DefaultPlcReadRequest.java:60)
        at org.example.ManualOpcuaGuidTag.main(ManualOpcuaGuidTag.java:20)
   ```
   
   Example code to reproduce the issue:
   ```
   PlcDriverManager driverManager = new PlcDriverManager();
   try (PlcConnection opcuaConnection = 
driverManager.getConnection("opcua:tcp://opcuaserver.com:48010")) {
       PlcReadRequest request = opcuaConnection.readRequestBuilder()
               .addItem(
                       "VariableWithGuidNodeId",
                       "ns=2;g=5CE9DBCE-5D79-434C-9AC3-1CFBA9A6E92C"
               )
               .build();
   
       PlcReadResponse response = request.execute().get();
       System.out.println(response.getObject("VariableWithGuidNodeId"));
   }
   ```
   
   It applies to the latest revision of `develop` branch too.
   I have already posted a PR to fix it: 
https://github.com/apache/plc4x/pull/1099
   
   Logs
   --------
   * [logs.txt](https://github.com/apache/plc4x/files/12706983/logs.txt)
   
   ### Version
   
   v0.10.0
   
   ### Programming Languages
   
   - [X] plc4j
   - [ ] plc4go
   - [ ] plc4c
   - [ ] plc4net
   
   ### Protocols
   
   - [ ] AB-Ethernet
   - [ ] ADS /AMS
   - [ ] BACnet/IP
   - [ ] CANopen
   - [ ] DeltaV
   - [ ] DF1
   - [ ] EtherNet/IP
   - [ ] Firmata
   - [ ] KNXnet/IP
   - [ ] Modbus
   - [X] OPC-UA
   - [ ] S7


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to