Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: wang-bingbing on December 17, 2009, 05:36:16 pm
-
Hi, everybody.
recently, we made an addIn use VB according to EA's help.
But, unexpected that a tool we made by EA's java API become to cann't accessed.
Through debugging it we found that an Exception thrown by org.sparx.Repository.comConstructor method. So, by now we cann't solved it ourself, anyone have any suggesstions?
Thank you.
-
Wang,
Maybe you could post the part of the code that gets the error.
That could be usefull to find the error.
Geert
-
Wang,
Maybe you could post the part of the code that gets the error.
That could be usefull to find the error.
Geert
Ok, i just found this line of my code thrown exception.
[size=12]this.repository = new Repository();[/size]
And debug information was
Repository.comConstrutor() line:not available [native method]
-
Wang
If you are writing an add-in you should not create a new Repository object, it will be passed as a parameter in the methods called by EA.
Geert
-
Wang
If you are writing an add-in you should not create a new Repository object, it will be passed as a parameter in the methods called by EA.
Geert
hi, Geert.
Maybe you misunderstanded my description, I mean we have made two tools, one is EA' add-in bulit by vb.net, and the other is an external java tool bulit by eaapi.jar.
And the problem is that installed our vb add-in, our java tool cann't accessed the org.sparx.Repository.comConstructor method. Maybe there was a problem with the SSCOM.dll.
-
Are you referencing the SSJavaCOM.dll and eaapi.jar files provided with your current EA installation? Problems could occur if you are still using SSJavaCOM from an older installation for example.
What EA version/build are you running? If possible, make sure you are running the latest build of EA and make sure that the SSJavaCOM.dll provided with this installation is copied into your windows System32 directory.
-
Are you referencing the SSJavaCOM.dll and eaapi.jar files provided with your current EA installation? Problems could occur if you are still using SSJavaCOM from an older installation for example.
What EA version/build are you running? If possible, make sure you are running the latest build of EA and make sure that the SSJavaCOM.dll provided with this installation is copied into your windows System32 directory.
hi, my current version of EA is 7.5.847 and SSJavaCom.dll have copied into my windows System32 directory.
-
Now, i have got some error message below:
Exception in thread "AWT-EventQueue-0" java.lang.Exception: Failed to construct object. Error code: 0x80004002
at org.sparx.Repository.comConstructor(Native Method)
at org.sparx.Repository.<init>(Repository.java:150)
what does this code [0x80004002] stand for?
-
It's coming directly from COM, so I don't know precisely.
But I have seen it in the past when doing an invalid cast.