S
S.P Singh
Guest
Environment: -
Operating System: Windows 10
Dll Written: VS 2008
Dll Used By: - A war (web archive) file written in J2EE and call dll by native keyword
Application Server: - Jboss EAP 7.1 and it can start from both .bat file or windows service
Description: -
We have a web application program which is deploying on an application server: Jboss EAP and on a web page, we are calling Dll method by native keyword. This Dll is written in MFC programming of VC ++ for achieving and replace some string in word template and it is working fine when server is running from bat file.
When JbossEAP server is running from services (Windows Service), server is getting crashed. And the line where server is getting crashed, it is inside the Dll, i.e. Dll code is calling, but something is missing and due to that program is terminating jvm and server crashed.
Code snippet where program is crashing: -
_Application oAppObj;
_Document oActDoc ;
if(!oAppObj.CreateDispatch(_T("Word.Application"),&e))
{
_stprintf(buf, _T("Error on CreateDispatch() : %ld (%08lx)"),e.m_sc, e.m_sc);
Log(WDPROJ_CANNOT_OPEN_WORD,_T(""),_T(""),_T("Cannot open the word object."));
return WDPROJ_CANNOT_OPEN_WORD;
}
oAppObj.m_bAutoRelease = true;
Documents oDocs = oAppObj.GetDocuments();
Log(0, _T("OPENING_WORD_DOCUMENT"), _T("PROCESSING"), _T(""));
// Server crashed on below highlighted line
oActDoc=oDocs.Open(COleVariant(strTmpFileName),covOptional,covOptional,covOptional,covOptional,covOptional,covOptional,covOptional,covOptional,covOptional,covOptional,covOptional);
oDocs.m_bAutoRelease =true;
Log(0,_T("OPEN_WORD_DOCUMENT_TASK"),_T("COMPLETED"),_T(""));
Error captured in Event viewer logs when server crashed: -
Event Logs: -
Faulting application name: java.exe, version: 8.0.1810.13, time stamp: 0x5b40a072
Faulting module name: MSVCR90.dll, version: 9.0.30729.9247, time stamp: 0x56fa3839
Exception code: 0xc0000417
Fault offset: 0x00000000000552d4
Faulting process id: 0x1114
Faulting application start time: 0x01d5a5cf78a953f3
Faulting application path: C:\Program Files\Java\jdk1.8.0_181\bin\java.exe
Faulting module path: C:\windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.9247_none_08e394a1a83e212f\MSVCR90.dll
Report Id: 2ce9dd98-718b-4f41-8405-85c7ff940116
Faulting package full name:
Faulting package-relative application ID:
Kindly assist me to resolve the issue. I will be really thankful.
Regards, S.P Singh
Continue reading...
Operating System: Windows 10
Dll Written: VS 2008
Dll Used By: - A war (web archive) file written in J2EE and call dll by native keyword
Application Server: - Jboss EAP 7.1 and it can start from both .bat file or windows service
Description: -
We have a web application program which is deploying on an application server: Jboss EAP and on a web page, we are calling Dll method by native keyword. This Dll is written in MFC programming of VC ++ for achieving and replace some string in word template and it is working fine when server is running from bat file.
When JbossEAP server is running from services (Windows Service), server is getting crashed. And the line where server is getting crashed, it is inside the Dll, i.e. Dll code is calling, but something is missing and due to that program is terminating jvm and server crashed.
Code snippet where program is crashing: -
_Application oAppObj;
_Document oActDoc ;
if(!oAppObj.CreateDispatch(_T("Word.Application"),&e))
{
_stprintf(buf, _T("Error on CreateDispatch() : %ld (%08lx)"),e.m_sc, e.m_sc);
Log(WDPROJ_CANNOT_OPEN_WORD,_T(""),_T(""),_T("Cannot open the word object."));
return WDPROJ_CANNOT_OPEN_WORD;
}
oAppObj.m_bAutoRelease = true;
Documents oDocs = oAppObj.GetDocuments();
Log(0, _T("OPENING_WORD_DOCUMENT"), _T("PROCESSING"), _T(""));
// Server crashed on below highlighted line
oActDoc=oDocs.Open(COleVariant(strTmpFileName),covOptional,covOptional,covOptional,covOptional,covOptional,covOptional,covOptional,covOptional,covOptional,covOptional,covOptional);
oDocs.m_bAutoRelease =true;
Log(0,_T("OPEN_WORD_DOCUMENT_TASK"),_T("COMPLETED"),_T(""));
Error captured in Event viewer logs when server crashed: -
Event Logs: -
Faulting application name: java.exe, version: 8.0.1810.13, time stamp: 0x5b40a072
Faulting module name: MSVCR90.dll, version: 9.0.30729.9247, time stamp: 0x56fa3839
Exception code: 0xc0000417
Fault offset: 0x00000000000552d4
Faulting process id: 0x1114
Faulting application start time: 0x01d5a5cf78a953f3
Faulting application path: C:\Program Files\Java\jdk1.8.0_181\bin\java.exe
Faulting module path: C:\windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.9247_none_08e394a1a83e212f\MSVCR90.dll
Report Id: 2ce9dd98-718b-4f41-8405-85c7ff940116
Faulting package full name:
Faulting package-relative application ID:
Kindly assist me to resolve the issue. I will be really thankful.
Regards, S.P Singh
Continue reading...