Home » Developer & Programmer » Forms » CLIENT_OLE2.CREATE_OBJ('Excel.Application') not working (Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod, Windows XP)
CLIENT_OLE2.CREATE_OBJ('Excel.Application') not working [message #408296] Mon, 15 June 2009 11:36 Go to next message
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 #408429 is a reply to message #408296] Tue, 16 June 2009 03:29 Go to previous messageGo to next message
waqasbhai
Messages: 118
Registered: August 2008
Location: Pakistan
Senior Member
any help...?
Re: CLIENT_OLE2.CREATE_OBJ('Excel.Application') not working [message #409482 is a reply to message #408429] Mon, 22 June 2009 20:29 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have you solved your problem? Are you receiving any message(s)?

If you place a 'message' before each 'pause' does this change the behaviour?

David
Re: CLIENT_OLE2.CREATE_OBJ('Excel.Application') not working [message #409578 is a reply to message #408296] Tue, 23 June 2009 03:15 Go to previous messageGo to next message
waqasbhai
Messages: 118
Registered: August 2008
Location: Pakistan
Senior Member
No i haven't find the solution yet but i think there is a problem with the config of webutil coz it is unable to find some .dll's. I was away from the work for few days but now i am having a look to the config document in order to configure the webutil properly
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 messageGo to next message
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 #409753 is a reply to message #409655] Tue, 23 June 2009 20:07 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Is this your first form?

Is this the first 'webutil' form that you have built?

Have you run the 'test' form for webutil yet?

Search this forum for 'jacob.dll' and also 'signing'.

David
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 messageGo to next message
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 #410025 is a reply to message #409822] Wed, 24 June 2009 21:14 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Get the 'test' form working.

David
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 messageGo to next message
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 #410250 is a reply to message #410106] Thu, 25 June 2009 19:42 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Search this forum for 'FRM-92101 There was failure in the forms server startup.' or google it. The search engine appears to be acting wierdly but hopefully will be okay when you use it.

Do you have the 'oc4j' running? Also do a Ctrl-Shft-k and then Ctrl-t before running the form.

David
Re: CLIENT_OLE2.CREATE_OBJ('Excel.Application') not working [message #410591 is a reply to message #408296] Mon, 29 June 2009 03:00 Go to previous messageGo to next message
waqasbhai
Messages: 118
Registered: August 2008
Location: Pakistan
Senior Member
Quote:

Do you have the 'oc4j' running?


Yes
Quote:

Also do a Ctrl-Shft-k and then Ctrl-t before running the form


I already did that
Re: CLIENT_OLE2.CREATE_OBJ('Excel.Application') not working [message #410622 is a reply to message #408296] Mon, 29 June 2009 05:15 Go to previous messageGo to next message
waqasbhai
Messages: 118
Registered: August 2008
Location: Pakistan
Senior Member
ok 'FRM-92101' has resolved. Actually there was a space comming up in my working directory path.
Now lets come back to the main issue, WUC-24.
Re: CLIENT_OLE2.CREATE_OBJ('Excel.Application') not working [message #410735 is a reply to message #410622] Tue, 30 June 2009 00:54 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I repeat: Get the 'test' form working.

David
Re: CLIENT_OLE2.CREATE_OBJ('Excel.Application') not working [message #410778 is a reply to message #408296] Tue, 30 June 2009 03:52 Go to previous messageGo to next message
waqasbhai
Messages: 118
Registered: August 2008
Location: Pakistan
Senior Member
Quote:
Get the 'test' form working

What do you mean by this?
Re: CLIENT_OLE2.CREATE_OBJ('Excel.Application') not working [message #410881 is a reply to message #410778] Tue, 30 June 2009 21:08 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
In Forms 10g, there is a 'test' form. Can you run it?

On the WebUtil page there is a link to the WebUtil demo which contains 'WU_TEST_106.fmb'. Can you run this form successfully?

David
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 messageGo to next message
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 #411084 is a reply to message #410950] Wed, 01 July 2009 19:08 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
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?"

David
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 messageGo to next message
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 #412120 is a reply to message #411162] Tue, 07 July 2009 18:57 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Do you have 'forms90/webutil/' in your 'forms_path'?

David
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 messageGo to next message
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 #412287 is a reply to message #408296] Wed, 08 July 2009 09:16 Go to previous messageGo to next message
waqasbhai
Messages: 118
Registered: August 2008
Location: Pakistan
Senior Member
can you tell me that excatly where these jacob.dll and other dll's should be?
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 messageGo to next message
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?
Re: CLIENT_OLE2.CREATE_OBJ('Excel.Application') not working [message #412639 is a reply to message #408296] Fri, 10 July 2009 04:56 Go to previous messageGo to next message
waqasbhai
Messages: 118
Registered: August 2008
Location: Pakistan
Senior Member
ok i finally got it. Yes the problem was with the virtual directory. I didn't put the dll's in the virtual directory defined in form90.conf
thanks all
Re: CLIENT_OLE2.CREATE_OBJ('Excel.Application') not working [message #413262 is a reply to message #412639] Wed, 15 July 2009 00:59 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Thanks for posting your progress and I'm glad that you solved your problem.

David
Re: CLIENT_OLE2.CREATE_OBJ('Excel.Application') not working [message #506168 is a reply to message #412639] Fri, 06 May 2011 16:10 Go to previous messageGo to next message
gnori
Messages: 1
Registered: May 2011
Junior Member
I am having the same problem.

Forms 11g.

Using webutil, I am able to upload file to database. But reading a excel file hangs at the very first line
MyApplication:=Client_ole2.CREATE_OBJ('EXCEL.Application');


in the forms.conf
--------------------------------------------------
RewriteEngine on
RewriteRule ^/forms/html/(..*) /workaroundhtml/$1 [PT]
AliasMatch ^/workaroundhtml/(..*) "C:\Oracle\Middleware\asinst_1/config/FormsComponent/forms/html/$1"

<Location /forms>
SetHandler weblogic-handler
WebLogicCluster ctms02.us.oracle.com:9001
DynamicServerList OFF
</Location>
----------------------------------------------


What files I have to put in this folder ?
please let me know.

thanks.
Re: CLIENT_OLE2.CREATE_OBJ('Excel.Application') not working [message #565243 is a reply to message #412639] Sat, 01 September 2012 03:51 Go to previous message
deepakmannazhi
Messages: 128
Registered: February 2010
Location: Dubai, UAE
Senior Member

Dear waqasbhai,

Quote:
ok i finally got it. Yes the problem was with the virtual directory. I didn't put the dll's in the virtual directory defined in form90.conf
thanks all


could you please guide me to add virtual directory for dlls
Previous Topic: SET RECORD PROPERTY
Next Topic: CLIENT_OLE2 NOT WORKING IN Forms Version 10.1.2.0.2
Goto Forum:
  


Current Time: Thu Aug 21 07:15:33 CDT 2014

Total time taken to generate the page: 0.10821 seconds