CLIENT_OLE2.CREATE_OBJ('Excel.Application') not working [message #408296] |
Mon, 15 June 2009 11:36 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
waqasbhai
Messages: 118 Registered: August 2008 Location: Pakistan
|
Senior Member |
|
|
I am using forms 10g.
I am trying to create an excel file using the following code:
PROCEDURE CREATE_EXCEL(TEMP NUMBER) IS
v_alert NUMBER;
v_return BOOLEAN;
v_message DUS.ALERT_MSG.MESSAGE%TYPE:= 'Error occured';
v_title DUS.ALERT_MSG.TITLE%TYPE:='Error';
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.LIST_TYPE;
BEGIN
pause;
application := CLIENT_OLE2.CREATE_OBJ('Excel.Application');
pause;
CLIENT_OLE2.SET_PROPERTY(application, 'Visible', 'false');
workbooks := CLIENT_OLE2.GET_OBJ_PROPERTY(application, 'Workbooks');
workbook := CLIENT_OLE2.GET_OBJ_PROPERTY(workbooks , 'Add');
worksheets := CLIENT_OLE2.GET_OBJ_PROPERTY(workbook , 'Worksheets');
worksheet := CLIENT_OLE2.GET_OBJ_PROPERTY(worksheets , 'Add');
args := CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG(args, 1);
CLIENT_OLE2.ADD_ARG(args, 11);
cell := CLIENT_OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
CLIENT_OLE2.DESTROY_ARGLIST(args);
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', to_char(SYSDATE, 'MM/DD/YYYY'));
CLIENT_OLE2.RELEASE_OBJ(cell);
args := CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG(args, 8);
CLIENT_OLE2.ADD_ARG(args, 1);
cell := CLIENT_OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
CLIENT_OLE2.DESTROY_ARGLIST(args);
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', 'Month - Year');
CLIENT_OLE2.RELEASE_OBJ(cell);
--
-- Saving Document
--
args := CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG(args, :print_mh.file_path);
CLIENT_OLE2.INVOKE(workbook, 'SaveAs', args);
CLIENT_OLE2.DESTROY_ARGLIST(args);
args := CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.INVOKE(workbook, 'Close', args);
CLIENT_OLE2.DESTROY_ARGLIST(args);
CLIENT_OLE2.INVOKE(application, 'Quit');
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);
EXCEPTION WHEN OTHERS THEN
SET_ALERT_PROPERTY ('OK', ALERT_MESSAGE_TEXT,'error: '||sqlerrm||' '||sqlcode);
SET_ALERT_PROPERTY ('OK', TITLE, 'ERROR');
v_ALERT := SHOW_ALERT('OK');
END;
The first pause works fine but i couldn't get to the second pause.
Can anyone help me out.
I already searched the forum and web but couldn't find any solution.
|
|
|
|
|
|
Re: CLIENT_OLE2.CREATE_OBJ('Excel.Application') not working [message #409655 is a reply to message #408296] |
Tue, 23 June 2009 07:21 ![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) |
waqasbhai
Messages: 118 Registered: August 2008 Location: Pakistan
|
Senior Member |
|
|
ok the actual error is:
2009-Jun-23 18:10:35.109 ERROR>WUC-24 [URLDownload.pullFile()] Error reading URL http://master:7778/forms90/webutil/jacob.dll
2009-Jun-23 18:10:35.140 ERROR>WUC-24 [URLDownload.pullFile()] Error reading URL http://master:7778/forms90/webutil/JNIsharedstubs.dll
2009-Jun-23 18:10:35.156 ERROR>WUC-24 [URLDownload.pullFile()] Error reading URL http://master:7778/forms90/webutil/d2kwut60.dll
When i read the error reference provided in the document and checked the resolution for WUC-24 it says that URL should be correct. My first feeling after reading the error was that it was missing .dll's or may be the .dll's are not at the requried path but i am not sure whats wrong with the URL. My URL looks like this:
http://master:7778/forms90/f90servlet?config=du
Any help..?
|
|
|
|
Re: CLIENT_OLE2.CREATE_OBJ('Excel.Application') not working [message #409822 is a reply to message #408296] |
Wed, 24 June 2009 03:31 ![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) |
waqasbhai
Messages: 118 Registered: August 2008 Location: Pakistan
|
Senior Member |
|
|
Quote: |
Is this your first form?
|
If you mean the first form that appears on appplication load then NO. Error actually come when we we press the button that calls another form
Quote: |
Is this the first 'webutil' form that you have built?
|
Yes this is the first form with webutil. The main or the first form do not use webutil
Quote: |
Have you run the 'test' form for webutil yet?
|
No
|
|
|
|
Re: CLIENT_OLE2.CREATE_OBJ('Excel.Application') not working [message #410106 is a reply to message #408296] |
Thu, 25 June 2009 04:49 ![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) |
waqasbhai
Messages: 118 Registered: August 2008 Location: Pakistan
|
Senior Member |
|
|
hold on. suddenly an error start showing me up. When i run the application it says:
FRM-92101 There was a failure in the forms server startup. This could happen due to the invalid configuration.
The complete stack trace is:
oracle.forms.net.ConnectionException: Forms session <1> failed during startup: no response from runtime process
at oracle.forms.net.HTTPNStream.getInfoFromServlet(Unknown Source)
at oracle.forms.net.HTTPNStream.<init>(Unknown Source)
at oracle.forms.net.HTTPConnection.connect(Unknown Source)
at oracle.forms.engine.FormsDispatcher.initConnection(Unknown Source)
at oracle.forms.engine.FormsDispatcher.init(Unknown Source)
at oracle.forms.engine.Runform.initConnection(Unknown Source)
at oracle.forms.engine.Runform.startRunform(Unknown Source)
at oracle.forms.engine.Main.createRunform(Unknown Source)
at oracle.forms.engine.Main.start(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
|
|
|
|
|
|
|
|
|
Re: CLIENT_OLE2.CREATE_OBJ('Excel.Application') not working [message #410950 is a reply to message #408296] |
Wed, 01 July 2009 04:13 ![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) |
waqasbhai
Messages: 118 Registered: August 2008 Location: Pakistan
|
Senior Member |
|
|
ok yes the form is running but it gives me the same error on first form load
2009-Jul-01 15:08:34.564 ERROR>WUC-24 [URLDownload.pullFile()] Error reading URL http://ecs-master:7778/forms90/webutil/jacob.dll
2009-Jul-01 15:08:34.627 ERROR>WUC-24 [URLDownload.pullFile()] Error reading URL http://ecs-master:7778/forms90/webutil/JNIsharedstubs.dll
2009-Jul-01 15:08:34.674 ERROR>WUC-24 [URLDownload.pullFile()] Error reading URL http://ecs-master:7778/forms90/webutil/d2kwut60.dll
And when i try to create a word file it gives the exception:
java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.jacob)
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.checkLink(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.jacob.com.Dispatch.<clinit>(Dispatch.java:537)
at oracle.forms.webutil.ole.OleFunctions.create_obj(OleFunctions.java:398)
at oracle.forms.webutil.ole.OleFunctions.getProperty(OleFunctions.java:189)
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.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
|
|
|
|
Re: CLIENT_OLE2.CREATE_OBJ('Excel.Application') not working [message #411162 is a reply to message #408296] |
Thu, 02 July 2009 03:38 ![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) |
waqasbhai
Messages: 118 Registered: August 2008 Location: Pakistan
|
Senior Member |
|
|
Quote: |
For the last time: "On the WebUtil page there is a link to the WebUtil demo which contains 'WU_TEST_106.fmb'. Can you run this form successfully?"
|
thats what i wrote in my last post. Form is running but as form runs it gives me the same WUC-24 error and when i try to create word file using OLE it gives me the exception which i wrote in my last post
|
|
|
|
Re: CLIENT_OLE2.CREATE_OBJ('Excel.Application') not working [message #412198 is a reply to message #408296] |
Wed, 08 July 2009 03:46 ![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) |
waqasbhai
Messages: 118 Registered: August 2008 Location: Pakistan
|
Senior Member |
|
|
are you talking about default.env classpath? if yes then this is my default.env enteries:
CLASSPATH=c:\ora10gAS\j2ee\OC4J_BI_Forms\applications\forms90app\forms90web\WEB-INF\lib\f90srv.jar;c:\ora10gAS\jlib\repository.jar;c: \ora10gAS\jlib\ldapjclnt9.jar;c:\ora10gAS\jlib\debugger.jar;c:\ora10gAS\jlib\ewt3.jar;c:\ora10gAS\jlib\share.jar;c:\ora10gAS\jlib\utj 90.jar;c:\ora10gAS\jlib\zrclient.jar;c:\ora10gAS\reports\jlib\rwrun.jar;C:\ora10gAS\forms90\java\frmwebutil.jar;
WEBUTIL_CONFIG=C:\ora10gAS\forms90\server\webutil.cfg
I am getting the feeling that i might be using the wrong file seperator. Should it be '/' or '\'?
|
|
|
|
Re: CLIENT_OLE2.CREATE_OBJ('Excel.Application') not working [message #412318 is a reply to message #408296] |
Wed, 08 July 2009 11:43 ![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) |
waqasbhai
Messages: 118 Registered: August 2008 Location: Pakistan
|
Senior Member |
|
|
after searcing i found that i was doing something wrong in the chapter 2.5 of http://www.oracle.com/technology/products/forms/htdocs/webutil/web_util.pdf
This chapter says that a virtual directory is requrie. Now my question is that which orion-web.xml should i use to identify the virtual path? I search for orion-web.xml in ORACLE_HOME and i found 45 files there. I think that might be the problem so please guide me to the exact file.
I already made the changes in C:\ora10gAS\forms90\j2ee\orion-web.xml and it looks like this:
<virtual-directory virtual-path="/java"
real-path="c:\ora10gAS\forms90\java" />
<virtual-directory virtual-path="/jinitiator"
real-path="c:\ora10gAS\jinit" />
<virtual-directory virtual-path="/html"
real-path="c:\ora10gAS\tools\web90\html" />
<virtual-directory virtual-path="/webutil"
real-path="C:\ora10gAS\forms90\webutil" />
but now i am getting the feeling that i might by using the wrong orion-web.xml. Is it so?
|
|
|
|
|
|
|