Working with Excel using form 11g [message #629214] |
Thu, 04 December 2014 08:21 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
mm_kanish05
Messages: 493 Registered: January 2007 Location: Chennai
|
Senior Member |
![mm_kanish05%40yahoo.co.in](/forum/theme/orafaq/images/yahoo.png)
|
|
Dear Expert,
I am working with form 11g (11.1.2.2.0).
I have developed a form where it have a button and it is having the following code
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;
args client_ole2.OBJ_TYPE;
ctr NUMBER(12);
cols NUMBER(2);
name_var1 VARCHAR2(2000);
name_var2 VARCHAR2(2000);
name_var3 VARCHAR2(2000);
name_var4 VARCHAR2(2000);
filename varchar2(100);
PROCEDURE OLEARG IS
args ole2.OBJ_TYPE;
BEGIN
args := client_ole2.CREATE_ARGLIST;
client_ole2.add_arg(args,ctr); -- row value
client_ole2.add_arg(args,cols); -- column value
cell := client_ole2.GET_OBJ_PROPERTY(worksheet,'Cells',args); -- initializing cell
client_ole2.destroy_arglist(args);
END;
BEGIN
T_MSG('SHOW_MSG',3);
filename := webutil_file.file_OPEN_dialog(GET_SYS_PARAM_VAL('UP_FILE_DIR'),NULL,'All Files (*.*)|*.*','Open File');
T_MSG('SHOW_MSG',2);
application := client_ole2.CREATE_OBJ('Excel.Application');
T_MSG('SHOW_MSG',4);
client_ole2.set_property(application,'Visible','false');
T_MSG('SHOW_MSG',5);
workbooks := client_ole2.GET_OBJ_PROPERTY(application, 'Workbooks');
T_MSG('SHOW_MSG',6);
args := client_ole2.CREATE_ARGLIST;
client_ole2.add_arg(args,filename); --'c:\13s002.xls'); -- file path and name
workbook := client_ole2.GET_OBJ_PROPERTY(workbooks,'Open',args);
T_MSG('SHOW_MSG',7);
client_ole2.destroy_arglist(args);
args := client_ole2.CREATE_ARGLIST;
client_ole2.add_arg(args,'Sheet1');
T_MSG('SHOW_MSG',8);
worksheet := client_ole2.GET_OBJ_PROPERTY(workbook,'Worksheets',args);
client_ole2.destroy_arglist(args);
T_MSG('SHOW_MSG',9);
ctr := 2; --row number
cols := 1; -- column number
OLEARG;
name_var1 := client_ole2.get_char_property(cell,'Value'); --cell value of the argument
T_MSG('SHOW_MSG',name_var1);
cols := cols+1;
client_ole2.INVOKE(application,'Quit');
client_ole2.RELEASE_OBJ(cell);
client_ole2.RELEASE_OBJ(worksheet);
client_ole2.RELEASE_OBJ(worksheets);
client_ole2.RELEASE_OBJ(workbook);
client_ole2.RELEASE_OBJ(workbooks);
client_ole2.RELEASE_OBJ(application);
END;
When I am running the form, I am getting the following messge
Message with '3'
Message with '2'
after the message 2, the rest of the codeing is not working and I am getting the following error in Java console
Forms Session ID is WLS_FORMS.formsapp.9
The proxy host is null, and the proxy port is 0.
Native HTTP implementation is being used for the connection.
The connection mode is HTTP.
Forms Applet version is 11.1.2.2
Exception in thread "AWT-EventQueue-2" java.lang.ExceptionInInitializerError
at oracle.forms.webutil.ole.OleFunctions.create_obj(Unknown Source)
at oracle.forms.webutil.ole.OleFunctions.getProperty(Unknown Source)
at oracle.forms.handler.UICommon.onGet(Unknown Source)
at oracle.forms.engine.Runform.onGetHandler(Unknown Source)
at oracle.forms.engine.Runform.processMessage(Unknown Source)
at oracle.forms.engine.Runform.processSet(Unknown Source)
at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
at oracle.forms.engine.Runform.onMessage(Unknown Source)
at oracle.forms.engine.Runform.processEventEnd(Unknown Source)
at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission jacob.dll.path read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at com.jacob.com.LibraryLoader.loadJacobLibrary(LibraryLoader.java:143)
at com.jacob.com.ComThread.<clinit>(ComThread.java:167)
... 32 more
Kindly guide me to recover from this issue.
Thanks in advance.
Regards,
Kanish
|
|
|
|
Re: Working with Excel using form 11g [message #629241 is a reply to message #629221] |
Thu, 04 December 2014 23:42 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
mm_kanish05
Messages: 493 Registered: January 2007 Location: Chennai
|
Senior Member |
![mm_kanish05%40yahoo.co.in](/forum/theme/orafaq/images/yahoo.png)
|
|
Dear CraigB
Thanks you for you valuable response.
A small general insight about our environment.
-----------------------------
We have two application servers for active and passive purpose.
This servers has been configured through web tire access.
--------------------------------
Quote:What is your OS version?
Server OS: Windows 2008
Client OS: Windows 7
Quote:What is your Browser version?
Browser version : IE 8
Quote:What is your Java version?
Java version : Java 6
Quote:What is your MS-Office version?
Office version : 2010
Quote:Are you running your form from the Forms Builder or from the Application Server?
Running from the application server
---------Additional input-------------
My server is 64 bit and client is 32 bit
----------Configuration details----------
we tried with the following all information
jacob.jar
jacob-1.14.3.jar
We tried with both two version of jar.
archive=frmall.jar,frmwebutil.jar,rtaicon.jar,myfirstjar.jar,jacob.jar
WebUtilArchive=jacob.jar,frmwebutil.jar
WebUtilLogging=off
WebUtilLoggingDetail=normal
WebUtilErrorMode=Alert
WebUtilDispatchMonitorInterval=5
WebUtilTrustInternal=true
WebUtilMaxTransferSize=16384
for 32 bit
jacob-1.14.3-x86.dll
jacob-1.18-M2-x86.dll
for 64 bit
jacob-1.14.3-x64.dll
jacob-1.18-M2-x64.dll
in webutil config file we used
install.syslib.0.0.7.1=jacob-1.14.3-x86.dll|102400|1.14.3|true
install.syslib.0.1.7.1=jacob-1.14.3-x64.dll|117760|1.14.3|true
install.syslib.0.0.9.1=JNIsharedstubs.dll|45056|1.0|true
install.syslib.0.1.9.1=JNIsharedstubs.dll|58368|1.0|true
install.syslib.0.0.9.2=d2kwut60.dll|81920|1.0|true
install.syslib.0.1.9.2=d2kwut60.dll|102400|1.0|true
install.syslib.0.user.1=ffisamp.dll|40960|1.0|true
transfer.database.enabled=TRUE
transfer.appsrv.enabled=TRUE
transfer.appsrv.workAreaRoot=c:\temp
transfer.appsrv.accessControl=TRUE
#List transfer.appsrv.read.<n> directories
transfer.appsrv.read.1=Z:\Repout
transfer.appsrv.read.2=D:\Report_temp\Repout
#List transfer.appsrv.write.<n> directories
transfer.appsrv.write.1=c:\temp
Kindly help me to get rid from this issue.
kanish
[Updated on: Thu, 04 December 2014 23:43] Report message to a moderator
|
|
|
|
|
|
|