UTIL_FILE.FOPEN
Hi
I am trying to open one file using UTIL_FILE.FOPEN and log the error msgs into the file
But the file is not getting created in the path specified
DECLARE
CURSOR CUR_ERR_HEADER IS
SELECT PRODUCT_CODE || '|' || PRODUCT_CODE_TYPE || '|' ||
PRODUCT_CODE_VARIANT || '|' || PRODUCT_CODE_FRMT || '|' || PRODUCT_NAME || '|' ||
PROD_ATTRIBUTE_CHAR|| '|' || INVENTORY_ITEM_ID || '|' ||
GTIN_NUMBER || '|' || PRODUCT_UOM || '|' ||
LOCATION || '|' || ERROR_MESSAGE || '|' || ERROR_CODE OUTPUT
FROM GE_OPSM_PROD_STG
WHERE BATCH_ID = 42
AND STATUS ='E';
V_ERR_FILE UTL_FILE.FILE_TYPE := NULL;
DET_DESC VARCHAR2(100);
HEADER_DESC VARCHAR2(250);
V_TITLE VARCHAR2(100);
V_CHKERR_CNT NUMBER;
BEGIN
DBMS_OUTPUT.PUT_LINE('Inside Error function');
V_ERR_FILE:= UTL_FILE.FOPEN('/export/home/gemsadmin', 'Dataitem1.dat', 'w', 32767);
DBMS_OUTPUT.PUT_LINE('creating the data file');
FOR CUR_ERR_HEADER_REC IN CUR_ERR_HEADER LOOP
DBMS_OUTPUT.PUT_LINE('Inside Loop');
UTL_FILE.PUT_LINE(V_ERR_FILE, CUR_ERR_HEADER_REC.OUTPUT);
END LOOP;
UTL_FILE.FCLOSE(V_ERR_FILE);
EXCEPTION
WHEN OTHERS THEN
UTL_FILE.FCLOSE(V_ERR_FILE);
END ;
Getting output as
Inside Error function
its not Creating the data file in the path specified. can anyone help out inthis
CUR_ERR_HEADER_REC is cursor variable for cursor CUR_ERR_HEADER.
My apologies I misread above line.Replace like below:
--UTL_FILE.PUT_LINE(V_ERR_FILE, CUR_ERR_HEADER_REC.OUTPUT);
UTL_FILE.PUT_LINE(V_ERR_FILE, 'Inserting Data here');
Are you checking the file in right path? I believe that WRITE access has been given to the user on the directory as you are not getting any exception.
Here is a sample code created for you.Please check it.
--log in as DBA if you privilege AND CREATE THE DIRECTORY
SQL> CREATE OR REPLACE DIRECTORY BI_DIR AS '/export/home/gemsadmin';--specify the path
SQL> GRANT READ, WRITE ON DIRECTORY BI_DIR TO SCOTT;
--PROCEDURE CREATED IN SCOTT SCHEMA
CREATE OR REPLACE PROCEDURE GENERATECSV
AS
ecomm_directory VARCHAR2(30) := 'BI_DIR';
l_filename VARCHAR2 (100) := 'test.csv';
V_ERR_FILE UTL_FILE.FILE_TYPE;
CURSOR CUR_ERR_HEADER IS
SELECT 'A' data FROM DUAL
UNION ALL
SELECT 'B' data FROM DUAL;
BEGIN
v_file := UTL_FILE.FOPEN (ecomm_directory, l_filename, 'W', 32767);
FOR CUR_ERR_HEADER_REC IN CUR_ERR_HEADER LOOP
UTL_FILE.PUT_LINE (V_ERR_FILE, CUR_ERR_HEADER_REC.data);
END LOOP;
UTL_FILE.FFLUSH (V_ERR_FILE);
UTL_FILE.FCLOSE (V_ERR_FILE);
EXCEPTION
WHEN utl_file.invalid_mode THEN
DBMS_OUTPUT.PUT_LINE('Error1:'||SUBSTR(SQLERRM,1,255));
WHEN utl_file.invalid_path THEN
DBMS_OUTPUT.PUT_LINE('Error1:'||SUBSTR(SQLERRM,1,255));
WHEN utl_file.invalid_filehandle THEN
DBMS_OUTPUT.PUT_LINE('Error2:'||SUBSTR(SQLERRM,1,255));
WHEN utl_file.invalid_operation THEN
DBMS_OUTPUT.PUT_LINE('Error3:'||SUBSTR(SQLERRM,1,255));
WHEN utl_file.read_error THEN
DBMS_OUTPUT.PUT_LINE('Error4:'||SUBSTR(SQLERRM,1,255));
WHEN utl_file.write_error THEN
DBMS_OUTPUT.PUT_LINE('Error5:'||SUBSTR(SQLERRM,1,255));
WHEN utl_file.internal_error THEN
DBMS_OUTPUT.PUT_LINE('Error6:'||SUBSTR(SQLERRM,1,255));
END GENERATECSV ;
/--Now you are executing the procedure from SCOTT SCHEMA
SQL> exec GENERATECSV;Regards
Biju
Edited by: biju2012 on Aug 22, 2012 4:42 AM
Similar Messages
-
Using UTL_FILE in NT with network drive
I want to use utl_file for file handling and try to use util_file.fopen for opening file from a mapping network drive (say F with error "Invalid Operation".
I've got no error when I handling file in local drive.
Can anyone help ?
Rgds,
Edward
(ps I've already set the parameter utl_file_dir=*)
nullHello,
In december an Edward TSE had a same kind of problem. I replied to him the following solution after which I was helped.
Instead of using:
declare
fh_lis utl_file.file_type;
begin
fh_lis := utl_file.fopen(
location => '\\caghk8\vtfp2\transfer\',
filename => 'tpx.txt',
open_mode => 'r');
utl_file.fclose(fh_lis);
end;
Use:
declare
fh_lis utl_file.file_type;
begin
fh_lis := utl_file.fopen('\\caghk8\vtfp2\transfer\', 'tpx.txt', 'r');
utl_file.fclose(fh_lis);
end;
He said it worked!
null -
File Permissions on Oracle Directories for other Operating System Users
Hi,
I am trying to export the table data to flat file using a pl/sql function using UTL_FILE package and directories created using 'CREATE DIRECTORY' command. The function is called from a stored procedure which in-turn is called from a Java program using JDBC and the Java process runs as different operating system user. The problem for me is the file exported is being written as 'ORACLE' user with 'OINSTALL' group and '-rw-r--r--' linux file permissions. When I try to read this exported file from the java program it throws me a file access error.
I would like to know if we can specify any additional parameters either in
1) Database parameter file
2) UTIL_FILE.FOPEN function
3) CREATE DIRECTORY command
so that the files written to the DIRECTORY have a read write access.Since you attempting to read the file from Java, you are constrained by the OS.
Write a stored proc to read the file, since PL/SQL does have the correct permissions to read/write to files.
P; -
Opening file for dbms_xmldom
Hello, I'm using Oracle 10g and trying to parse an XML file using dbms_xmldom. How do I retrieve the XML from the UNIX directory? Do I use util_file.fopen?
A_Non wrote:
A pure PL/SQL example, based off Method 4 from [url http://anononxml.blogspot.com/2010/05/one-question-that-comes-up-with-some.html]Basic XML Parsing via PL/SQL would be
(not tested)
And to be even more complete, let's not forget to unescape character entities (if any) :
SQL> DECLARE
2
3 v_doc xmltype := xmltype('<root><name>SMITH&WESSON</name></root>');
4 v_name varchar2(30);
5
6 BEGIN
7
8 v_name := v_doc.extract('/root/name/text()').getStringVal();
9 dbms_output.put_line('name = '||v_name);
10
11 v_name := dbms_xmlgen.convert(
12 v_doc.extract('/root/name/text()').getStringVal()
13 , dbms_xmlgen.ENTITY_DECODE
14 );
15 dbms_output.put_line('name = '||v_name);
16
17 v_name := utl_i18n.unescape_reference(v_doc.extract('/root/name/text()').getStringVal());
18 dbms_output.put_line('name = '||v_name);
19
20 END;
21 /
name = SMITH&WESSON
name = SMITH&WESSON
name = SMITH&WESSON
PL/SQL procedure successfully completed -
Error handler for ORA-29283 - not working
I am running Oracle 9.2.0.4 on HP-UX.
I have a stored procedure which reads a text file. I have set up an execption for error code ORA-29283 (invalid file operation). When I test my procedure (by not having the file to read) my exception handler is bypassed for a general exception error and my procedure terminates.
here's parts of my code:
Declare
file_not_found EXCEPTION;
PRAGMA EXCEPTION_INIT (file_not_found, -29283);
BEGIN
nochourly_file := UTIL_FILE.fopen('/mydirectory','myfile.txt','R');
Loop
begin
UTL_FILE.get_line(nochourly_file, sbuffer);
EXCEPTION
WHEN NO_DATA_FOUND
THEN
GOTO end_of_file;
WHEN file_not_found
THEN
DBMS_OUTPUT.put_line ('Invalid File Operation - file not found');
skip_last_hour_processed;
GOTO end_of_file;
WHEN OTHERS
THEN
err_num := SQLCODE;
err_msg := SUBSTR (SQLERRM, 1, 100);
DBMS_OUTPUT.put_line ('Error ' || TO_CHAR (err_num));
DBMS_OUTPUT.put_line (err_msg);
DBMS_OUTPUT.put_line (sbuffer);
RAISE;
EXIT;
END;
===============
When this fails I expect to see the message
"Invalid file operation - file not found"
which indicates my exception handler was processed.
Instead I see:
SQL> @$HOME/newhourly_dly
Begin processing at 20060627154321
nlasthourprocessed:20060627100000
Last Hour Processed is 20060627100000
BEGIN noc_hourly_daily_load; END;
ERROR at line 1:
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 449
ORA-29283: invalid file operation
ORA-06512: at "HNS.NOC_HOURLY_DAILY_LOAD", line 374
ORA-06512: at line 1
Elapsed: 00:00:00.05
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
Can you explain:
1) what generated the error message since
a. it wasn't my exception handler and
b. it wasn't the "WHEN OTHERS"
2) Why isn't my error handler working?
Please advise.
Thank youHello
Not sure why your exception is being ignored but usually, to be able to handle the UTL_FILE exceptions, you need to explicitly code for each exception declared in the UTL_FILE package i.e.
EXCEPTION
WHEN utl_file.invalid_path THEN
--Do something
WHEN utl_file.invalid_mode THEN
--Do something
WHEN utl_file.invalid_filehandle THEN
--Do something
WHEN utl_file.invalid_operation THEN
--Do something
WHEN utl_file.read_error THEN
--Do something
WHEN utl_file.write_error THEN
--Do something
WHEN utl_file.internal_error THEN
--Do something
END;HTH
David -
Still has ORA-20100 Invalid File Path
I did
SQL> CREATE DIRECTORY sqllog as 'c:\sqllog';
SQL> grant write on directory sqllog to public;
Then on c:\sqllog
i have a file called sqllog.txt
but still gives the same errorHere is your answer. You have to set your initialization parameter 'UTL_FILE_DIR' to 'C:\SQLLOG\'. You have to bounce the database to do that. You cannot use an 'alter system' command.
Drop and recreate your directory.
For example,
CREATE DIRECTORY log_dir AS 'C:\SQLLOG\'.
/* I am really vary about this privilege. You are better off limiting the privilege to a select few.*/
GRANT READ, WRITE ON DIRECTORY log_dir TO PUBLIC;
Make the first parameter to the procedure 'UTIL_FILE.FOPEN' to be 'C:\SQLLOG\'.
It should work and add the word 'NICK' to the file. -
Hi Oracle GURUs ,
I have a problem in outputing the content of a text file on the server using UTIL_FILE .When I execute this code , it is creating PL/SQL procedure successfully but without giving the output ....Here is the code :
DECLARE
DATA_LINE VARCHAR2(50);
FILE_HANDLE UTL_FILE.FILE_TYPE;
BEGIN
FILE_HANDLE := UTL_FILE.FOPEN('D:\WORK', 'TEST', 'R');
UTL_FILE.GET_LINE(FILE_HANDLE,DATA_LINE);
UTL_FILE.FCLOSE(FILE_HANDLE);
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.PUT_LINE('READ PAST EOF');
WHEN OTHERS THEN
UTL_FILE.FCLOSE(FILE_HANDLE);
END;
My guess is that it is rasing WHEN OTHERS exception .....Am I missing something ...Please help......
TIATry to use the following to trap the exception and check if you have setup the parameter utl_file_dir properly ^_^
exception
when utl_file.invalid_path then
dbms_output.put_line('Invalid Path');
when utl_file.invalid_mode then
dbms_output.put_line('Invalid Mode');
when utl_file.invalid_filehandle then
dbms_output.put_line('Invalid Filehandle');
when utl_file.invalid_operation then
dbms_output.put_line('Invalid Operation');
when utl_file.read_error then
dbms_output.put_line('Read Error');
when utl_file.write_error then
dbms_output.put_line('Write Error');
when utl_file.internal_error then
dbms_output.put_line('Internal Error');
Rgds,
Edward -
Util_file package error
Hi ,
I am using util_file package to spool to a csv file in a stored procedure .
when I call this procedure on my loacl machine is woking fine .
But when I call this procedure in the apps oracle database ,I get the following error:
ORA-20003: File could not be opened or operated on as requested.
ORA-06512: at "APPS.WOC_KDE_PREPROCESSOR", line 1032
Please suggest.
Thanks,Here is my code :
CREATE OR REPLACE PACKAGE BODY Woc_KDE_Preprocessor
AS
NAME: Woc_Delete_Model_Data
PURPOSE:
REVISIONS:
Ver Date Author Description
1.0 11/01/2008 gtutika 1. Preprocessor to Spool in CSV file
PROCEDURE KDEPreprocessor(p_con_program_id NUMBER)
IS
v_file UTL_FILE.FILE_TYPE;
l_count NUMBER;
l_product_model VARCHAR2(40);
c_family VARCHAR2(40);
BEGIN
DBMS_OUTPUT.ENABLE(1000000);
DBMS_OUTPUT.PUT_LINE('before');
v_file := UTL_FILE.FOPEN(location => 'EXTRACT_DIR',
filename => 'KDEPreprocessor-'||p_con_program_id||'.csv',
open_mode => 'w',
max_linesize => 32767);
DBMS_OUTPUT.PUT_LINE('after');
UTL_FILE.FCLOSE(v_file);
EXCEPTION
WHEN UTL_FILE.INVALID_PATH THEN
UTL_FILE.FCLOSE(v_file);
RAISE_APPLICATION_ERROR(-20000, 'File location is invalid.');
WHEN UTL_FILE.INVALID_MODE THEN
UTL_FILE.FCLOSE(v_file);
RAISE_APPLICATION_ERROR(-20001, 'The open_mode parameter in FOPEN is invalid.');
WHEN UTL_FILE.INVALID_FILEHANDLE THEN
UTL_FILE.FCLOSE(v_file);
RAISE_APPLICATION_ERROR(-20002, 'File handle is invalid.');
WHEN UTL_FILE.INVALID_OPERATION THEN
dbms_output.put_line('(SQLERRM');
UTL_FILE.FCLOSE(v_file);
RAISE_APPLICATION_ERROR(-20003, 'File could not be opened or operated on as requested.');
-- dbms_output.put_line('(SQLERRM');
WHEN UTL_FILE.READ_ERROR THEN
UTL_FILE.FCLOSE(v_file);
RAISE_APPLICATION_ERROR(-20004, 'Operating system error occurred during the read operation.');
WHEN UTL_FILE.WRITE_ERROR THEN
UTL_FILE.FCLOSE(v_file);
RAISE_APPLICATION_ERROR(-20005, 'Operating system error occurred during the write operation.');
WHEN UTL_FILE.INTERNAL_ERROR THEN
UTL_FILE.FCLOSE(v_file);
RAISE_APPLICATION_ERROR(-20006, 'Unspecified PL/SQL error.');
WHEN UTL_FILE.CHARSETMISMATCH THEN
UTL_FILE.FCLOSE(v_file);
RAISE_APPLICATION_ERROR(-20007, 'A file is opened using FOPEN_NCHAR, but later I/O ' ||
'operations use nonchar functions such as PUTF or GET_LINE.');
WHEN UTL_FILE.FILE_OPEN THEN
UTL_FILE.FCLOSE(v_file);
RAISE_APPLICATION_ERROR(-20008, 'The requested operation failed because the file is open.');
WHEN UTL_FILE.INVALID_MAXLINESIZE THEN
UTL_FILE.FCLOSE(v_file);
RAISE_APPLICATION_ERROR(-20009, 'The MAX_LINESIZE value for FOPEN() is invalid; it should ' ||
'be within the range 1 to 32767.');
WHEN UTL_FILE.INVALID_FILENAME THEN
UTL_FILE.FCLOSE(v_file);
RAISE_APPLICATION_ERROR(-20010, 'The filename parameter is invalid.');
WHEN UTL_FILE.ACCESS_DENIED THEN
UTL_FILE.FCLOSE(v_file);
RAISE_APPLICATION_ERROR(-20011, 'Permission to access to the file location is denied.');
WHEN UTL_FILE.INVALID_OFFSET THEN
UTL_FILE.FCLOSE(v_file);
RAISE_APPLICATION_ERROR(-20012, 'The ABSOLUTE_OFFSET parameter for FSEEK() is invalid; ' ||
'it should be greater than 0 and less than the total ' ||
'number of bytes in the file.');
WHEN UTL_FILE.DELETE_FAILED THEN
UTL_FILE.FCLOSE(v_file);
RAISE_APPLICATION_ERROR(-20013, 'The requested file delete operation failed.');
WHEN UTL_FILE.RENAME_FAILED THEN
UTL_FILE.FCLOSE(v_file);
RAISE_APPLICATION_ERROR(-20014, 'The requested file rename operation failed.');
WHEN OTHERS THEN
UTL_FILE.FCLOSE(v_file);
RAISE;
END;
END;
Show errors;
I do not get any error with local db.But on apps I get
UTL_FILE.INVALID_OPERATION error. -
TEXT_IO.FOPEN not working on web deployed app FORMS 6i
Hi all
I have coded parsing file by using TEXT_IO.GET_LINE but it seems that my file even can't be opened.
declare
file1 text_io.file_type;
filename1 varchar(256);
linebuf varchar2(100);
begin
file1 := TEXT_IO.FOPEN(:CSV.CSV_PATH, 'r');
Text_IO.Get_Line(file1, linebuf);
if linebuf!='blablablablabla' then msg('line is OK!');
else msg('Line is wrong!');
end if;
TEXT_IO.FCLOSE(file1);
end;
On local machine when i enter into :CSV.CSV_PATH "C:\details.txt" the file gets loaded because it gets processing, I can see messages.
When I upload form onto remote web-deployed app server, I enter into path "D:\details.txt" (I cannot write on C:, the files are the same) nothing happens. Does it mean text_io won't work on Fomrs6i web-deployed? How can I investigate this issue.
Thanks in advance
TomeWith Forms Server deployments. TEXT_IO writes the file on the Forms server not the local PC as it did in client-server mode.
Here are some workarounds
1) Download the WEBUTIL add-on from Oracle and use its TEXT_IO package to write to the local file.
WebUtil is an essential add-on loaded with goodies such as a file browse dialog for local files. Its easy to use and is designed to be compatible with other oracle routines like TEXT_IO.
Kudos to Duncan Mills at Oracle for this top add-on - dont leave home without it.
www.oracle.com/technology/products/forms/htdocs/webutil/webutil.htm2) Use the original TEXT_IO (as you are now) to write to a file on the Forms Sever , then display it in a browser window using WEB.SHOW_DOCUMENT
3) I remember seeing some some old Java scripts on OTN to write to local PC.
MY APOLOGIES for #3. Most forum posts can be solved with that little gem of an answer. "My sink is blocked" ... "yeah I saw some java code to fix that" -
How to use Linux Print queue in client_text_io.fopen to print from Windows
We have a forms application deploed on LINUX (Oracle application server 10g).
I have to print a file from local windows PC to a linux Print Queue from forms
I have the following code
PROCEDURE file_to_printer (i_filename_output IN VARCHAR2
,i_network_printer IN VARCHAR2) IS
l_line VARCHAR2(2000);
l_fileid_output client_text_io.file_type;
l_fileid_print client_text_io.file_type;
BEGIN
l_fileid_output := client_text_io.fopen (i_filename_output,'R');
l_fileid_print := client_text_io.fopen (i_network_printer,'W');
WHILE 1 = 1 LOOP
client_text_io.get_line (l_fileid_output, l_line);
client_text_io.put_line (l_fileid_print, l_line);
END LOOP;
EXCEPTION
WHEN NO_DATA_FOUND THEN
client_text_io.fclose (l_fileid_output);
client_text_io.fclose (l_fileid_print);
END file_to_printer;
Everything works fine if I use a windows printer like \\machine\printer.
I want to use a Linux printer and specified the print queue as
\\machine\print_queue_name. It's not working
and I get error ORA-302000 on the following line
l_fileid_print := client_text_io.fopen (i_network_printer,'W');
and if I give only the queue name no error but it's not printing.
Could you please tell me how to use a Linux/Unix print queue in this situationthe simplest way is to edit the interface file (look in /etc/lp/interfaces for existing printers). Each script is
run per print job where stdin has your print data, and stdout is going to your print device. You can just
send the output to a file instead (assuming you can create a file in the windows directory from the solaris
box). If it's a network share, you could use smbclient.
-r -
Client_text_io.fopen causes java.lang.NullPointerException
Hi all
I have the following very simple snippet of code:
declare
f client_text_io.file_type;
begin
f := client_text_io.fopen('C:\test.txt', 'r');
end;
If "C:\Test.txt" does NOT exist on the client, Webutil correctly pops up and complains "Can't open file" etc. But... when the file actually exists and is ready to be opened for read, the following exception is thrown in the console, and nothing happens:
java.lang.NullPointerException: charsetName
at java.io.InputStreamReader.<init>(Unknown Source)
at oracle.forms.webutil.file.FileFunctions.fopen(Unknown Source)
at oracle.forms.webutil.file.FileFunctions.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.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.Window.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.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
2006-feb-23 10:36:18.653 ERROR>WUC-15 [FileFunctions.fopen()] Uventet fejl, undtagelse: java.lang.NullPointerException: charsetName
I have no idea, what goes wrong here.... can anyone help? I use Sun JPI 1.5 on the client.
Thanks in advance.Hi all
I have forms 9.0.4.6 and Webutil 1.0.6
When I use client_text_io.fopen like this:
declare
f client_text_io.file_type;
begin
f := client_text_io.fopen('C:\test.txt', 'r');
end;
I get an error:
ERROR>WUC-15 [FileFunctions.fopen()] Unexpected error, Exception: java.lang.NullPointerException
java.lang.NullPointerException
at sun.io.Converters.getConverterClass(Unknown Source)
at sun.io.Converters.newConverter(Unknown Source)
at sun.io.ByteToCharConverter.getConverter(Unknown Source)
at java.io.InputStreamReader.<init>(Unknown Source)
at oracle.forms.webutil.file.FileFunctions.fopen(FileFunctions.java:413)
at oracle.forms.webutil.file.FileFunctions.getProperty(FileFunctions.java:188)
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.Window.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)
Could anybody help me? I really need to use this. -
CLIENT_TEXT_IO.fopen will not work Error
I keep getting the following -
WebUtil Error: oracle.forms.webutil.file.FileFunctions bean not found. CLIENT_TEXT_IO.fopen will not work.
Nothing I have found on any forum threads has helped me resolve this issue. I believe it has to do w/ configuration. The error occurs in my Development Suite environment I have set up on my laptop. The webutil set up on the Application Server seems to be fine.
I've checked both default.env and formsweb.cfg and both seem to be set correctly. I have the webutil.pll attached to the forms and the webutil.olb in the object library.
I'm using WebUtil 1.0.6 on Oracle 10g (9.0.4).
If anyone has any guidance on this issue, your help is appreciated.The error isn't obvious. The Java Console outputs the following. I went through the webutil docs again and still didn't get the issue resolved. Can you help?
Oracle JInitiator: Version 1.3.1.17
Using JRE version 1.3.1.17-internal Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\localadmin
Proxy Configuration: no proxy
JAR cache enabled
Location: C:\Documents and Settings\localadmin\Oracle Jar Cache
Maximum size: 50 MB
Compression level: 0
Loading http://server.domain.com:8889/forms90/java/f90all_jinit.jar from JAR cache
proxyHost=null
proxyPort=0
connectMode=HTTP, native.
Forms Applet version is : 9.0.4.0
java.lang.ClassNotFoundException: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at oracle.forms.handler.UICommon.instantiate(Unknown Source)
at oracle.forms.handler.UICommon.onCreate(Unknown Source)
at oracle.forms.handler.JavaContainer.onCreate(Unknown Source)
at oracle.forms.engine.Runform.onCreateHandler(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.sendInitialMessage(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) -
Permission denied: fopen('/usr/local/ssl/openssl.cnf'
When installing phone software (CounterPath-Bria3) i get an error message in the system: Permission denied: fopen('/usr/local/ssl/openssl.cnf'..) CounterPath is arguing, they use their own SSL library. Does anybody have an idea, how to fix this?
I don't see what you're seeing in my logs. I did recreate the authorized_keys, and reattempted to connect. As before, this is what I'm getting:
debug1: Next authentication method: publickey
debug1: Offering public key: /Users/zbeckman/.ssh/id_dsa
debug3: sendpubkeytest
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,keyboard-interactive
debug1: Trying private key: /Users/zbeckman/.ssh/identity
debug3: no such identity: /Users/zbeckman/.ssh/identity
debug1: Trying private key: /Users/zbeckman/.ssh/id_rsa
debug3: no such identity: /Users/zbeckman/.ssh/id_rsa
debug2: we did not send a packet, disable method
It seems to me that on my end, we send the public key... and then it just quietly moves on to the next protocol. There is no error message or any indication that something went wrong, or why it would move on to the next protocol.
I've done a cksum on my id_dsa.pub and the remote authorized_keys. They are identical. Both files are owned by me, and readable / writable only by me. -
Invalid_path exception while using UTL_FILE.FOPEN
Hi
I am getting invalid_path exception while using the UTL_FILE.fopen subprogram. I tried finding out the reason but could not solve it. Please help.
Below is my piece of code.
create directory utldr as 'e:\utldir';
declare
f utl_file.file_type;
s varchar2(200);
begin
dbms_output.put_line('1');
f := utl_file.fopen('UTLDR','utlfil.txt','r');
dbms_output.put_line('2');
utl_file.get_line(f,s);
dbms_output.put_line('3');
utl_file.fclose(f);
dbms_output.put_line('4');
dbms_output.put_line(s);
exception
when utl_file.invalid_path then
dbms_output.put_line('invalid_path');
end;
the result is:
1
invalid_pathI am executing it from sys. The same user who created the directory.
The output is as below:
SELECT * FROM dba_directories
OWNER DIRECTORY_NAME DIRECTORY_PATH
SYS MEDIA_DIR d:\avale\rel4\demo\schema\product_media\
SYS LOG_FILE_DIR d:\avale\rel4\assistants\dbca\logs\
SYS DATA_FILE_DIR d:\avale\rel4\demo\schema\sales_history\
SYS EMP_DIR E:\Oracle Directory
SYS REMOTED \\10.1.1.12\oracle directory
SYS UTLDR e:\utldir
SELECT * FROM dba_tab_privs WHERE table_name='UTLDR'
GRANTEE OWNER TABLE_NAME GRANTOR PRIVILEGE GRANTABLE HIERARCHY
PUBLIC SYS UTLDR SYS READ NO NO -
Broken korean characters while using utl_file.fopen
Hi,
I have korean data in a table and I need to extract it out.
Am using utl_file.fopen for this. It extracts, but korean characters are coming broken...
Is there some setting (NLS_LANG etc) that I need to do? I tried NLS_LANG korean_korea.KO16KSC5601 but didn't help...
Thanks,
SachinPlease post this question in the Database forum for an appropriate response: General Database Discussions
Regards,
OTN
Maybe you are looking for
-
Automatically reposition layers/files in a grid by name
I've got about a hundred sets of sliced up pictures. Sliced up into roughly 80 pieces. They've been cut up in a grid fashion and then named logically & numerically by column and row. And saved to individual jpgs. Simple enough, I can just reposition
-
Fix for Apple Mobile Device Services not starting
Finally a fix for Apple Mobile Device Services not starting. Basically I got this from someone else in these forums and it worked. Go to C:\Documents and Settings\AllUsers\Application Data\Apple and delete any file in there that says Apple Mobile Dev
-
Hello, i just began working with discoverer (OLAP plus), dont have much experience so far. My problem is, that i cannot find the "Aggregation tab" on the worksheet properties dialog page, it doesnt appear. Im searching for it, because my aggregations
-
I already own Student Edition CS6 Photoshop Extended and Want to Buy the Design Standard Student
I already own the Student/Teacher Edition CS6 Photoshop Extended and want to buy the Design Standard Student/Teacher edition in order to add In-Design and Illustrator to my Mac. My concern is that, since Photoshop is included in the Design Standard c
-
I have a T450S with windows 8.1. I have noticed that the power profile settings i.e. turn off hard disk, display.. put laptop into suspend etc. are not working. No matter what the settings, the system just stays on. What to do?