Upload myfaces problem, file property is null

Hi,
to upload a file in JSF using myFaces i defined the following JSF:
<%@ taglib prefix="t" uri="http://myfaces.apache.org/tomahawk"%>
<h:form enctype="multipart/form-data">
<t:inputFileUpload
id="fileupload"
value="#{businessCaseAspectBean.upFile}"
storage="file"/>
<h:commandButton value="Submit"
action="#{businessCaseAspectBean.upload}" />
</h:form>
- I have defined the filter in web.xml
<!-- Extensions Filter -->
<filter>
<filter-name>extensionsFilter</filter-name>
<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filt�er-class>
<init-param>
<param-name>uploadMaxFileSize</param-name>
<param-value>100m</param-value>
</init-param>
<init-param>
<param-name>uploadThresholdSize</param-name>
<param-value>100k</param-value>
</init-param>
</filter>
The filter seems to be loaded correctly - jscookmenu working for
example ...
The Error:
the form is submitted, #{businessCaseAspectBean.upload} Action called
but the #{businessCaseAspectBean.upFile} is always null / the upfile
Setter is never called...
i'm just getting crazy with that issue - any ideas?
Greets,
Fabio.
P.S. the bean have a session scope.

Hi Giubat i'm tryng the example then you have post to me, so i've used Jbuilder 2006 IDE and jboss 3.2.7 AS.
In my application i've added a folder with this libraries:
tomahawk1.1.3.jar (myfaces-extensions.jar is old, and i don't have it)
commons-collection.jar
commons-digester.jar
commons-beanutils.jar
commons-logging.jar
commons-fileupload1.1.jar
I'm added a JBuilder folder named JSF, with this libraries:
jsf-api.jar
jsf-impl.jar
I'm added a JBuilder folder named JSTL, with this libraries:
jstl.jar
standard.jar
i'm cut and past from the example, the jsp page, the bean the web.xml and the faces-config.xml.
But when my application is running (when i'm call the first page) i've this error:
16:48:20,370 ERROR [Engine] StandardWrapperValve[FacesServlet]: Servlet.service() for servlet FacesServlet threw exception
java.lang.NoSuchMethodError: org.apache.myfaces.renderkit.html.util.DummyFormUtils.isWriteDummyForm(Ljavax/faces/context/FacesContext;)Z
     at org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener.writeCodeBeforeBodyEnd(ExtensionsPhaseListener.java:110)
     at org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener.getCodeBeforeBodyEnd(ExtensionsPhaseListener.java:96)
     at org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener.renderCodeBeforeBodyEnd(ExtensionsPhaseListener.java:86)
     at org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener.afterPhase(ExtensionsPhaseListener.java:66)
     at org.apache.myfaces.lifecycle.LifecycleImpl.informPhaseListenersAfter(LifecycleImpl.java:458)
     at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:307)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:95)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
     at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
     at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
     at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:66)
     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:162)
     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
     at org.josso.tc50.agent.SSOAgentValve.invoke(SSOAgentValve.java:289)
     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
     at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
     at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
     at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
     at java.lang.Thread.run(Thread.java:595)
Any ideas, Sorry for my english and thank for your attention and patience,
Best regard, Fabio.

Similar Messages

  • Myfaces's file upload component

    I used the myfaces's file upload component in my web application. But this component needs to set the form's enctype attribute to "multipart/form-data". But after I have set this attribute, my other components in the form seemed doesn't work anymore. Is there any way to solve this problem? Thank you

    Some people seem to be running into this. Doing these steps should fix the problem:
    Right click the component library node "Basic" and choose "Manage Component Libraries". That opens the Component Library Manager window. Verify that the "On Palette" property is checked for "File Upload".
    Hope it helps,
    Lark

  • I am having some huge problems with my colorspace settings. Every time I upload my raw files from my Canon 5D mark II or 6D the pics are perfect in color. That includes the back of my camera, the pic viewer on my macbook pro, and previews. They even look

    I am having some huge problems with my colorspace settings. Every time I upload my raw files from my Canon 5D mark II or 6D the pics are perfect in color. That includes the back of my camera, the pic viewer on my macbook pro, and previews. They even look normal when I first open them in photoshop. I will edit, save, and then realize once i've sent it to myself to test the color is WAY off. This only happens in photoshop. I've read some forums and have tried different things, but it seems to be making it worse. PLEASE HELP! Even viewing the saved image on the mac's pic viewer is way off once i've edited in photoshop. I am having to adjust all my colors by emailing myself to test. Its just getting ridiculous.

    Check the color space in camera raw, the options are in the link at the bottom of the dialog box. Then when saving make sure you save it to the srgb color space when sending to others. Not all programs understand color space and or will default to srgb. That won't necessarily mean it will be accurate, but it will put it in the ballpark. Using save for web will use the srgb color space.

  • [MX 2004} Can't upload! The file may not exist, or there could be a permission problem

    I'm running MX 2004 on Windows XP. All's been well for the
    last few months, doing site maintenance at this part-time job. I
    get tangled up a bit in checking files in and out, coming from
    GoLive, and since there's no one else with FTP access, yesterday I
    told it to check the entire site in. I didn't have any changes I
    didn't want to commit, and I figured that would keep things a
    little neater.
    As of today, I can post revisions to existing pages, or
    resize image files, but when I create a new page, or try to place a
    new image file on an existing page, I can't upload it.
    So, to be clear: I have two pages already up on the site,
    index.html and apple.html, with a link between them. If I create
    new page banana.html and make a link to it from index, index.html
    will upload that revised link, but banana.html is refused with the
    message
    FTP error: The file may not exist, or there could be a
    permission problem
    I know the file doesn't exist (remotely); I just made it.
    I've gone to Prefs and disable Check In / Check Out, which didn't
    do me any good. What next?

    Can you open the FTP log, select one of these new files and
    upload it- then
    cut and paste relevant part of the ftp log?
    Also- does this site have a "host directory", a subfolder
    that your public
    files need to go into? If yes- is this folder listed in the
    host directory
    line of the remote server info?
    And odd past thing i've seen-
    Had hosting that used public_html as the public folder name.
    They also had a symbolic link named www that pointed to
    public_html
    Could upload/download existing files with www in "host
    directory" line of
    dw; but could not upload new files or work with files in
    subfolders.
    changing to public_html instead of the www symlink fixed this
    for me.
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • Problem in uploading an excel file in wd abap

    I am trying to upload an excel file in wd abap but on uploading it shows me the data in the form of some codes but when i try to do the same thing using text file it works well.Plese refer the code .
    METHOD onactionon_upload .
      TYPES : BEGIN OF itab_str1,
       name(10) TYPE c,
       age(10) TYPE c,
       END OF itab_str1.
      DATA : t_table1 TYPE STANDARD TABLE OF itab_str1,
            i_data TYPE STANDARD TABLE OF string,
            lo_nd_sflight TYPE REF TO if_wd_context_node,
            lo_el_sflight TYPE REF TO if_wd_context_element,
            l_string TYPE string,
            fs_table TYPE itab_str1,
            l_xstring TYPE xstring,
            fields TYPE string_table,
            lv_field TYPE string.
      DATA : t_table TYPE if_main=>elements_data_tab,
            data_table TYPE if_main=>elements_data_tab.
      wd_context->get_attribute(
      EXPORTING
        name = 'DATASOURCE'
        IMPORTING
          value = l_xstring
    CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
      EXPORTING
        in_xstring          = l_xstring
    IMPORTING
       out_string          = l_string.
    SPLIT l_string AT cl_abap_char_utilities=>newline  INTO TABLE i_data.
    LOOP AT i_data INTO l_string.
    SPLIT l_string AT cl_abap_char_utilities=>horizontal_tab INTO TABLE fields.
    READ TABLE fields INTO lv_field index 1.
    fs_table-name = lv_field.
    READ TABLE fields INTO lv_field index 2.
    fs_table-age = lv_field.
    APPEND fs_table TO t_table1.
    ENDLOOP.
    lo_nd_sflight = wd_context->get_child_node( 'DATA_TAB').
    lo_nd_sflight->bind_table( t_table1 ).
    ENDMETHOD.

    Problem is not with the file format  nor Upload element.
    problem is with conversion function module, still now for conversion of xcel data to string format we dont have perfect function module.
    CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
    EXPORTING
    in_xstring = l_xstring
    IMPORTING
    out_string = l_string.
    That's a bug with xcel conversion  As of now I dont find any fm which converts  xcel data to string without any problem.
    Regards
    Srinvivas
    Edited by: sanasrinivas on Dec 23, 2011 7:02 AM

  • Problem in uploading the rpt file in BO server

    We have the enterprise edition of Business Objects server, which is available in the Solaris 10 machine. We try to upload the rpt file using the Central Management Console Log in, it shows in progress up to 20 min, after that we got the connection time out error. The same report is uploaded easily in the Business Objects server, which is available in windows machine. Solaris environment only we got this error.
    Any bodies help me why BO, which is available in Solaris server, is not supporting to upload the rpt file. (If any installation problem, or need to configure some parameters).
    RPT file upload only have this problem, other type of files we can easily uploaded.
    Thanks in advance.

    Hi,
    That's a really old post up there, and the forums have since been redesigned.
    The forum finder is over here: http://scn.sap.com/docs/DOC-18971
    A good collection of BusinessObjects related links can be found here: http://scn.sap.com/docs/DOC-30682
    This forum space http://scn.sap.com/community/businessobjects-bi-legacy-products is the most appropriate one if your product question is similar to that above.
    Regards ,
    H

  • Problem uploading bif tvs file

    It might be a dumb question but here is my problem:
    I'm trying to upload a tvs file to OracleXE (10g) using the html interface but keep on getting this error:
    ORA-20001: Unable to create collection: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    Error creating collection using loaded data.
    Trying uploading only a couple of records (lines) works just fine.
    It seems that one argument is too bog for its field type but as far as I understand it, the uploader is supposed to adjust the size according to the data and/or prompt for changes.
    The size of the file I'm trying to upload is ~22MB.
    I'm pretty much sure that there is a straight forward solution that I'm not aware of.
    Anyone?
    Thanks,
    Oren

    I tried to post it there but for some reason it wouldn't let me post - the start a new thread (as well as reply) just refreshes the page. I tried it with different machines and different navigators with no success. I even tried deleting all oracle forum related cookies.
    I have no problem posting in other forums.
    Any suggestions or solutions?

  • Problems Uploading a Pages file in html format including pictures to web pa

    I have problems uploading a Pages file in html format to a web page.
    The files itself is downloaded but the images are not. How can I upload a page file in html including the pictures or illustrations?

    I just bought a macbook as well as the iwork software. I am having a few problems. I am a student and when I try to print out documents (originally word documents) it puts them automatically into textedit instead of pages. Also, the pages get all screwed up, things are missing, etc. How do I make pages my default and do i need to export? import? or do something so that these documents show up perfectly in pages?
    A second questions- When i try to print out slideshows in keynote (originally from powerpoint) the handouts print on the little edge of the paper horizontally rather than the long way. I am hoping these are easy adjustments.
    I would appreciate any help anyone can give me.
    Thank you!

  • I can no longer upload my photo files to my gallery website at Fine Art America when nobody else is having any problems.

    I have tried for days to upload different photo files with no result. Makes me wonder if it's related to java not being supported in firefox 6.
    *edited* I just downloaded chrome and I am finally able to upload my artwork. Firefox was always my browser of choice until this happened. Please please please fix this issue so I can go back to using it as my default browser!

    You can also check your security software (firewall, anti-virus) to make sure that that isn't blocking the uploads

  • Error while uploading a PAR file

    Hi All,
    I'm having an error when i try to upload a PAR file from Portal>Java Development>Development
    The strange is that i am having the error in QA environment, in development environment i can upload it without any problem, and also it is not the first time that I upload a PAR to QA.
    I hope someone can help me, i really don't know what to do...
    Regards,
    Nicolás.-
    Here is the error:
    May 8, 2009 11:46:34 AM # Client_Thread_17     Fatal           Application upload failed: InvoiceTool.par
    com.sapportals.portal.prt.runtime.PortalException: archive: InvoiceTool.par
    at com.sapportals.portal.application.applicationrepository.ApplicationRepositoryService.putArchive(ApplicationRepositoryService.java:309)
    at com.sapportals.portal.prt.deployment.DeploymentManager._uploadArchive(DeploymentManager.java:700)
    at com.sapportals.portal.prt.deployment.DeploymentManager.uploadArchive(DeploymentManager.java:396)
    at com.sapportals.portal.prt.deployment.DeploymentManager.uploadApplication(DeploymentManager.java:285)
    at com.sap.ip.portal.admin.portalanywhere.ArchiveUploader.doUpload(ArchiveUploader.java:115)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.sapportals.portal.prt.component.AbstractPortalComponent.handleRequestEvent(AbstractPortalComponent.java:700)
    at com.sapportals.portal.prt.component.AbstractPortalComponent.handleEvent(AbstractPortalComponent.java:412)
    at com.sapportals.portal.prt.pom.ComponentNode.handleEvent(ComponentNode.java:250)
    at com.sapportals.portal.prt.pom.PortalNode.fireEventOnNode(PortalNode.java:351)
    at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:628)
    at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:229)
    at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:555)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:415)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.inqmy.services.servlets_jsp.server.InvokerServlet.service(InvokerServlet.java:126)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.inqmy.services.servlets_jsp.server.RunServlet.runSerlvet(RunServlet.java:149)
    at com.inqmy.services.servlets_jsp.server.ServletsAndJspImpl.startServlet(ServletsAndJspImpl.java:833)
    at com.inqmy.services.httpserver.server.RequestAnalizer.checkFilename(RequestAnalizer.java:672)
    at com.inqmy.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:314)
    at com.inqmy.services.httpserver.server.Response.handle(Response.java:173)
    at com.inqmy.services.httpserver.server.HttpServerFrame.request(HttpServerFrame.java:1288)
    at com.inqmy.core.service.context.container.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:36)
    at com.inqmy.core.cluster.impl5.ParserRunner.run(ParserRunner.java:55)
    at com.inqmy.core.thread.impl0.ActionObject.run(ActionObject.java:46)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.inqmy.core.thread.impl0.SingleThread.run(SingleThread.java:148)
    Caused by: java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.(ZipFile.java:121)
    at com.sapportals.portal.prt.deployment.ArchiveIntrospector.getDeploymentDescriptor(ArchiveIntrospector.java:54)
    at com.sapportals.portal.prt.deployment.DeploymentManager.getDeploymentDescriptor(DeploymentManager.java:942)
    at com.sapportals.portal.application.applicationrepository.ApplicationRepositoryService.putArchive(ApplicationRepositoryService.java:273)
    at com.sapportals.portal.prt.deployment.DeploymentManager._uploadArchive(DeploymentManager.java:700)
    at com.sapportals.portal.prt.deployment.DeploymentManager.uploadArchive(DeploymentManager.java:396)
    at com.sapportals.portal.prt.deployment.DeploymentManager.uploadApplication(DeploymentManager.java:285)
    at com.sap.ip.portal.admin.portalanywhere.ArchiveUploader.doUpload(ArchiveUploader.java:115)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.sapportals.portal.prt.component.AbstractPortalComponent.handleRequestEvent(AbstractPortalComponent.java:700)
    at com.sapportals.portal.prt.component.AbstractPortalComponent.handleEvent(AbstractPortalComponent.java:412)
    at com.sapportals.portal.prt.pom.ComponentNode.handleEvent(ComponentNode.java:250)
    at com.sapportals.portal.prt.pom.PortalNode.fireEventOnNode(PortalNode.java:351)
    at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:628)
    at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:229)
    at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:555)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:415)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.inqmy.services.servlets_jsp.server.InvokerServlet.service(InvokerServlet.java:126)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.inqmy.services.servlets_jsp.server.RunServlet.runSerlvet(RunServlet.java:149)
    at com.inqmy.services.servlets_jsp.server.ServletsAndJspImpl.startServlet(ServletsAndJspImpl.java:833)
    at com.inqmy.services.httpserver.server.RequestAnalizer.checkFilename(RequestAnalizer.java:672)
    at com.inqmy.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:314)
    at com.inqmy.services.httpserver.server.Response.handle(Response.java:173)
    at com.inqmy.services.httpserver.server.HttpServerFrame.request(HttpServerFrame.java:1288)
    at com.inqmy.core.service.context.container.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:36)
    at com.inqmy.core.cluster.impl5.ParserRunner.run(ParserRunner.java:55)
    at com.inqmy.core.thread.impl0.ActionObject.run(ActionObject.java:46)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.inqmy.core.thread.impl0.SingleThread.run(SingleThread.java:148)

    Hi Nicolas,
    In you development server,
    1. Create a new iview  (With new from PAR file option). The iView wizard gives you the option to choose the PAR file available on your development portal.
    2. Now create a Transport Package. Navigate to System Administration - Transport - Export.
    Navigate to your Transport Folder in PCD.
    Now Create a new Transport Package and add the iView to the package (iView created earlier from PAR file).
    3. Now go to Transport Package properties and Make sure, you are changing the property id prefix to * .
    This will include every object associated with the iView while manually exporting.
    4. Now click on the EXPORT button. This will export the required PAR file with. This in turn create an EPA file. save it to your desktop.
    5. Now in Quality server,
    Do the manual Import.
    Navigate to System Administration - Transport - Import.
    Browse the EPA file on your desktop and say IMPORT.
    This way, you will be able to get your PAR file as well as your required portal object (here the iView) in quality server.
    Hope this helps,
    Cheers!!!!!
    Biroj...
    Points for useful answer will be appreciated.
    Edited by: Biroj Patro on May 12, 2009 8:40 PM

  • How to upload multiple .CSV files in the same time.

    Hi Legends,
    Can anyone please help me to resolve my issue?
    This is very urgent and critical.
    Description:
    We have two users.1)edw_user_dump
    2)prd_udm.
    We need to upload the xx.csv file at the same time for these two users in oracle forms.
    we have differentiated .csv file name based on the user names.
    the main problem is in the sql loader command the xx.csv file name is created but the data is not captured in the server (kentucky) .
    Below is my code for the upload.
    -- To delete the Part_Mast.log file from the client
    DECLARE
    pid WEBUTIL_HOST.PROCESS_ID;
    v_result PLS_INTEGER;
    v_username varchar2(30) := GET_APPLICATION_PROPERTY(USERNAME);
    BEGIN
    v_result := WEBUTIL_HOST.Get_return_Code(pid ) ;
    host('cat /dev/null > /tmp/'||v_username||'_'||'EDW_CF_IO_UPLOAD.log');
    host('cat /dev/null > /tmp/'||v_username||'_'||'"CF615 IO Upload.csv"');
    END;
    DECLARE
    l_success boolean:=FALSE;
    l_bare_filename varchar2(100):=NULL;
    v_username varchar2(30) := GET_APPLICATION_PROPERTY(USERNAME);
    BEGIN
    -- Delete the content of the log and bad file
    host('cat /dev/null > /tmp/'||v_username||'_'||'EDW_CF_IO_UPLOAD.log');
    --host('cat /dev/null > /tmp/Part_Mast.bad');
    -- Upload the data file to Application Server
    l_bare_filename := v_username||'_'||substr(:FIC_SOURCE,instr(:FIC_SOURCE,'\',-1)+1);
    l_success := webutil_file_transfer.Client_To_AS_with_progress
    (clientFile => :FIC_SOURCE
    ,serverFile => '/tmp/'||l_bare_filename
    ,progressTitle => 'Upload to Application Server in progress'
    ,progressSubTitle => 'Please wait'
    ,asynchronous => false
    ,callbackTrigger => null
    IF l_success THEN
    NULL;
    ELSE
    null;
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    RAISE Form_Trigger_Failure;
    END;
    DECLARE
    v_username varchar2(30) := GET_APPLICATION_PROPERTY(USERNAME);
    begin
    host('cat /dev/null > /tmp/'||v_username||'_'||'EDW_CF_IO_UPLOAD.log');
    host('cat /dev/null > /tmp/EDW_CF_IO_UPLOAD.bad');
    end;
    BEGIN
    DECLARE
    v_username varchar2(30) := GET_APPLICATION_PROPERTY(USERNAME);
    v_password varchar2(30) := GET_APPLICATION_PROPERTY(PASSWORD);
    v_connect_string varchar2(30) := GET_APPLICATION_PROPERTY(CONNECT_STRING);
    a_host varchar2(500);
    BEGIN
    a_host :='/tmp/'||v_username||'_'||'"CF615 IO Upload.csv"';
    host('sqlldr '||v_username||'/'||v_password||'@'||v_connect_string||' '|| 'control=/home/edw_bis/ctl/GLB_CF_IO_UPLOAD.CTL'||' '|| 'DATA=a_host'||' '|| 'LOG=/tmp/'||v_username||'_'||'EDW_CF_IO_UPLOAD.log SKIP=1 errors=200000 DIRECT=FALSE');
    dbms_output.put_line(a_host);
    END;
    DECLARE
    v_username varchar2(30) := GET_APPLICATION_PROPERTY(USERNAME);
    begin
    host('cat /dev/null > /tmp/'||v_username||'_'||'"CF615 IO Upload.csv"');
    EXCEPTION
    WHEN OTHERS THEN
    RAISE Form_Trigger_Failure;
    END;
    end;
    DECLARE
    al_id3 ALERT;
    al_button Number;
    BEGIN
    edw_user_dump.SANM_PRC_MERGE_CF_IO_UPLOAD(:global.v_plsql_res,:global.v_ins_rec,:global.v_upd_rec);
    IF NVL(:global.v_plsql_res,0) = 0 and (:global.v_ins_rec !=0 OR :global.v_upd_rec != 0 ) then
    al_id3 :=FIND_ALERT('ROWINS');
    SET_ALERT_PROPERTY(al_id3,alert_message_text,' Process Completed Successfully!'||CHR(10)||' Rows Inserted : '||:global.v_ins_rec ||CHR(10)||' Rows Updated : '||:global.v_upd_rec);
    al_button := SHOW_ALERT( al_id3 );
    ELSIF (:global.v_plsql_res IN(-1,0) or :global.v_plsql_res > 0) and (:global.v_ins_rec =0 and :global.v_upd_rec = 0 and :global.v_del_rec =0 ) then
    al_id3 :=FIND_ALERT('ROWINS');
    SET_ALERT_PROPERTY(al_id3,alert_message_text,' Process Failed. Please Download the Log File '||CHR(10)||' Rows Failed : '||:global.v_plsql_res||CHR(10)||' Rows Inserted : '||:global.v_ins_rec ||CHR(10)||' Rows Updated : '||:global.v_upd_rec);
    al_button := SHOW_ALERT( al_id3 );
    ELSE
    al_id3 :=FIND_ALERT('ROWINS');
    SET_ALERT_PROPERTY(al_id3,alert_message_text,'Please Download the Log File '||CHR(10)||' Rows Failed : '||:global.v_plsql_res||CHR(10)||' Rows Inserted : '||:global.v_ins_rec ||CHR(10)||' Rows Updated : '||:global.v_upd_rec );
    al_button := SHOW_ALERT( al_id3 );
    END IF;
    EXCEPTION WHEN OTHERS THEN
    RAISE Form_Trigger_Failure;
    END;
    DECLARE
    v_username varchar2(30) := GET_APPLICATION_PROPERTY(USERNAME);
    begin
    host('cat /dev/null > /tmp/'||v_username||'_'||'"CF615 IO Upload.csv"');
    host('rm -rf /tmp/'||v_username||'_'||'"CF615 IO Upload.csv"');
    end;
    Thanks in advance!
    Thanks,
    Madhusudhanan

    Madhusudhanan,
    A couple of observations. First; always list your exact Forms version (eg; 10.1.2.0.2 not 10g R2). In most cases, the solution is different depending on the Forms version. Second; why must you use Forms to kick off a SQL Loader process? This is a server-side process and should be initiated by a server side process. If you absolutely must use Forms to kick off the process, again we need your Forms version in order to offer any solutions. Based on your code sample, I can asusme you are at least using Forms 9i becuase you are using WebUtil.
    Is your Database and Application Server the same physical computer? If they are not, this would explain why your HOST command isn't working because HOST runs against the Application Server not the Database server.
    Third; have you considered using and External Table (if your RDBMS version supports them) for each of the files you are attempting to upload? In this instance, it would be helpful to know your RDBMS version as well. External Tables can be a little frustrating to set up the first time, but as with any new construct you use - it gets easier the more you use it.
    Fourth; are you getting any errors in your log file(s)? If so, what are the errors? Please list the full error message if you have one.
    Finally, with respects to your statement:
    Posted: Mar 18, 2011 2:30 PM - Madhu This is very urgent and critical.>
    You have to understand that forum contributers are all volunteers - this is not our full-time job. If your issue is truely urgent I suggest you open a Service Request (SR) with Oracle Support! ;-)
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • How to upload the pdf file to the next view?....urgent

    Hi Experts,
    I need to upload the pdf file( a interactive form ) using the fileupload element in the A_view and the pdf file can be displayed in the b_view.
    But I don't know how to complete the function?
    Action:
    0.  Create a adobe form (c_form)in the R/3 using sfp with a inputfield.
    1.  Create a adobe interactive form (A_interactive_form)in the view(display_view) of the WDA for abap.
    2.  Create a context attribute(upload) in the display_view.
    3.  Bind the c_form to the A_interactive_form, so that the data can be transfered to the c_form.
    4.  Bind the "pdfSourth" property to context attribute "upload" in the A_interactive_form.
    4.  Type code in the WDA for abap for setting data("old") to the context.
    5.  Active the WDA and run the WDA.
    6.  In the IE, the interactive form is displayed with the value "old" in the field. Save the pdf form as "test.pdf" and close the IE.
    7.  Open the test.pdf, and type the inputfield "new" in the form, and save the test.pdf.
    8.  Create a context node(Pdfsourth) in the component controller, and create a attribute("upload") that type is xstring in the Pdfsourth.
    9.  Create a view(C_view), mapping the context node(Pdfsourth) in the component controller.
    10. Create a fileupload element in the C_view, and the "data" property is binded the "upload" attribute in the context node(Pdfsourth).
    11. Create a button(Display_form) and create the action with the outplug for upload the pdf file(test.pdf).
    12. Change the window and set the C_view as default view, and set the Navigation link from the C_view to B_view.
    13. Type code in the wddoinit method in the display_view for transfering the test.pdf file.
    method WDDOINIT .
    DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
    DATA upload                 TYPE        xstring.
    lo_componentcontroller =   wd_this->get_componentcontroller_ctr( ).
      lo_componentcontroller->getupload(
        IMPORTING
          upload = upload                         " xstring
      DATA lo_nd_pdfsourch TYPE REF TO if_wd_context_node.
      DATA lo_el_pdfsourch TYPE REF TO if_wd_context_element.
      DATA ls_pdfsourch TYPE wd_this->element_pdfsourch.
    navigate from <CONTEXT> to <PDFSOURCH> via lead selection
      lo_nd_pdfsourch = wd_context->get_child_node( name = wd_this->wdctx_pdfsourch ).
    get element via lead selection
      lo_el_pdfsourch = lo_nd_pdfsourch->get_element(  ).
    get single attribute
      lo_el_pdfsourch->set_attribute(
        EXPORTING
          name =  `UPLOAD`
          value = upload ).
    endmethod.
    15. Active the WDA and run the WDA.
    In the fileupload of the C_view, I select the test.pdf from my local machine. and click the button(Display_form), the display_view is displayed with the A_interactive_form.
    But in the A_interactive_form, the value "old" is in the field in the form rather than "new".
    I hope to display the test.pdf in the A_interactive_form. I don't know how to change my code or configuration?
    Do you give some example or some hint for this problem ?
    Thanks & Regards,
    Tao

    Now, The problem has been solved.Thanks a lot.

  • How to upload the tif file and Display into Iframe

    Hi all,
       My requirement is to upload 'n' number of tif files and display the file name in dropdown.
       If i select the file name, it should display the file in Iframe.
    My problem is i am not able to upload the tif file.
    try{
          byte []by=new byte[wdContext.currentContextElement().getPhotoResource().read(true).available()];
          wdContext.currentContextElement().getPhotoResource().read(true).read(by);
          String ext=wdContext.currentContextElement().getPhotoResource().getResourceType().getFileExtension();
          WDWebResourceType res=wdContext.currentContextElement().getPhotoResource().getResourceType();
          IWDResource resource=null;
          resource=WDResourceFactory.createResource(by,"sample",WDWebResourceType.getWebResourceTypeForFileExtension(ext));
           wdContext.currentContextElement().setPhoto(resource.toString());
              catch(Exception e){
    In the above code Photo is Iframe Context variable.
    If i upload tif file means it directly giving Save and Open options is giving.
    Please how to slove this probelm...........................
    Thanks,
    Suni

    Hi Satya,
    In HTML a TIF file can be displayed as"
    <html>
    <body>
    <object height="100%" width="100%"
    type="image/tiff" data="PO.tif">
    </object>
    </body>
    </html>
    Hope it helps.
    Regards,
    Alka

  • Upload from flat file to table

    Hi experts,
    i need to upload the following file in a table with the columns names as field names in my database table
    weekly_eft_repo  1.0                                                                                                       Page: 1
    CDC:00304 / Sat Oct-31-2009     Weekly EFT Sweep for 25/10/09 - 31/10/09  Effective Date 03/11/09         Sat Oct-31-2009 22:06:14
    *Bill to*
    *Retailer Retailer Name                  Name on Bank Account           Bank ABA   Bank Acct            On-line Amount  Instant Amount  Total Amount*
    ======== ============================== ============================== ========== ==================== =============== =============== ===============
    0200101 Triolet Popular Store          Triolet Popular Store          111111111  62030100130659            10,868.00            0.00       10,868.00
    0200103 Le Cacharel Snack              Le Cacharel Snack              111111111  62030100130813             9,728.00            0.00        9,728.00
    0200104 Advanced Co-operative Self Ser Advanced Co-operative Self Ser 111111111  111111111                  7,334.00            0.00        7,334.00
    0200105 Chez Popo Supermarket          Chez Popo Supermarket          111111111  61030100044898            30,932.00            0.00       30,932.00
    0200106 Vana Supermarket               Vana Supermarket               111111111  111111111                 17,775.00            0.00       17,775.00
    0200107 Mont Choisy Store              Mont Choisy Store              111111111  62030100130804             8,840.00            0.00        8,840.00
    0200108 Vijay Store                    Vijay Store                    111111111  62030100131229            16,416.00            0.00       16,416.00
    0200109 Neptune Confection             Neptune Confection             111111111  62030100130931            11,077.00            0.00       11,077.00
    0200110 Antoine Store                  Antoine Store                  111111111  111111111                  2,470.00            0.00        2,470.00Database table
    TABLE weekly_eft_report_temp
    Name                                      Null?    Type                       
    BILL_TO_RETAILER                          NOT NULL VARCHAR2(15)               
    RETAILER_NAME                                      VARCHAR2(100)              
    NAME_ON_BANK_ACCOUNT                               VARCHAR2(100)              
    BANK_ABA                                           VARCHAR2(1)                
    BANK_ACCT                                          VARCHAR2(1)                
    ON_LINE_AMOUNT                                     NUMBER                     
    INSTANT_AMOUNT                                     NUMBER                     
    TOTAL_AMOUNT                                       NUMBER                      I am having lots of difficulty in doing so. Can anyone plz help me. Thanks

    Hi Damorgan,
    I am having a little problem with my external table though and dont seem to find the solution. can you help me on this one please.
    For my external table
    create table weekly_eft_temp              
                (line varchar2(4000))                    
                ORGANIZATION EXTERNAL (                
                 TYPE oracle_loader                    
                 DEFAULT DIRECTORY GTECHFILES         
                 ACCESS PARAMETERS (                  
                   RECORDS DELIMITED BY NEWLINE       
                   CHARACTERSET WE8MSWIN1252       
                   BADFILE 'weekly_eft.bad'         
                   DISCARDFILE 'weekly_eft.dis'     
                   LOGFILE 'weekly_eft.log'         
                   FIELDS TERMINATED BY X'0D' RTRIM 
                      REJECT ROWS WITH ALL NULL FIELDS   
                        line char(4000)                  
                      LOCATION ('weekly_eft_report_c00381.rep')   
                   PARALLEL                              
                   REJECT LIMIT UNLIMITED ;There is no problem with this. My external table is populated ok.
    My problem lies in my sql query. I am not able seperate my field so that they can be inserted into their appropriate fields in my table
    INSERT INTO weekly_eft_report_temp 
             (Bill_to_Retailer     ,
              Retailer_Name        ,
              Name_on_Bank_Account ,
              Bank_ABA             ,
              Bank_Acct            ,
              On_line_Amount       ,
              Instant_Amount       ,
              Total_Amount         ,
              CDC                  ,
              SOURCE               ,
              INSERTED_DATE        ,
              UPLOADED                      
           select
              case when Bill_to_Retailer is null then lag(RETAILER_NO, decode(PRODUCT, ''Loto'', 1, ''Inst Tk'', 2 )) over (order by line_no) else null end as RETAILER_NO,                           
              Bill_to_Retailer     ,
              Retailer_Name        ,
              Name_on_Bank_Account ,
              Bank_ABA             ,
              Bank_Acct            ,
              On_line_Amount       ,
              Instant_Amount       ,      
              Total_Amount         ,         
              '00381'                                     ,
              'weekly_eft_report_c00381.rep'              ,                              
               sysdate                                    ,
               'N'                            
              from (                                
                      select
                           Bill_to_Retailer     ,
                           Retailer_Name        ,
                           Name_on_Bank_Account ,
                           Bank_ABA             ,
                           Bank_Acct            ,
                           On_line_Amount       ,
                           Instant_Amount       ,
                           Total_Amount
                            from
                            ( select
                                    rownum as line_no,
                                    regexp_substr(line, '[^ ]+', 1, 1)  as Bill_to_Retailer     ,
                                    regexp_substr(line, '[^ ]+', 1, 2)  as Retailer_Name        ,
                                    regexp_substr(line, '[^ ]+', 1, 3)  as Name_on_Bank_Account ,
                                    regexp_substr(line, '[^ ]+', 1, 4)  as Bank_ABA             ,
                                    regexp_substr(line, '[^ ]+', 1, 5)  as Bank_Acct            ,
                                    regexp_substr(line, '[^ ]+', 1, 6)  as On_line_Amount       ,
                                    regexp_substr(line, '[^ ]+', 1, 7)  as Instant_Amount       ,
                                    regexp_substr(line, '[^ ]+', 1, 8)  as Total_Amount
                             from weekly_eft_temp )
    --                where regexp_like(line, '^( +Bill to Retailer)')
                         The result of my query is as follows:
    weekly_eft_repo     1.0     L     o     t     t     o     t
    CDC:00381     /     Sat     Jan-16-2010     Weekly     EFT     Sweep     for
    Bill     to                              
    Retailer     Retailer     Name     Name     on     Bank     Account     Bank
    ========     ==============================     ==============================     ==========     ====================     ===============     ===============     ===============
    0200101     Triolet     Popular     Store     Triolet     Popular     Store     111111111
    0200103     Le     Cacharel     Snack     Le     Cacharel     Snack     111111111
    0200104     Advanced     Co-operative     Self     Ser     Advanced     Co-operative     Self
    0200105     Chez     Popo     Supermarket     Chez     Popo     Supermarket     111111111
    0200106     Vana     Supermarket     Vana     Supermarket     111111111     62030100133937     37,636.00
    0200107     Mont     Choisy     Store     Mont     Choisy     Store     111111111
    0200108     Vijay     Store     Vijay     Store     111111111     62030100131229     30,948.00
    0200109     Neptune     Confection     Neptune     Confection     111111111     62030100130931     23,769.00
    0200110     Antoine     Store     Antoine     Store     111111111     62030100134575     35,048.00
    0200111     P.S.C     Cold     Storage     P.S.C     Cold     Storage     111111111
    0200113     Mini     Prix     Boutique     Mini     Prix     Boutique     111111111
    0200114     Hotel     Cassim     Hotel     Cassim     111111111     62030100133914     171,802.00
    0200116     Aman     Snack     Aman     Snack     111111111     62030100129481     32,224.00
    0200117     Best     For     Less     Company     Ltd     Best     For
    0200118     Central     Way     Central     Way     111111111     111111111     34,956.00
    0200119     Amba     Veerapen     Amba     Veerapen     111111111     62030100129436     35,817.00
    0200121     Tang     Way     Tang     Way     111111111     111111111     117,542.00
    0200122     Football     Pools     Collector     Football     Pools     Collector     111111111
    0200123     Kim     Lee     Kim     Lee     111111111     62030100129422     19,782.00
    0200126     Chez     Andrex     Chez     Andrex     111111111     11111111     141,732.00
    0200127     Sungkoora     Pools     &     Lottery     Hous     Sungkoora     PoolsThe problem is that is that i want to take data only after the ====== and also it is seperating the names which is right. Can you please help me. Many thanks

  • How can I upload and download files with uiXML?

    I want to implement upload and download files with uiXML. In some previouse topic I got answare to look in AbstractPageBroker class in JavaDOC. I did it but this is a very-very little resolution description for this problem. I think for developers YOU (UIX Team) must in very quick time to put some examples on the NET because this is a nice technology but with adecvate samplase and developers guide it will be dead very soon. I digging this forum for information. I see many many people have same problems about this technology. They like it and want to use and try but documentation is very very poor.
    WE WANT EXAMPLES and separate forum for UIX. I think it deserve this.
    If You have any more detailed documentation would be nice to put on the net. I have uixdemo.zip file but this is in very early fase of development. I downloaded it before fwe months. And now I can't find it anymore on youre site. What happend?

    Attila -
    I went back and re-read the JavaDoc for AbstractPageBroker and MultipartFormItem and put together the following sample PageBroker based on the description from the JavaDoc:
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletContext;
    import oracle.cabo.servlet.BajaContext;
    import oracle.cabo.servlet.Page;
    import oracle.cabo.share.util.MultipartFormItem;
    import oracle.cabo.servlet.xml.UIXPageBroker;
    * An extension of UIXPageBroker which stores all uploaded
    * files in the temporary directory.
    public class UploadingPageBroker extends UIXPageBroker
    * Override of AbstractPageBroker.doUploadFile() which saves
    * all files to the temporary directory.
    protected String doUploadFile(
    BajaContext context,
    Page page,
    MultipartFormItem item) throws IOException
    // Get the location of the file to create in the temp directory.
    // Of course a real application probably wouldn't upload files to
    // the temp directory - just using this contrived example to
    // demonstrate basic uploading support.
    File file = _getFile(context, item);
    if (file != null)
    // Create a FileOutputStream. Of course, a real application would
    // probably want to buffer the output
    FileOutputStream out = new FileOutputStream(file);
    // Write out the file
    item.writeFile(out);
    // Close up the output stream
    out.close();
    // We can return a value here to add to the PageEvent
    // if so desired.
    return null;
    // Gets the File for the item that we are uploading
    private File _getFile(
    BajaContext context,
    MultipartFormItem item
    // Get the file name
    String name = item.getFilename();
    // If we don't have a file, bail...
    if (name == null)
    return null;
    // Get the path to the temporary directory
    File dir = _getTempDir();
    // Return the File object
    return new File(dir, name);
    // Returns the path to the temprary directory
    private File _getTempDir()
    // Get the temporary directory from the ServletContext
    ServletConfig sConfig = getServlet().getServletConfig();
    ServletContext sContext = sConfig.getServletContext();
    return (File)sContext.getAttribute("javax.servlet.context.tempdir");
    In this sample, each uploaded file is simply saved in the temporary directory. You'll want to replace the code that creates the FileOutputStream for the uploaded file to use whatever OutputStream makes sense for your application.
    BTW - I used the following UIX page to test this out:
    <?xml version="1.0" encoding="UTF-8"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller">
    <content>
    <pageLayout xmlns="http://xmlns.oracle.com/uix/ui">
    <contents>
    <form name="uploadForm" usesUpload="true">
    <contents>
    <fileUpload name="uploadedFile"/>
    <submitButton name="upload" text="Upload"/>
    </contents>
    </form>
    </contents>
    </pageLayout>
    </content>
    </page>
    Hope this sample helps with the uploading part of your question. I'll see if I can provide a download sample in a later post.

Maybe you are looking for