Fileaccess.HttpUploadBean not uploading file in DataBase Table

Hi,
I am using fileaccess.HttpUploadBean to upload the txt file in the specified database table.i have followed all the guidelines given in Oracle JSP Tag Libraries and Utilities Reference Guide. But i am not be able to upload the file into Database Table
I have created a table
CREATE TABLE FLK_CLOB_TEST (
FILE_ID NUMBER (5),
FILE_DATA CLOB,
FILE_NAME VARCHAR2 (50),
FILE_PREFIX VARCHAR2 (50) ) ;
uploadfile.jsp
<html><body>
<form name = "formname" action="beanUploadDataBase.jsp" method=POST ENCTYPE="multipart/form-data" />
<br>MailID: <INPUT TYPE="text" NAME="strMailId" />
<br> File to upload: <INPUT TYPE="FILE" NAME="File" SIZE="50" MAXLENGTH="120" >
<br><INPUT TYPE="Submit" NAME="Submit" VALUE="Send" >
<INPUT type="reset" name="reset" value = "Cancel">
</form>
</body></html>
beanUploadDataBase.jsp , which is having upload code.
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ page language="java"
import="java.util.*,java.io.*,java.sql.*, oracle.jsp.webutil.fileaccess.*" %>
<html><body>
<Form name="upForm" method ="post" > <!--action ="beanUploadExample.jsp" >-->
<%
Connection conn;
FlkOracleDBCon objDBHelper;
objDBHelper = FlkOracleDBCon.getInstance();
String userdir = "test";
String strFlag = "";
String strFileName ="";
String strDirName ="";
String strAbsoluteName ="";
//MultipartRequest multi = null;
String _PageMode = "";//"CREATE";
%>
<jsp:useBean id="upbean"
class="oracle.jsp.webutil.fileaccess.HttpUploadBean" >
<jsp:setProperty name="upbean" property="destination" value="<%=userdir%>"/>
</jsp:useBean>
<%
try{
conn = objDBHelper.getConnection();
out.println("Connection Value is :"+conn);
if (conn !=null)
// upbean.setDestination("test");
upbean.setDestinationType("database");
upbean.setConnection(conn);
upbean.setOverwrite(false);
upbean.setFileType("character");
upbean.setTable("FLK_CLOB_TEST");
upbean.setPrefixColumn("File_Prefix");
upbean.setFileNameColumn("File_Name");
upbean.setDataColumn("File_Data");
//upbean.setBaseDir(application, request);
String str = upbean.getDestination();
out.println("The value of Destination is "+str) ;
upbean.upload(request);
String filename = upbean.getFileNameColumn();
String strTable = upbean.getTable();
String strPrefix = upbean.getPrefixColumn();
String name = "";
conn.commit();
out.println("filename-----:::::: "+filename+":::");
out.println("File Prefix-----:::::: "+strPrefix+":::");
out.println("DataBase Table Name-----:::::: "+strTable+":::");
Enumeration fileNames = upbean.getFileNames();
while (fileNames.hasMoreElements()) {
strFlag = "true";
strFileName = (String)fileNames.nextElement();
out.println("strFileName File Name Is:::::"+strFileName);
strAbsoluteName = strFileName.substring(4,strFileName.length());
catch(IOException ex)
out.println("IOException is =="+ex.toString());
catch(SQLException ex)
out.println("IOException is =="+ex.toString());
catch(Exception ex)
out.println("IOException is =="+ex.toString());
%>
This is not uploading file or any other information into database table called FLK_CLOB_TEST.
Please help me on this.

I get the same error when i try to load the same data but from Oracle Table
11872     12108     RUN-050406     11/14/2011 4:38:44 PM     Data flow <DF_TB_Generalità> received a bad system message. Message text from the child process is
11872     12108     RUN-050406     11/14/2011 4:38:44 PM     
<￀ ==========================================================
when i load data from SAP extractors or SAP tables i don't have problem.
Regards
Bilal

Similar Messages

  • Upload .txt file into Database Table

    Hi,
    I was wondering if someone could please point me in the right direction. I've been looking around the forum but can't find anything to help me achieve the following.
    I would like to be able to upload a .txt file using a webpage. Then store the information inside this file into database tables.
    eg. contents of mytextfile.txt:
    richard
    10 anywhere street, anytown, somewhere
    111 222 333 444
    joe
    9 somestreet, elsewhere
    999 888 777 666
    peter
    214 nearby lane, overhere
    555 555 555 555
    I would like to insert this data into a table.
    eg. table name = CONTACTS
    userid = primary key (using sequence)
    username = (line 1 - richard, joe, peter)
    address = (line 2)
    phone_no = (line 3)
    As you can see the records will appear 1 at a time and will have a blank line between records. Is there anyway for me to upload a file like this and have it placed into tables?
    I have seen http://otn.oracle.com/products/database/htmldb/howtos/howto_file_upload.html but this seems to be for uploading a whole file and downloading the same file, rather than extracting data from the file.
    I hope I have managed to explain my problem.
    Many thanks,
    Richard.

    Richard,
    HTML DB allows you to upload CSV files via the Data Workshop. That data would then be parsed and inserted into a specific table. Alternatively, if you have your data in an Excel spreadsheet, and it is less than 32k, you can copy & paste the data directly into HTML DB's Data Workshop, which will then parse and import it into the Oracle database.
    The one obstacle you may have to overcome is converting your data from the format you outlined to CSV format. Specifically, you would have to make this:
    richard
    10 anywhere street, anytown, somewhere
    111 222 333 444
    Look something like this:
    "richard","10 anywhere street, anytown, somewhere","111 222 333 444"
    Hope this helps,
    - Scott -

  • Open Hub - Change from File to Database table

    Hello Experts;
    I want to change the Open Hub Service that we create from File to Database table.
    We are using the Delta Update. However, after I change the Open Hub, Activate the transformation and DTP, when I run it, I don't have any value in the table.
    If I run a new delta into my cube, in the table I only get the data from delta.
    Can anyone knows how to upload all the requests that I have in my cube for the first time I run the delta DTP?
    Thanks and regards;
    Ricardo

    Create a new Full DTP and execute, so that you can dump all of the current contents of the InfoCube into the table and push/pull that table to the target prior to the next delta retraction.
    Edited by: Dennis Scoville on Nov 17, 2009 9:37 AM

  • How to extract data from  text file to database table

    Hi ,
    I am trying to upload  data in text file to database table  using GUI_UPLOAD function .what would be the program for that.
    thanks in advance.

    Hi,
    I don't think you have a standard sap program to upload data from file to database table...
    Instead you can create a custom program like this..
    DATA: T_FILEDATA(1000) OCCURS 0 WITH HEADER LINE.
    DATA: T_ZTABLE LIKE ZTABLE OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = 'C:\TEST.TXT'
      tables
        data_tab                      = T_FILEDATA
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
       ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
       DP_TIMEOUT                    = 16
       OTHERS                        = 17
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT T_FILEDATA.
      T_ZTABLE = T_FILEDATA.
      APPEND T_ZTABLE.
    ENDLOOP.
    MODIFY ZTABLE FROM TABLE T_ZTABLE.
    COMMIT WORK..
    Thanks,
    Naren

  • After REFRESH the cached object is not consistent with the database table

    After REFRESH, the cached object is not consistent with the database table. Why?
    I created a JDBC connection with the Oracle database (HR schema) using JDeveloper(10.1.3) and then I created an offline database (HR schema)
    in JDeveloper from the existing database tables (HR schema). Then I made some updates to the JOBS database table using SQL*Plus.
    Then I returned to the JDeveloper tool and refreshed the HR connection. But I found no any changes made to the offline database table JOBS in
    JDeveloper.
    How to make the JDeveloper's offline tables to be synchronized with the underling database tables?

    qkc,
    Once you create an offline table, it's just a copy of a table definition as of the point in time you brought it in from the database. Refreshing the connection, as you describe it, just refreshes the database browser, and not any offline objects. If you want to syncrhnonize the offline table, right-click the offline table and choose "Generate or Reconcile Objects" to reconcile the object to the database. I just tried this in 10.1.3.3 (not the latest 10.1.3, I know), and it works properly.
    John

  • SQL Loader problem while loading records from txt file to database table.

    I am getting following error while loading records from flat txt file into database table with the help of 'sqlldr' command. I have executed catldr.sql from RDBMS folder but it is still showing same error. I am setting DIRECT = TRUE while issuing sqlldr command. If I try with DIRECT = FALSE then it works fine. Database is Oracle 8i.
    SQL*Loader-951: Error calling once/load initialization
    ORA-24329: invalid character set identifier
    F1 Please.

    Hello,
    Direct path load, can only be used with SQL*Loader and Database have the same version.
    Care to tell the database version and sql*loader version you are using.
    -Sri

  • Loading XML files into Database table

    Loading XML files into Database table
    Hi I have some XML files say 100 files in a virtual directory created using &quot;Create or replace directory command&quot; and those files need to be loaded into a table having a column of XMLTYPE. 1)How to load that using Oracle provided procedures/packages

    Check out the Oracle XDB Developer's Guide, Chapter 3. There is an example of using BFileName function to load the xml files from a directory object created using create or replace directory. It works really well.
    Ben

  • Problems with uploading file to database using FND_GFM

    Hi
    I'm having some problems uploading files to the database in apps 11.5.9
    As various sources/documents tell me, using the standard FND_GFM / FND_FILE_UPLOAD packages of APPS should transfer an uploaded file into the FND_LOBS table, but some reason it doesn't work. I copied and altered the FND_GFM.upload_confirm function to try and figure out why it doesn;t work and it looks like the file to be uploaded does not appear in the defined table (FND_LOBS_DOCUMENT).
    The following DAD is defined (with hidden password and servername to prevent abuse ;)):
    [DAD_oes_s]
    connect_string = oes_s
    password = ****
    username = APPS
    default_page = fnd_web.ping
    document_table = APPS.fnd_lobs_document
    document_path = docs
    document_proc =
    upload_as_long_raw =
    upload_as_blob = *
    reuse = Yes
    connmax = 10
    pathalias = fndgfm
    pathaliasproc = fnd_gfm.dispatch
    enablesso = No
    cgi_env_list=SERVER_NAME=***,REQUEST_PROTOCOL=http,SERVER_P
    ORT=***,HOST=***
    input_filtering = Yes
    stateful=STATELESS_RESET
    And I'm using the following code to generate the upload-file page
    CREATE OR REPLACE PROCEDURE XX_ITRIS_HelloWorld AS--(file IN VARCHAR2) AS
         access_id_v varchar2(1000);
         BEGIN
              htp.htmlOpen;
              htp.bodyOpen;
              htp.formOpen('http://***/pls/oes_s/fnd_file_upload.uploadcompletemessage', 'GET', null, 'multipart/form-data');
              htp.formFile('file');
              access_id_v := fnd_gfm.authorize(null);
              htp.formHidden('access_id', access_id_v);
              htp.formSubmit();
              htp.formClose;
              htp.line;
              htp.bodyClose;
              htp.htmlClose;
         END XX_ITRIS_HelloWorld;
    Can anybody point out what is going wrong?

    You said you are uploading XML file whereas in the TSQL you have assign as text file i.e @SourceFile = 'test.txt'. Are you sure that you are copying XML file ? What is the size of the source file "test.txt" ? I am sure it is 0 KB. That is what you
    have found in FTP site.
    Regards, RSingh

  • Delete an uploaded file (in custom table) from a report

    Hi,
    I have a report of uploaded files (the files are saved in my own table, not in APEX_APPLICATION_FILES) - I'd like to add a delete link to each file in my report so that the user can delete a particular file.
    How do I go about doing this?
    Thanks.

    Melissa,
    It is now working. You missed couple of things:
    1. javascript in the header
    2. you were pointing to the page 1 and your process was on the page 2
    3. you passed the value to a non existing item on the page 3
    4. the request which would fire the delete process was triggered by a wrong request
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Generating xml file from database table

    Could anyone please explain how to generate a xml file from a database table.examples will be highly appreciated.
    thanks in advance

    See the release notes for our XSQL Pages component of the Java XDK for a tutorial. There are also lots of examples in Building Oracle XML Applications.
    You use the XML SQL Utility component to accomplish the task. It's part of our Java XDK that you can download from http://otn.oracle.com/tech/xml

  • Help needed in reading text file to database table

    Hello experts,
    i have to insert the values from the column of this text file and insert them in my database table.
    I have done a few file to table insertions but i'm having some trouble with this one.
    Any suggestions plz
    thanks
    liab_report      1.00                                                                                                                              Page: 1
    CDC:00537 / Mon Jun-21-2010                           LIABILITY REPORT                               Mon Jun-21-2010 22:06:26
    DRAW    1; SET    1;  November 7, 2009
                         TOTAL       PAID ON         TOTAL    EXPIRED ON         TOTAL    FRAC   OUTSTANDING
                       WINNERS      06/21/10          PAID      06/21/10       EXPIRED   ROUND
      DIVISION          AMOUNT        AMOUNT        AMOUNT        AMOUNT        AMOUNT  AMOUNT        AMOUNT
        Div1              0.00          0.00          0.00          0.00          0.00    0.00          0.00
        Div2         701040.00          0.00     660146.00          0.00      40894.00    0.00          0.00
        Div3        1444128.00          0.00    1330056.00          0.00     114072.00    0.00          0.00
        Div4        4711900.00          0.00    3889700.00          0.00     822200.00    0.00          0.00
                    6857068.00          0.00    5879902.00          0.00     977166.00    0.00          0.00
    DRAW    2; SET    1;  November 14, 2009
                         TOTAL       PAID ON         TOTAL    EXPIRED ON         TOTAL    FRAC   OUTSTANDING
                       WINNERS      06/21/10          PAID      06/21/10       EXPIRED   ROUND
      DIVISION          AMOUNT        AMOUNT        AMOUNT        AMOUNT        AMOUNT  AMOUNT        AMOUNT
        Div1              0.00          0.00          0.00          0.00          0.00    0.00          0.00
        Div2         817817.00          0.00     817817.00          0.00          0.00    0.00          0.00
        Div3        1687405.00          0.00    1611742.00          0.00      75663.00    0.00          0.00
        Div4        3402100.00          0.00    3034200.00          0.00     367900.00    0.00          0.00
                    5907322.00          0.00    5463759.00          0.00     443563.00    0.00          0.00
    DRAW    3; SET    1;  November 21, 2009
                         TOTAL       PAID ON         TOTAL    EXPIRED ON         TOTAL    FRAC   OUTSTANDING
                       WINNERS      06/21/10          PAID      06/21/10       EXPIRED   ROUND
      DIVISION          AMOUNT        AMOUNT        AMOUNT        AMOUNT        AMOUNT  AMOUNT        AMOUNT
        Div1              0.00          0.00          0.00          0.00          0.00    0.00          0.00
        Div2         779933.00          0.00     769804.00          0.00      10129.00    0.00          0.00
        Div3        1605548.00          0.00    1525104.00          0.00      80444.00    0.00          0.00
        Div4        4891700.00          0.00    4256800.00          0.00     634000.00    0.00        900.00
                    7277181.00          0.00    6551708.00          0.00     724573.00    0.00        900.00

    Plz clarify whether u want to load text file as a file into database or value of this text file into database. If values are to be loaded from this text file, U can better format the text file and use SQL loader to load the file into database. By formatting the database, i mean remove the unnecessary headings and characters, kee only the values to be loaded idelimited by ' '(space) or ','(comma). Create a control file and load it into the target table.

  • Error while uploading files into FND_LOBS table

    Hi All,
    Hope you are all well!!
    I am new to OAF.Developing a standard upload page.
    Getting the below error when i am trying to uploading the file in to FND_LOBS table.
    *"Error - Attribute FileId in xxsymuploadAM.xxsymuploadVO is required"*
    The page was opening successfully but when trying to submit the file into fnd_lobs table getting the error.
    For this i have created AM, EO and EO based VO.
    Her is my code--------------------
    /*===========================================================================+
    | Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA |
    | All rights reserved. |
    +===========================================================================+
    | HISTORY |
    +===========================================================================*/
    package xxsymupload.oracle.apps.fnd.upload.webui;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.webui.OAControllerImpl;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
    import oracle.apps.fnd.framework.OAApplicationModule;
    import oracle.apps.fnd.framework.OAViewObject;
    import oracle.apps.fnd.framework.OAException;
    import oracle.jbo.Row;
    import oracle.apps.fnd.framework.webui.beans.message.OAMessageFileUploadBean;
    import oracle.apps.fnd.framework.webui.OADataBoundValueViewObject;
    * Controller for ...
    public class xxsymupload1CO extends OAControllerImpl
    public static final String RCS_ID="$Header$";
    public static final boolean RCS_ID_RECORDED =
    VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
    * Layout and page setup logic for a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    OAApplicationModule am=pageContext.getApplicationModule(webBean);
    OAViewObject vo = (OAViewObject)am.findViewObject("xxsymuploadVO");
    if (!vo.isPreparedForExecution())
    vo.executeQuery();
    Row row = vo.createRow();
    vo.insertRow(row);
    row.setNewRowState(Row.STATUS_INITIALIZED);
    row.setAttribute("FileFormat","IGNORE");
    row.setAttribute("UploadDate", am.getOADBTransaction().getCurrentDBDate());
    row.setAttribute("ProgramName", "xxsymUpload");
    OAMessageFileUploadBean uploadBean = (OAMessageFileUploadBean)webBean.findChildRecursive("fileUpload");
    OADataBoundValueViewObject displayNameBoundValue = new OADataBoundValueViewObject(uploadBean, "FileData");
    uploadBean.setAttributeValue(DOWNLOAD_FILE_NAME,displayNameBoundValue);
    OADataBoundValueViewObject contentBoundValue = new OADataBoundValueViewObject(uploadBean, "FileContentType");
    uploadBean.setAttributeValue(FILE_CONTENT_TYPE, contentBoundValue);
    * Procedure to handle form submissions for form elements in
    * a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    if (pageContext.getParameter("cancelButton") != null)
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    am.getTransaction().rollback();
    pageContext.forwardImmediately("OA.jsp?OAFunc=OAHOMEPAGE",null,OAWebBeanConstants.KEEP_MENU_CONTEXT,null,null,false,OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
    else if (pageContext.getParameter("submitButton") != null)
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    am.getTransaction().commit();
    OAViewObject vo = (OAViewObject)am.findViewObject("xxsymuploadVO");
    oracle.jbo.domain.Number fileId = (oracle.jbo.domain.Number)vo.getCurrentRow().getAttribute("FileId");
    String fileUpload = (String)vo.getCurrentRow().getAttribute("FileName");
    OAException confirmMessage = new OAException("File "+fileUpload+" uploaded succesfully with ID "+fileId+".",OAException.CONFIRMATION);
    pageContext.putDialogMessage(confirmMessage);
    pageContext.forwardImmediately("OA.jsp?page=/xxsymupload/oracle/apps/fnd/upload/webui/xxsymuploadPG",null,OAWebBeanConstants.KEEP_MENU_CONTEXT,null,null,true,OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
    Appreciate quick response!!
    Thanks,
    Sateesh

    In EO Impl java, set the file id and other mandatory fields, something like below. You can also search OAF forum for more details.
    public void create(AttributeList attributelist)
    super.create(attributelist);
    try
    OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl)getOADBTransaction();
    String s = "select fnd_lobs_s.nextval from dual";
    ViewObject viewobject = oadbtransactionimpl.createViewObjectFromQueryStmt(s);
    Number number;
    Row row;
    for(number = null; viewobject.hasNext(); number = (Number)row.getAttribute(0))
    row = viewobject.next();
    if(number != null)
    setFileId(number);
    setFileFormat("text");
    setUploadDate(oadbtransactionimpl.getCurrentDBDate());
    } else
    throw new OAException("AK", "AK_CANNOT_GET_FILEID");
    viewobject.remove();
    catch(Exception exception)
    throw new OAException("AK", "AK_FND_LOBS_NOT_CREATED", exception);
    Thanks
    Shree

  • Dreamweaver will not upload file to Server

    I am having an issue uploading files to the server with Dreamweaver. I have been using Creative Cloud for 6 months and the issue started Monday.
    If I select a file, click put icon the FTP access connects to the server successfully. However, the FTP log says "file not transferred - same" and does not transfer the file to the server. The file has been edited, saved and shows the changes in Dreamweaver and in my browser locally.
    I have rebuilt the site cache in Dreamweaver going to Site -> Advanced -> Rebuild Site Cache. Did not resolve the issue.
    I deleted the file on the server (using another FTP program) and Dreamweaver still will not upload the .html file to the server, thus the file is missing. Then I have to upload via another FTP program.
    I am able to upload edited files successfully from another computer that is using Dreamweaver CS 6, so it is not a server problem.
    Does anyone know how to correct this?

    Are both computers on the same router? Can you move the computer that's failing to upload onto a different network?
    I ran into something similar to this a while back, only I couldn't get it to work from any machine on my home network, it was fine from the office, but it wouldn't upload anything at home. Turned out my router went bad and didn't like certain kinds of traffic. I ended up replacing it and everything worked fine.

  • Need the file extensions database table name

    Hi,
    I need to know the Database table name for file extensions in WCC.
    Please check the image for reference .

    Hi 2790552
    Please look at file doc_config.htm in the location <middleware_home>/Oracle_ECM1/ucm/idc/resources/core/tables/doc_config.htm
    This is the file which helps in building the applet view.
    I do belive that revisions and documents table might be used for validation and other specific things, but thats more in the context of document processing and from component IBR at runtime. But administration sake, i thing it works from the these config files since database doesn't have any table to hold this info.

  • Upload File from oracle table to FTP server .

    Hi Experts,
    I have created one html region in Apex page. In this Region I have one item as File browse. On Click of File browse , select some file and say click Submit button then I m storing this file information in Table. Now My Requirement is to upload this file to FTP server after clicking the Submit button.
    Thanks in Advance
    Danalaxmi

    For this you need the ftp package you can find on this page:
    http://www.oracle-base.com/dba/DBACategories.php
    George

Maybe you are looking for