petrova ekaterina | 18 Jul 2010 12:05
Picon
Favicon

com4j.ExecutionException: com4j.ComException: 80040154 CoCreateInstance failed : Class not registered :

Hello, 
 I'm trying to use com4j for P2ClientGate.dll 
I've no problems with generating the Java definition but when I tried to instantiate the class using ClassFactory I get this error:  
Exception in thread "main" com4j.ExecutionException: com4j.ComException: 80040154 CoCreateInstance failed : Class not registered : .\com4j.cpp:135
at com4j.ComThread.execute(ComThread.java:189)
at com4j.Task.execute(Task.java:23)
at com4j.COM4J.createInstance(COM4J.java:95)
at com4j.COM4J.createInstance(COM4J.java:73)
at com4j.COM4J.createInstance(COM4J.java:46)
at test.main_com4j.main(main_com4j.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:110)
Caused by: com4j.ComException: 80040154 CoCreateInstance failed : Class not registered : .\com4j.cpp:135
at com4j.Native.createInstance(Native Method)
at com4j.COM4J$CreateInstanceTask.call(COM4J.java:111)
at com4j.COM4J$CreateInstanceTask.call(COM4J.java:98)
at com4j.Task.invoke(Task.java:44)
at com4j.ComThread.run0(ComThread.java:149)
at com4j.ComThread.run(ComThread.java:125)

I've read the discussion about the same problem where you said that registering classes of  COM library will help. 
Could you please give any further direction how to do this ?
I'll really appreciate any help. 

Sincerely yours, 
Kate Petrova.



Gmane