JNI-COM problem (URGENT)
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   naren_naren
Posted On:   Thursday, May 2, 2002 08:35 AM

Hi, I am running my java application on Windows NT 4.0. The application has 3 different componenets running as three different processes: 1. MyServer(pure java server, running on WEBLOGIC 6.1 with JDK 1.3.1_02) 2. RMIServer with MyDLL(RMIServer interact with MYDLL (MFC DLL) and runs it in a different process to make MyServer more reliable and keep it insulated from any crash that may happen in DLL or the third component below) 3. Excel.exe (Excel COM server, MyDLL interact with Excel.exe to read and write to excel sheets) MyServer issues a request to RMIServer to read rows from Excel sheet. RMIServer calls MyDLL through JNI to read rows from excel sheet, which in turn forward   More>>

Hi,


I am running my java application on Windows NT 4.0. The application has 3 different componenets running as three different processes:


1. MyServer(pure java server, running on WEBLOGIC 6.1 with JDK 1.3.1_02)

2. RMIServer with MyDLL(RMIServer interact with MYDLL (MFC DLL) and runs it in a different process to make MyServer more reliable and keep it insulated from any crash that may happen in DLL or the third component below)

3. Excel.exe (Excel COM server, MyDLL interact with Excel.exe to read and write to excel sheets)


MyServer issues a request to RMIServer to read rows from Excel sheet. RMIServer calls MyDLL through JNI to read rows from excel sheet, which in turn forwards call to Excel.exe (not in my control) and returns a vector to RMIServer and back to MyServer.
For every call that MyServer makes to RMIServer, RMIServer returns 100 records to MyServer.


The whole thing crashes randomly, sometimes after reading 100 records, other times after reading 1000 records.I tested even with single thread.
If I change the setup so that for every call from MyServer to RMIServer, only one record is returned, it works. But if I add a dummy delay of say 20000millisecs between consecutive calls, the DLL throws error.


The error message that I get from DLL is "Object not connected to server".


I think either the problem is in the MyServer to RMIServer communication or in the MyDLL to Excel.exe communication.
I sense some sort of either memory corruption (I don't know howz that possible) or some Timeout because of which COM object going out of memory. Important thing is that even after crash my Excel.exe is still running (I can see it in task manager).


If any body has come across similar situation, please help me out. Its URGENT.


Thanks in advance.
Naren

   <<Less
About | Sitemap | Contact