Re: Application Error (JVM crashes and hangs)

Miroslav Tichy <[email protected]> Sun, 3 Jul 2005 09:34:32 -0400
Newsgroups gmane.comp.windows.devel.jawin
Message-ID <LISTSERV%[email protected]>
On Wed, 20 Apr 2005 21:16:40 +0200, Morten Andersen <[email protected]> wrote:

>Hi Mirek
>
>Miroslav Tichy wrote:
>
>[SNIP]
>
>Perhaps you can try to insert the line below (I have inserted it in the
>correct place in your sample code)
>
>> Ole32.CoInitialize();
>> //generated stub for COM object writen in MS Fox and accessing Clipper DBF
>> file through the ODBC
>> Inetwrs net = new Inetwrs(netwrs.CLSID);
>> //here I call method which writes something to the DB and it really does
>> it...!!!!!!
>> Object o = net.zapis();
>
>net.close();
>
>> Ole32.CoUninitialize();
>
>Also, what kind of object does net.zapis() return? - if this is a also
>an instance of COMPtr, DispatchPtr or the like, this should probably
>also be closed before the CoUninitialize() call.
>
>I think the documentation may only contain very little information on
>the usage of close(). But a few lines on it can be found here:
>        http://jawinproject.sourceforge.net/jawinuserguide_vtable.html#jawinapi
>
>and in the sample code here:
>
http://jawinproject.sourceforge.net/jawinuserguide_vtable.html#samplecode_using
>
>Please let us know if this solves your problem.
>Best Regards
>Morten

Thank you, Morten, for your help.
Close() method does work, it releases all used resources...I am not
familliar with COM (my friend wrote the dll for me), but in destroy method
(is it?) he releases odbc connection. That opened connection was the problem
I described above...
...and very sorry
about my late response, I have not worked on app which uses jawin for a while
so I was not able to test it...
Thx much again!