Hi All.
I installed:
- Windows 2022 server x64
- Weblogic 14.1.2
- Oracle Forms&Repors 14.1.2
- java JDK 21.0.4
- Oracle 19 server x64
- MS Office 365
and I have several projects, one of which is launched via OLE.
The project itself is starting. And everything works except reports. When I try to run a report on such a project, I get the error:
FRM-93652 - The runtime process has terminated abnormally. Contact your system administrator. Details.. Forms Session ID WLS_FORMS.formsapp.6
This project is working on weblogic 12. Now I need it to work on weblogic 14.1.2.
All modules are recompiled. There were no errors during the compilation process.
After this error, I see the Execel.exe process remaining in the memory on the server.
Below is an example of what is launched by the report button in such a project:
Declare
i Number;
n number:=0;
nExit number:=0;
filename VARCHAR2(256):='';
m_app OLE2.Obj_Type;
Application OLE2.Obj_Type;
Workbooks OLE2.Obj_Type;
Book OLE2.Obj_Type;
worksheets OLE2.Obj_Type;
Sheet OLE2.Obj_Type;
xLst OLE2.LIST_TYPE;
err_code BINARY_INTEGER;
err_text VARCHAR2(255);
AppID PLS_INTEGER;
ConvID PLS_INTEGER;
cPath VARCHAR2(1000);
File_new boolean:=false;
trg_id RecordGroup;
tgc_id GroupColumn;
Current_page number:=1;
Current_page_name varchar2(255);
Cells OLE2.Obj_Type;
cTitle varchar2(50);
NN_GR number;
grPOS number;
cursor curPOS(cPOS_ID number) is select iden,name,plant_id,unit_id,object_sh,depart,gsystem_id,kind_id,ptype_id,
opb,svb,note,import_date,edit_date,user_name,is_ready,
set_date,tc_years,tc_date,prol_date,PROL_TXT,
PNAE, FACTORY_NUM,COMPNAME,BUILDING,ROOM,LEV,SYSTEM_SH,SUBSYSTEM_SH
from NV_POSITIONS_LST where pos_id=cPOS_ID;
Begin
cTitle:='List Items';
SYNCHRONIZE;
IF :v_pos_lst.pos_id IS NULL THEN
MESSAGE_ALL ('No data!');
Return;
End If;
If not OLE2.IsSupported Then
Message_all('OLE2 not support!');
else
Message_all('OLE2 support!');
End If;
filename := Get_ExecelFile(cTitle);
If filename ='' or filename is null Then
Return;
End If;
Message('Preparing to Excel data ...', NO_ACKNOWLEDGE);
synchronize;
SET_APPLICATION_PROPERTY(CURSOR_STYLE,'busy');
if length(B_POS_MAIN.Filter_com)>2 then
CREATE_GROUP_TEMP('GR_EXCL','select POS_ID from NV_POSITIONS_LST where '||B_POS_MAIN.Filter_com||' ORDER BY IDEN');
else
CREATE_GROUP_TEMP('GR_EXCL','select POS_ID from NV_POSITIONS_LST ORDER BY IDEN');
end if;
NN_GR:=GET_GROUP_ROW_COUNT('GR_EXCL');
if NN_GR>65530 then
SET_APPLICATION_PROPERTY(CURSOR_STYLE,'default');
Message_all('Too much records'||chr(13)||'(You can get up to < 65500 records)'||chr(13)||chr(13)||'Change filter.');
Message(' ', NO_ACKNOWLEDGE);
Return;
end if;
m_app := OLE2.Create_Obj('Excel.Application');
Workbooks := Excel.GetProperty(m_app,'Workbooks');
OLE2.Set_Property(m_app,'DisplayAlerts',0);
begin
xLst:= OLE2.Create_Arglist;
OLE2.add_arg(xLst, filename);
Book:=OLE2.INVOKE_OBJ(Workbooks,'Open',xLst);
OLE2.destroy_arglist(xLst);
exception
WHEN OLE2.OLE_ERROR THEN
Book:=OLE2.INVOKE_OBJ(Workbooks,'Add');
File_new:=true;
OLE2.destroy_arglist(xLst);
end;
OLE2.Set_Property(m_app,'DisplayAlerts',-1);
Excel.INVOKE(Book,'Activate');
worksheets := Excel.GetProperty(Book, 'Worksheets');
n:=Excel.GetProperty(worksheets,'Count');
if File_new=False then
trg_id:=find_group('TEMP_PAGE_GROUP');
if not Id_null(trg_id) then
Delete_group(trg_id);
end if;
trg_id := Create_Group('TEMP_PAGE_GROUP');
tgc_id := Add_Group_Column(trg_id, 'CID', CHAR_COLUMN,10);
tgc_id := Add_Group_Column(trg_id, 'NAME', CHAR_COLUMN,150);
IF NOT Id_Null(trg_id) THEN
Current_page_name:='';
FOR i IN 1..n LOOP
Sheet := Excel.GetProperty( Book,'Worksheets',i);
Current_page_name := OLE2.Get_Char_Property( Sheet,'NAME');
Excel.Release(Sheet);
Add_Group_Row( trg_id, i );
Set_Group_Char_Cell( 'TEMP_PAGE_GROUP.CID', i, to_char(i));
Set_Group_Char_Cell( 'TEMP_PAGE_GROUP.NAME', i, Current_page_name);
END LOOP;
Add_Group_Row( trg_id, n+1 );
Set_Group_Char_Cell( 'TEMP_PAGE_GROUP.CID', n+1, to_char(n+1));
Set_Group_Char_Cell( 'TEMP_PAGE_GROUP.NAME', n+1, 'New page');
Current_page_name:=GET_GROUP_CHAR_CELL('TEMP_PAGE_GROUP.NAME', 1);
WIN_LOV_POSITION('LOV_PAGE');
SET_LOV_PROPERTY('LOV_PAGE',GROUP_NAME,'TEMP_PAGE_GROUP');
SET_LOV_PROPERTY('LOV_PAGE',TITLE,'Choose page Excel (Cancel :'||Current_page_name||')');
SET_APPLICATION_PROPERTY(CURSOR_STYLE,'default');
Current_page:=1;
IF show_lov('LOV_PAGE')=TRUE THEN
Current_page:=:COMMON_BLOCK.CURRENT_PG;
end if;
END IF;
if not Id_null(trg_id) then
Delete_group(trg_id);
end if;
end if;
SET_APPLICATION_PROPERTY(CURSOR_STYLE,'busy');
If n>=Current_page Then
Sheet := Excel.GetProperty( Book,'Worksheets',Current_page);
Excel.Invoke( Sheet,'Activate' );
Cells := Excel.GetProperty( Sheet,'Cells');
Excel.Invoke( Cells,'Clear' );
Else
Sheet:=OLE2.INVOKE_OBJ(worksheets,'Add');
Excel.Invoke( Sheet,'Activate' );
End If;
SET_APPLICATION_PROPERTY(CURSOR_STYLE,'busy');
Message('Ouput to Excel ...', NO_ACKNOWLEDGE);
synchronize;
OLE2.Set_Property(Sheet,'Name',cTitle);
Excel.SetRangeProperty(Sheet,'Columns','A:AC','NumberFormat','@');
n:=1;
Excel.SetRangeValue(Sheet,'C'||to_char(n),'By filter:');
Excel.SetRangeFont(sheet, 'Range','C'||to_char(n),'Bold',-1);
If not B_POS_MAIN.Filter_txt is null Then
Excel.SetRangeValue(Sheet,'D'||to_char(n),substr(B_POS_MAIN.Filter_txt,1,255));
Excel.SetRangeFont(sheet, 'Range','D'||to_char(n),'Italic',-1);
Excel.SetRangeFont(sheet, 'Range','D'||to_char(n),'ColorIndex',9);
end if;
Excel.SetRangeFont(sheet, 'Rows','1:1','Size',8);
n:=n+1;
Excel.SetRangeValue(Sheet,'A'||to_char(n),'col1');
Excel.SetRangeValue(Sheet,'B'||to_char(n),'col2');
Excel.SetRangeValue(Sheet,'C'||to_char(n),'col3');
Excel.SetRangeValue(Sheet,'D'||to_char(n),'col3');
Excel.SetRangeValue(Sheet,'E'||to_char(n),'col');
Excel.SetRangeValue(Sheet,'F'||to_char(n),'col');
Excel.SetRangeValue(Sheet,'G'||to_char(n),'col');
Excel.SetRangeValue(Sheet,'H'||to_char(n),'col');
Excel.SetRangeValue(Sheet,'I'||to_char(n),'col');
Excel.SetRangeValue(Sheet,'J'||to_char(n),'col');
Excel.SetRangeValue(Sheet,'K'||to_char(n),'col');
Excel.SetRangeValue(Sheet,'L'||to_char(n),'col');
Excel.SetRangeValue(Sheet,'M'||to_char(n),'col');
Excel.SetRangeValue(Sheet,'N'||to_char(n),'col');
Excel.SetRangeValue(Sheet,'O'||to_char(n),'col');
Excel.SetRangeValue(Sheet,'P'||to_char(n),'col');
Excel.SetRangeValue(Sheet,'Q'||to_char(n),'col');
Excel.SetRangeValue(Sheet,'R'||to_char(n),'col');
Excel.SetRangeValue(Sheet,'S'||to_char(n),'col');
Excel.SetRangeValue(Sheet,'T'||to_char(n),'col');
Excel.SetRangeValue(Sheet,'U'||to_char(n),'col');
Excel.SetRangeValue(Sheet,'V'||to_char(n),'col');
Excel.SetRangeValue(Sheet,'W'||to_char(n),'col');
Excel.SetRangeValue(Sheet,'X'||to_char(n),'col');
Excel.SetRangeValue(Sheet,'Y'||to_char(n),'col');
Excel.SetRangeValue(Sheet,'Z'||to_char(n),'col');
Excel.SetRangeValue(Sheet,'AA'||to_char(n),'col');
Excel.SetRangeValue(Sheet,'AB'||to_char(n),'col');
Excel.SetRangeValue(Sheet,'AC'||to_char(n),'POS_ID');
Excel.SetRangeFont(sheet, 'Rows',to_char(n)||':'||to_char(n),'Size',9);
Excel.SetRangeFont(sheet, 'Rows',to_char(n)||':'||to_char(n),'Bold',-1);
n:=n+1;
for jj in 1..NN_GR LOOP
grPOS:=GET_GROUP_NUMBER_CELL('GR_EXCL.POS_ID', jj);
for jP_ in curPOS(grPOS) loop
If Not jP_.plant_id is null Then
Excel.SetRangeValue(Sheet,'A'||to_char(n),FS_GET_PLANTNAME(jP_.plant_id,11));
End If;
If Not jP_.unit_id is null Then
Excel.SetRangeValue(Sheet,'B'||to_char(n),FS_GET_UNITNAME(jP_.unit_id));
End If;
If Not jP_.iden is null Then
Excel.SetRangeValue(Sheet,'C'||to_char(n),jP_.iden);
End If;
If Not jP_.name is null Then
Excel.SetRangeValue(Sheet,'D'||to_char(n),jP_.name);
End If;
If Not jP_.object_sh is null Then
Excel.SetRangeValue(Sheet,'E'||to_char(n),jP_.object_sh);
End If;
If Not jP_.depart is null Then
Excel.SetRangeValue(Sheet,'F'||to_char(n),jP_.depart);
End If;
If Not jP_.gsystem_id is null Then
Excel.SetRangeValue(Sheet,'G'||to_char(n),FS_GET_GSYSTEMNAME(jP_.gsystem_id,11));
End If;
If Not jP_.kind_id is null Then
Excel.SetRangeValue(Sheet,'H'||to_char(n),FS_GET_KINDNAMEu(jP_.kind_id));
End If;
If Not jP_.ptype_id is null Then
Excel.SetRangeValue(Sheet,'I'||to_char(n),FS_GET_TYPENAME(jP_.ptype_id));
End If;
If jP_.svb=-1 Then
Excel.SetRangeValue(Sheet,'J'||to_char(n),'col18');
else
Excel.SetRangeValue(Sheet,'J'||to_char(n),'not');
End If;
If Not jP_.opb is null Then
Excel.SetRangeValue(Sheet,'K'||to_char(n),jP_.opb);
End If;
If Not jP_.PNAE is null Then
Excel.SetRangeValue(Sheet,'L'||to_char(n),jP_.PNAE);
End If;
If Not jP_.set_date is null Then
Excel.SetRangeValue(Sheet,'M'||to_char(n),to_char(jP_.set_date,'dd.mm.yyyy'));
End If;
If Not jP_.tc_years is null Then
Excel.SetRangeValue(Sheet,'N'||to_char(n),jP_.tc_years);
End If;
If Not jP_.tc_date is null Then
Excel.SetRangeValue(Sheet,'O'||to_char(n),to_char(jP_.tc_date,'dd.mm.yyyy'));
End If;
If Not jP_.PROL_TXT is null Then
Excel.SetRangeValue(Sheet,'P'||to_char(n),jP_.PROL_TXT);
End If;
If Not jP_.FACTORY_NUM is null Then
Excel.SetRangeValue(Sheet,'Q'||to_char(n),jP_.FACTORY_NUM);
End If;
If Not jP_.COMPNAME is null Then
Excel.SetRangeValue(Sheet,'R'||to_char(n),jP_.COMPNAME);
End If;
If Not jP_.BUILDING is null Then
Excel.SetRangeValue(Sheet,'S'||to_char(n),jP_.BUILDING);
End If;
If Not jP_.ROOM is null Then
Excel.SetRangeValue(Sheet,'T'||to_char(n),jP_.ROOM);
End If;
If Not jP_.LEV is null Then
Excel.SetRangeValue(Sheet,'U'||to_char(n),jP_.LEV);
End If;
If Not jP_.import_date is null Then
Excel.SetRangeValue(Sheet,'V'||to_char(n),to_char(jP_.import_date,'dd.mm.yyyy'));
End If;
If jP_.is_ready=-1 Then
Excel.SetRangeValue(Sheet,'W'||to_char(n),'Äà');
End If;
If Not jP_.edit_date is null Then
Excel.SetRangeValue(Sheet,'X'||to_char(n),to_char(jP_.edit_date,'dd.mm.yyyy'));
End If;
If Not jP_.USER_NAME is null Then
Excel.SetRangeValue(Sheet,'Y'||to_char(n),jP_.USER_NAME);
End If;
If Not jP_.SYSTEM_SH is null Then
Excel.SetRangeValue(Sheet,'AA'||to_char(n),jP_.SYSTEM_SH);
End If;
If Not jP_.SUBSYSTEM_SH is null Then
Excel.SetRangeValue(Sheet,'AB'||to_char(n),jP_.SUBSYSTEM_SH);
End If;
end loop; -- curPOS
If Not grPOS is null Then
Excel.SetRangeValue(Sheet,'AC'||to_char(n),grPOS);
End If;
if mod(jj,Round(NN_GR/10))=0 then
Message('Exported records : '||to_char(jj), NO_ACKNOWLEDGE);
SYNCHRONIZE;
end if;
n:=n+1;
End Loop;
Message('Exported records : '||to_char(NN_GR), NO_ACKNOWLEDGE);
SYNCHRONIZE;
first_record;
Excel.SetRangeFont(sheet, 'Rows','3:'||to_char(n),'Size',8);
Excel.SetRangeProperty(Sheet,'Rows','1:1','WrapText',-1);
Excel.SetRangeProperty(Sheet,'Columns','A:AC','VerticalAlignment',-4160); --xlTop
Excel.SetRangeProperty(Sheet,'Columns','A:AC','Autofit',-1);
Excel.SetRangeProperty(Sheet,'Columns','A:AC','WrapText',-1);
for i in 1..30 loop
if Excel.GetRangeProperty(Sheet,'Columns',EXCEL.EXCEL_S_BU(i)||':'||EXCEL.EXCEL_S_BU(i),'ColumnWidth')>50 then
Excel.SetRangeProperty(Sheet,'Columns',EXCEL.EXCEL_S_BU(i)||':'||EXCEL.EXCEL_S_BU(i),'ColumnWidth',50);
end if;
end loop;
Excel.SetRangeProperty(Sheet,'Rows','2:'||to_char(n),'Autofit',-1);
SET_APPLICATION_PROPERTY(CURSOR_STYLE,'DEFAULT');
Excel.Invoke(Book,'SaveAs',filename);
Excel.Release(Cells);
Excel.Release(Sheet);
Excel.Release(worksheets);
Excel.Invoke(Book,'Close');
Excel.Release(Book);
Excel.Release(Workbooks);
Excel.Invoke( m_app,'Quit' );
Excel.Release(m_app);
FS_SET_EXCEL_LOG(:global.USER_ID,filename,:System.Current_Form,B_POS_MAIN.Filter_txt,NN_GR);
Message(' ', NO_ACKNOWLEDGE);
Message_all('Output to file '||filename||' finished!');
SHOW_WEB_DOC(filename);
exception
WHEN OLE2.OLE_ERROR THEN
Message(' ', NO_ACKNOWLEDGE);
SET_APPLICATION_PROPERTY(CURSOR_STYLE,'DEFAULT');
message_all('OLE Error ...');
Excel.Release(Cells);
Excel.Release(Sheet);
Excel.Release(worksheets);
Excel.Invoke(Book,'Close');
Excel.Release(Book);
Excel.Release(Workbooks);
Excel.Invoke( m_app,'Quit');
Excel.Release(m_app);
when others then
Message(' ', NO_ACKNOWLEDGE);
SET_APPLICATION_PROPERTY(CURSOR_STYLE,'DEFAULT');
message_all(DBMS_error_code||chr(13)||DBMS_error_text||chr(13)||error_code||chr(13)||error_text);
Message(' ', NO_ACKNOWLEDGE);
End;
How to fix this error?