org.jinterop.dcom.common.JIException: Class not registered. If you are using a DLL/OCX [0x80040154]

1,348 views
Skip to first unread message

IrisD

unread,
Aug 27, 2013, 5:06:27 AM8/27/13
to open...@googlegroups.com
Hi everybody,


I would like to list all the clsid's of the available opc servers. I am not sure how to do this. I think I should be doing something like this:

JISystem.setAutoRegisteration(true);
       
//System.out.println(JISystem.isAutoRegistrationSet());
       
JISession session = JISession.createSession("myDomain", "myUserName",
               
"MyPassword");
       
ServerList serverList;
       
try {
            serverList
= new ServerList(session, "");
           
Collection<ClassDetails> serverListWithDetails = serverList
                   
.listServersWithDetails(new Category[] {},
                           
new Category[] {});
           
for (ClassDetails cd : serverListWithDetails) {
               
System.out.println(cd.getClsId());
           
}
       
} catch (IllegalArgumentException e) {
           
// TODO Auto-generated catch block
            e
.printStackTrace();
       
} catch (UnknownHostException e) {
           
// TODO Auto-generated catch block
            e
.printStackTrace();
       
} catch (JIException e) {
           
// TODO Auto-generated catch block
            e
.printStackTrace();
       
}


org.jinterop.dcom.common.JIException: Class not registered. If you are using a DLL/OCX , please make sure it has "DllSurrogate" flag set. Faq A(6) in readme.html. [0x80040154]
    at org
.jinterop.dcom.core.JIComServer.call(JIComServer.java:1012)
    at org
.jinterop.dcom.core.JIComServer.call(JIComServer.java:951)
    at org
.jinterop.dcom.core.JIComObjectImpl.call(JIComObjectImpl.java:295)
    at org
.jinterop.dcom.core.JIComObjectImpl.call(JIComObjectImpl.java:161)
    at org
.openscada.opc.dcom.common.impl.Helper.callRespectSFALSE(Helper.java:41)
    at org
.openscada.opc.dcom.list.impl.OPCServerList.getClassDetails(OPCServerList.java:95)
    at org
.openscada.opc.lib.list.ServerList.getDetails(ServerList.java:101)
    at org
.openscada.opc.lib.list.ServerList.listServersWithDetails(ServerList.java:174)
    at org
.openscada.opc.tutorial.SearchForServers.main(SearchForServers.java:38)
Caused by: org.jinterop.dcom.common.JIRuntimeException: Class not registered. If you are using a DLL/OCX , please make sure it has "DllSurrogate" flag set. Faq A(6) in readme.html. [0x80040154]
    at org
.jinterop.dcom.core.JICallBuilder.readResult(JICallBuilder.java:1289)
    at org
.jinterop.dcom.core.JICallBuilder.read(JICallBuilder.java:1166)
    at ndr
.NdrObject.decode(NdrObject.java:41)
    at rpc
.ConnectionOrientedEndpoint.call(ConnectionOrientedEndpoint.java:141)
    at rpc
.Stub.call(Stub.java:134)
    at org
.jinterop.dcom.core.JIComServer.call(JIComServer.java:999)

Please note that I only get this exception when I try to make a ServerList. I already tried with setting the ownership of the registry key to administrators and give them full control permissions as suggested by other sources I found on the Internet.

Thanks for your help.

Regards,
Iris


Jens Reimann

unread,
Aug 27, 2013, 5:54:11 AM8/27/13
to open...@googlegroups.com
Hi,

well to me it looks like as if the class is not registered on the OPC server side. Do you have the OPC Enum stuff installed on the server? Can you remote browse with any other software?


--
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.

ID

unread,
Aug 27, 2013, 7:41:54 AM8/27/13
to open...@googlegroups.com
Sorry Jens, I should have posted it here:

Thanks for the quick reply!

Yes, the OPC enum is installed and running. I can read and write data with Utgard when the server and client are on the same machine.
As for remote browsing, I thought the code I posted would allow me to find the clsid of the server that is on the same machine (just wanted to test something), but I probably misunderstood. I will try remote browsing and post the results here.

Regards

Op dinsdag 27 augustus 2013 11:06:27 UTC+2 schreef ID:
Message has been deleted

Han Evan

unread,
Oct 16, 2013, 5:41:06 AM10/16/13
to open...@googlegroups.com
Hi,
Have you solved the problem? I also want to list all the ProgID and ClsID of the available opc server, but i don't know how to do. If you have solved the problem, please provide me some help, thanks.

在 2013年8月27日星期二UTC+8下午5时06分27秒,ID写道:

Jens Reimann

unread,
Oct 16, 2013, 5:44:19 AM10/16/13
to open...@googlegroups.com
You can use the OPCEnum stuff from Utgard.


Reply all
Reply to author
Forward
0 new messages