Message not found for errorCode: 0x0004000D

228 views
Skip to first unread message

huangz...@gmail.com

unread,
Nov 7, 2013, 9:02:47 PM11/7/13
to open...@googlegroups.com
hi,
package com.tt.test;

import java.net.UnknownHostException;
import java.util.concurrent.Executors;

import org.jinterop.dcom.common.JIException;
import org.jinterop.dcom.common.JISystem;
import org.jinterop.dcom.core.JIVariant;
import org.openscada.opc.lib.common.ConnectionInformation;
import org.openscada.opc.lib.common.NotConnectedException;
import org.openscada.opc.lib.da.AccessBase;
import org.openscada.opc.lib.da.AddFailedException;
import org.openscada.opc.lib.da.Async20Access;
import org.openscada.opc.lib.da.AutoReconnectController;
import org.openscada.opc.lib.da.DataCallback;
import org.openscada.opc.lib.da.DuplicateGroupException;
import org.openscada.opc.lib.da.Group;
import org.openscada.opc.lib.da.Item;
import org.openscada.opc.lib.da.ItemState;
import org.openscada.opc.lib.da.Server;
public class SCADA {
 public static void main(String[] args){
  AutoReconnectController autos = null;
  try {
   JISystem.setAutoRegisteration(true);
   
   ConnectionInformation ci = new ConnectionInformation();
   ci.setHost("192.168.0.109");//130.0.0.1
   ci.setDomain("");
   //ci.setProgId("Kepware.KEPServerEX.V5");//Hollysys.MacsOPCSvr.1
   ci.setClsid("b3af0bf6-4c0c-4804-a122-6f3b160f4397");
   ci.setUser("Administrator");
   ci.setPassword("123");//esd.@2012
   
   
   
   final Server s = new Server(ci,Executors.newSingleThreadScheduledExecutor());
         autos = new AutoReconnectController(s);
   autos.connect();Thread.sleep(100);
   
   
//   dumpTree(s.getTreeBrowser().browse(),0);
   
   Group group = s.addGroup("group");
            group.setActive(true);
           // final Item item = group.addItem("Bucket Brigade.String");
            final Item item = group.addItem("Channel1.Device1.Tag1");// simatic S7  Group1.PI_3009
           // final Item item = group.addItem("Random.String");
            item.setActive(true);
            Thread.sleep(1000);
            System.out.println(":"+item.read(false).getValue());
            JIVariant value = JIVariant.makeVariant(new Integer(777));
            item.write(value);
   
//  
  final AccessBase access = new Async20Access(s,6000,false);
            access.addItem ( "Channel1.Device1.Tag1",new DataCallback() {
                @Override
                public void changed(Item item, ItemState state) {
                    System.out.println("-----------11-------"+state);
                }
            });
            access.bind ();
            Thread.sleep(10*1000);
            access.unbind();
           
  } catch (IllegalArgumentException e) {
   e.printStackTrace();
  } catch (UnknownHostException e) {   
   e.printStackTrace();
  } catch (JIException e) {  
   e.printStackTrace();
  } catch (NotConnectedException e) {  
   e.printStackTrace();
  } catch (DuplicateGroupException e) {             
   e.printStackTrace();
  } catch (AddFailedException e) {
   e.printStackTrace();
  } catch (InterruptedException e) {
   e.printStackTrace();
  }finally{
   autos.disconnect();
  }  
 }
}


Execution error
 org.jinterop.dcom.common.JIRuntimeException: Message not found for errorCode: 0x0004000D

How to solve?

Jens Reimann

unread,
Nov 8, 2013, 2:07:37 AM11/8/13
to open...@googlegroups.com

Hi,

Is there any documentation of your opc server that indicates what this error means?

Or maybe a stack trace to see the call that causes the opc server to respond with that?

Have you checked that the same parameters work with any other opc tool?

--
You received this message because you are subscribed to the Google Groups "openSCADA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openscada+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Jens Reimann

unread,
Nov 29, 2013, 8:55:38 AM11/29/13
to open...@googlegroups.com
This was actually a bug in Utgard and is solved int the code base ( https://openscada.atlassian.net/browse/OP-32 ).

It might take a few days until it can be downloaded as integration build of version 1.2.0

Nikolaj Weh

unread,
Dec 9, 2015, 7:38:56 AM12/9/15
to openSCADA
Hi Jens,

was this bug finally fixed? I got the problem that I can connect to an OPC server via utgard, but this error prevents me from accessing any items on the server.

Jens Reimann

unread,
Dec 9, 2015, 10:42:38 AM12/9/15
to openSCADA

Did you try version 1.3.1?

--
You received this message because you are subscribed to the Google Groups "openSCADA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openscada+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages