[gme-users] How to invoke a Java BonComponent

Kevin Smyth ksmyth at isis.vanderbilt.edu
Fri Feb 19 15:38:45 CST 2010


Hi Gurkan,

Yes, this seems to be a bug in GME. I filed an issue for it:
http://escher.isis.vanderbilt.edu/JIRA/browse/GME-257

The problem is some missing registry entries. Please use the attached file
to fix it.

Thanks,
Kevin



-----Original Message-----
From: gme-users-bounces at list.isis.vanderbilt.edu
[mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of Gürkan
Özhan
Sent: Friday, February 19, 2010 10:52 AM
To: gme-users
Subject: Re: [gme-users] How to invoke a Java BonComponent

Hi Kevin,
   I've tried a similar code to TestMgaLayer1 as below:

...
		Apartment.enter(true);

		// create and open mga project
		MgaProject project = MgaProject.createInstance();
	
project.open("MGA=C:\\Gurkan\\PhD\\ModelTrans\\Multi2BinaryFAM\\Model\\FAM_B
inaryInstMsc_4SIMMono.mga");
		project.beginTransaction(null);
		JBuilder jBuilder = new JBuilder(project, this);

		JBuilderObject focus =
(JBuilderObject)jBuilder.getRootFolder().getRootModels().get(0);
		Collection selected = null;
		int param = 0;
		invokeEx(jBuilder, focus, selected, param);

		project.commitTransaction();
...

Note that, the this parameter to JBuilder constructor is this class,
which is a BONComponent

 However, I get a runtime error if I execute that code (starting from
new JBuilder(project, this); statement):

Exception in thread "main" org.isis.jaut.ComException: No such
interface supported
(0x80004002)
	at org.isis.jaut.Dispatch.changeInterface(Native Method)
	at org.isis.gme.mga.MgaAtom.<init>(Unknown Source)
	at org.isis.gme.bon.JBuilderFolder.<init>(Unknown Source)
	at org.isis.gme.bon.JBuilderFolder.<init>(Unknown Source)
	at org.isis.gme.bon.JBuilder.<init>(Unknown Source)
	at org.isis.gme.bon.LSCCodeGen.startCodeGen(LSCCodeGen.java:2485)
	at org.isis.gme.bon.LSCCodeGen.main(LSCCodeGen.java:2499)

Apparently, the iID of the new interface in the format of
"{XXXXXXXX-XXXX-XX...}" is not recognized. What is this string anyway?
Every Dispatch object has that.
   Best regards,

Gurkan


On 2/17/10, Kevin Smyth <ksmyth at isis.vanderbilt.edu> wrote:
> Hi Gurkan,
>
> gme.jar contains these relevant classes:
> org.isis.gme.mga.TestMgaLayer1
> org.isis.gme.bon.JBuilder
>
> I'd construct a main() similar to TestMgaLayer1#createProjectTest with a
new
> JBuilder(project, interpreter) then interpreter#InvokeEx.
>
> Note gme.jar includes the source.
>
> If you must debug the java inside gme.exe, I'd download the GME source and
> modify JavaCompRunner to enable remote debugging (ie another JavaVMOption)
>
> HTH,
> Kevin
>
>
> -----Original Message-----
> From: gme-users-bounces at list.isis.vanderbilt.edu
> [mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of Gürkan
> Özhan
> Sent: Tuesday, February 16, 2010 4:10 PM
> To: gme-users
> Subject: [gme-users] How to invoke a Java BonComponent
>
> Hello All,
>
>   My previous mails have gone unanswered, so I will try to be as
> prompt as possible. Here is my question: Can anybody post a code
> snippet of how to invoke a Java BonCompnent? This component is
> supposed to open an existing .mga model file and starting from its
> RootFolder, it will traverse the whole model structure and do some
> computations.
>
>   Many thanks in advance.
>
> Gurkan Ozhan
> _______________________________________________
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
>
> _______________________________________________
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
>
>
>
_______________________________________________
gme-users mailing list
gme-users at list.isis.vanderbilt.edu
http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GME-missing-proxies.reg
Type: application/octet-stream
Size: 4042 bytes
Desc: not available
Url : http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20100219/201ea780/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5192 bytes
Desc: not available
Url : http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20100219/201ea780/attachment.bin 


More information about the gme-users mailing list