配置WEBUTIL后Oracle Form冻结 [英] Oracle Form freezes after configure WEBUTIL
问题描述
我正在使用Oracle表格10g.它是基于Web的Oracle表单应用程序.我想从Oracle Forms 10g生成Excel报表.我配置了WEBUTIL并使用CLIENT_OLE2包.在触发器WHEN-BUTTON-PRESSED中声明的过程.当按下按钮时,表格突然冻结,他们无能为力.退出按钮和菜单选项停止工作.它不给出任何消息,也不执行任何操作.
I am using oracle forms 10g. It is web based oracle form application. I want to generate Excel Report from Oracle Forms 10g. I configured WEBUTIL and use CLIENT_OLE2 package. Procedure declared in trigger WHEN-BUTTON-PRESSED. When button pressed then suddenly the form freezes and they cannot do anything. Exit button and menu options stops working. It does not give any message and does not do any action also.
程序代码:
declare
application client_ole2.obj_type;
workbooks client_ole2.obj_type;
workbook client_ole2.obj_type;
worksheets client_ole2.obj_type;
worksheet client_ole2.obj_type;
cell client_ole2.obj_type;
arglist client_ole2.list_type;
row_num number;
col_num number;
fontObj client_ole2.obj_type;
cursor rec is SELECT so.descr saleorgdescr,ih.invdate invdatemaster, ih.docNUM docnum,
TO_CHAR(ih.invdate,'mon-yyyy') invmonth
FROM ARMINVHEAD ih, SDMSALEORG so
WHERE
ih.status='69'
AND TO_DATE(ih.INVDATE,'DD-MM-RRRR')
BETWEEN
TO_DATE('01-01-2008','DD-MM-RRRR')
AND
TO_DATE('01-01-2009','DD-MM-RRRR')
order by IH.INVDATE, ih.docnum;
procedure SetCellValue(rowid number,colid number,cellValue varchar) is
begin
arglist := client_ole2.create_arglist;
client_ole2.add_arg(arglist,rowid);
client_ole2.add_arg(arglist,colid);
cell:= client_ole2.get_obj_property(worksheet,'Cells',arglist);
fontObj := client_ole2.get_obj_property(cell,'Font');
client_ole2.destroy_arglist(arglist);
client_ole2.set_property(cell,'value',cellValue);
client_ole2.set_property(fontObj,'Size',16);
client_ole2.set_property(fontObj,'BOLD',1);
client_ole2.set_property(fontObj,'ColorIndex',7);
client_ole2.release_obj(cell);
end SetCellValue;
procedure app_init is
begin
application := client_ole2.create_obj('Excel.Application');
client_ole2.set_property(application,'Visible',true);
workbooks := client_ole2.get_obj_property(application,'workbooks');
workbook := client_ole2.Get_Obj_Property(workbooks,'add');
worksheets := client_ole2.get_obj_property(application,'worksheets');
worksheet := client_ole2.Get_Obj_Property(worksheets,'add');
client_ole2.set_property(worksheet,'Name','Emp Sheet');
end app_init;
procedure save_excel(path varchar,filename varchar) is
begin
client_OLE2.Release_Obj(worksheet);
client_OLE2.Release_Obj(worksheets);
-- Save the Excel file created
If path is not null then
Arglist := client_OLE2.Create_Arglist;
client_OLE2.Add_Arg(Arglist,path||'\'||file_name||'.xls');
client_OLE2.Invoke(workbook, 'SaveAs', Arglist);
client_OLE2.Destroy_Arglist(Arglist);
end if;
end save_excel;
begin
app_init;
row_num:=1;
col_num:=1;
SetCellValue(row_num,col_num,'saleorgdescr');
col_num:=col_num + 1;
SetCellValue(row_num,col_num,'invdatemaster');
col_num:=col_num + 1;
SetCellValue(row_num,col_num,'docnum');
col_num:=col_num + 1;
SetCellValue(row_num,col_num,'invmonth');
for i in rec loop
row_num:=row_num + 1;
col_num:=1;
SetCellValue(row_num,col_num,i.saleorgdescr);
col_num:=2;
SetCellValue(row_num,col_num,i.invdatemaster);
col_num:=3;
SetCellValue(row_num,col_num,i.docnum);
col_num:=4;
SetCellValue(row_num,col_num,i.invmonth);
end loop;
save_excel('C:','emp_data');
client_OLE2.Release_Obj(workbook);
client_OLE2.Release_Obj(workbooks);
client_OLE2.Release_Obj(application);
end;
推荐答案
很可能您缺少以下两组之一中列出的文件:
Most probably you're missing the files listed in one of the following two groups :
- 中的个文件
frmwebutil.jar
,jacob.jar
(也许frmall_jinit.jar
也)\forms\java
目录
frmwebutil.jar
,jacob.jar
( perhapsfrmall_jinit.jar
also ) files in the\forms\java
directory
或
or
-
jacob-1.14.3-x86.dll
,JNIsharedstubs.dll
和d2kwut60.dll
C:\Program Files (x86)\Java\jre1.8.0_xxx\bin
目录 中的个文件
jacob-1.14.3-x86.dll
,JNIsharedstubs.dll
andd2kwut60.dll
files in theC:\Program Files (x86)\Java\jre1.8.0_xxx\bin
directory
假设您的 Oracle Fusion Middleware Home 为C:\ORACLE_10g
.如果该目录中不存在它们,那么只需手动将其移动到那里即可.
assuming your Oracle Fusion Middleware Home is C:\ORACLE_10g
. If they do not exist in that directory, it's enough to move them there manually.
- 此外,最好将它们作为
包含在CLASSPATH=C:\ORACLE_10g\forms\java\jacob.jar;C:\ORACLE_10g\forms\java\frmwebutil.jar;
CLASSPATH
中
- Moreover, they are preferred to be included in the
CLASSPATH
asCLASSPATH=C:\ORACLE_10g\forms\java\jacob.jar;C:\ORACLE_10g\forms\java\frmwebutil.jar;
和
and
- 在添加文件时编辑文件
C:\Program Files (x86)\Java\jre1.8.0_xxx\lib\security\java.policy
permission java.security.AllPermission;
到文件底部
在最后一个花括号前加上分号};
- Edit file
C:\Program Files (x86)\Java\jre1.8.0_xxx\lib\security\java.policy
as adding
permission java.security.AllPermission;
to the bottom of the file
just before the last curly brace with a semi-colon};
就在Forms应用程序运行之前,Oracle会提示您对那些文件进行签名.他们需要通过选中always
选项进行签名.
Just before Forms application runs, Oracle prompts you to sign those files. They needed to be signed with checking always
option.
这篇关于配置WEBUTIL后Oracle Form冻结的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!