Exception while connecting to Emerson Deltav OPC Server using Openscada lib

136 views
Skip to first unread message

maged Emara

unread,
Nov 22, 2019, 11:49:09 AM11/22/19
to openSCADA

Hello dears,

I’ve couple of questions regarding openscada library, one general and one specific I assume that latest library version is 1.5 which I can found at Maven .

1-      OPC open foundation specification implementation in openscada library

Q: Is the referred version of openscada supporting OPC DA 2.05A or only OPC DA 2.0 ? and if not supported is there any other alternative library to connect to Emerson Deltav OPC server supporting DA 2.05A specifications.  

My understanding that OPC DA 3.0 is not supported yet

2-      Same Emerson Deltav is throwing is nullpointerexpection while creating the Server object using either classid or progid, we don’t suspect the parameter used (domain, classid, credentials, ..) as we verified them with other OPC test clients.

Below is the exact exception stacktrace and the identifed snippet throwing the nullpointerexcpetion after debugging the code.

Stacktrace :

17:08:51.526 [Timer-2] INFO  o.j.dcom.core.JIComOxidRuntime - Running ServerPingTimerTask !

17:08:51.526 [Timer-1] INFO  o.j.dcom.core.JIComOxidRuntime - Running ClientPingTimerTask !

17:08:51.526 [main] INFO  org.jinterop.dcom.core.JISession - Created Session: 623627786

Nov 22, 2019 5:08:51 PM org.jinterop.dcom.common.JISystem internal_dumpMap

INFO: mapOfHostnamesVsIPs: {}

17:08:51.541 [main] DEBUG o.j.dcom.transport.JIComTransport - Opening socket on /192.168.1.1:135

Nov 22, 2019 5:08:51 PM rpc.DefaultConnection processOutgoing

INFO:

 Sending BIND

Nov 22, 2019 5:08:51 PM rpc.DefaultConnection processIncoming

INFO:

 Recieved BIND_ACK

Nov 22, 2019 5:08:51 PM rpc.DefaultConnection processOutgoing

INFO:

 Sending AUTH3

Nov 22, 2019 5:08:51 PM rpc.DefaultConnection processOutgoing

INFO:

 Sending ALTER_CTX

Nov 22, 2019 5:08:52 PM rpc.DefaultConnection processIncoming

INFO:

 Recieved ALTER_CTX_RESP

Nov 22, 2019 5:08:52 PM rpc.DefaultConnection processOutgoing

INFO:

 Sending REQUEST

Nov 22, 2019 5:08:52 PM rpc.DefaultConnection processIncoming

INFO:

 Recieved RESPONSE

17:08:52.126 [main] WARN  org.openscada.opc.lib.da.Server - Unknown error

java.lang.NullPointerException: null

        at org.jinterop.dcom.core.JIComServer.init(Unknown Source) ~[OPCConnectionTester_console.jar:na]

        at org.jinterop.dcom.core.JIComServer.initialise(Unknown Source) ~[OPCConnectionTester_console.jar:na]

        at org.jinterop.dcom.core.JIComServer.<init>(Unknown Source) ~[OPCConnectionTester_console.jar:na]

        at org.openscada.opc.lib.da.Server.connect(Server.java:117) ~[OPCConnectionTester_console.jar:na]

        at jfc2.GetAllTags.main(GetAllTags.java:43) [OPCConnectionTester_console.jar:na]

17:08:52.126 [main] INFO  org.openscada.opc.lib.da.Server - Destroying DCOM session...

17:08:52.130 [main] INFO  org.openscada.opc.lib.da.Server - Destroying DCOM session... forked

java.lang.RuntimeException: java.lang.NullPointerException17:08:52.131 [OPCSessionDestructor] DEBUG org.openscada.opc.lib.da.Server - Starting destruction of DCOM session

17:08:52.132 [OPCSessionDestructor] INFO  org.jinterop.dcom.core.JISession - About to destroy 0 sessesion which are linked to this session: 623627786

        at org.openscada.opc.lib.da.Server.connect(Server.java:149)

17:08:52.134 [OPCSessionDestructor] INFO  o.j.dcom.core.JIComOxidRuntime - destroySessionOIDs for session: 623627786

        at jfc2.GetAllTags.main(GetAllTags.java:43)17:08:52.136 [OPCSessionDestructor] INFO  org.openscada.opc.lib.da.Server - Destructed DCOM session

17:08:52.141 [OPCSessionDestructor] INFO  org.openscada.opc.lib.da.Server - Session destruction took 10 ms

Caused by: java.lang.NullPointerException

        at org.jinterop.dcom.core.JIComServer.init(Unknown Source)

        at org.jinterop.dcom.core.JIComServer.initialise(Unknown Source)

        at org.jinterop.dcom.core.JIComServer.<init>(Unknown Source)

        at org.openscada.opc.lib.da.Server.connect(Server.java:117)

        ... 1 more

 

Code Snippet (root cause of the exception) :

JIComServer.java
// ME:  Here dualStringArrayForOxid is null due to this this.remoteActivation.getDualStringArrayForOxid () breaks and return null pointer exception
private void init () throws JIException
{
        if ( this.remoteActivation != null && this.remoteActivation.isActivationSuccessful () )
        {
            return;
        }
        .
        .
        .
        .
        .
        // Now will setup syntax for IRemUnknown and the address.
        this.syntax = "00000143-0000-0000-c000-000000000046:0.0";
        //now for the new ip and the port.
        final JIStringBinding[] bindings = this.remoteActivation.getDualStringArrayForOxid ().getStringBindings ();
        
} 
 
 
//ME:  Here skipdual is set to 0, which does not set this.dualStringArrayForOxid and remains null
JIRemActiviation.java
@Override
    public void read ( final NetworkDataRepresentation ndr )
    {
        //first take out JIOrpcThat
        this.orpcthat = JIOrpcThat.decode ( ndr );
        //now fill the oxid
        this.oxid = JIMarshalUnMarshalHelper.readOctetArrayLE ( ndr, 8 );
        final int skipdual = ndr.readUnsignedLong ();
        if ( skipdual != 0 )
        {
            ndr.readUnsignedLong ();
            //now fill the dual string array for oxid bindings, the call to IRemUnknown will be
            //directed to this address and the port in that address.
            this.dualStringArrayForOxid = JIDualStringArray.decode ( ndr );
        }

Andrea Ambrosini

unread,
Feb 16, 2022, 8:20:34 AM2/16/22
to openSCADA
Hi All,
someone has solved this problem.

Thanks

470433216

unread,
Feb 16, 2022, 8:20:42 AM2/16/22
to Andrea Ambrosini
您的邮件已收到,谢谢!
                       ——钟昌建
Reply all
Reply to author
Forward
0 new messages