File Upload Pluggable Java Component / Java Bean

Dear Colleague,
I integrated the File Upload java bean into one of my Forms 9i forms. I also had it up and running (!!!), but after I rebooted the machine, I no longer receive the File Upload dialog window as I did originally. When I press the button which starts the File Upload, it never displays the window to select a file. My trigger is as follows:
begin
     /* Initialize the Java Bean */
     FileUploader.init('DOCU_BLOCK.FILE_UPLOADER','LOAD_CALLBACK_TRIGGER');
     /* Make sure the file is compressed on upload */
     FileUploader.setCompressed(true);
     /* Do the load to the c:\rolic\RKMS_documents\ directory on the server */
     FileUploader.UploadFile (:PARAMETER.file_destination);
/* Error Handling */
exception
when FileUploader.FileUploaderEx then
message (FileUploader.GetError);
end;
I have the "uploadclient.jar" file in my folder: C:\oracle9iDS\forms90\java
I list the "uploadclient.jar" file in the forms config file, formsweb.cfg as follows:
archive_jini=f90all_jinit.jar, uploadclient.jar, RKMS_images.jar
and I reference the uploadserver.jar in the default.env file as part of the CLASSPATH as follows:
CLASSPATH=c:\oracle9iDS\jlib\debugger.jar;c:\oracle9iDS\jlib\ewt3.jar;c:\oracle9iDS\jlib\share.jar;c:\oracle9iDS\jlib\utj90.jar;C:\oracle9iDS\forms90\java\UploadServer.jar
=========================================================
- Why did this work before I rebooted and now no longer???
- Any tips? Ideas?
=========================================================
The uploadclient.jar file also successfully loads as shown in the Java Console:
Oracle JInitiator: Version 1.3.1.9
Using JRE version 1.3.1.9 Java HotSpot(TM) Client VM
User home directory = C:\Dokumente und Einstellungen\Randy
Proxy Configuration: no proxy
JAR cache enabled
Location: C:\Dokumente und Einstellungen\Randy\Oracle Jar Cache
Maximum size: 50 MB
Compression level: 0
Loading http://quantum:8888/forms90/java/f90all_jinit.jar from JAR cache
Loading http://quantum:8888/forms90/java/uploadclient.jar from JAR cache
Loading http://quantum:8888/forms90/java/RKMS_images.jar from JAR cache
connectMode=HTTP, native.
Forms Applet version is : 90290

HI,
I'm facing nearly same problem.
When i press a button in my form to enable client to select image from there local computer, following code executes ( WHEN-BUTTON-PRESSED)
declare
     exSetup EXCEPTION;
     hButton ITEM := Find_Item('UPLOAD.SELECT');
begin
if (:upload.output_dir is null) then
MsgBox.Show(MsgBox.STOP_ALERT,FileUploader90,'Error: A output directory on the middle tier must be specified');      
raise exSetup;
end if;
FileUploader.UploadFile(:UPLOAD.output_dir);
/* (:UPLOAD is a control block and output directory is a text field char 1000 having initial property = D:\IMAGE) */
exception
When FileUploader.FileUploaderEx then
     MsgBox.Show(MsgBox.STOP_ALERT,FileUploader90,'Error During Upload: '||FileUploader.getError);      
When exSetup then
null;
end;
There is no compiliation error.
Runtime error is " Error During Upload: Desitnation directory does not exists or is not writeable ".
Infact destination directory D:\IMAGE exists and is readable/writable to any one ??
Any Help possible

Similar Messages

  • How to call a .jar file from a java bean?

    any body knows how to call a .jar file from a java bean?

    Crosspost!
    http://forum.java.sun.com/thread.jspa?messageID=4349619

  • File upload using java code ....?

    Hi,
    I have used below code to upload files into Tomcat server .
    Every thing is working fine , but when i try to upload file size more then 400kb i am getting the Exception is :::::::::*javax.servlet.ServletException: javax/servlet/jsp/SkipPageException*
    Let me know if any thing require to change on the below code to upload big size files..
    String contentType = request.getContentType();
    //out.println("Content type is :: " +contentType);
    if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0)) {
    DataInputStream in = new DataInputStream(request.getInputStream());
    int formDataLength = request.getContentLength();
    byte dataBytes[] = new byte[formDataLength];
              int byteRead = 0;
              int totalBytesRead = 0;
              while (totalBytesRead < formDataLength) {
              byteRead = in.read(dataBytes, totalBytesRead, formDataLength);
              totalBytesRead += byteRead;
              int lastIndex = contentType.lastIndexOf("=");
              String boundary = contentType.substring(lastIndex + 1,contentType.length());
              //out.println(boundary);
              String file = new String(dataBytes);
    saveFile="C:\\Program Files\\Apache Software Foundation\\Tomcat 5.5\\webapps\\StorageFolder\\Files\\UserData\\"+saveFile;
                        int pos;
                        pos = file.indexOf("filename=\"");
                        pos = file.indexOf("\n", pos) + 1;
                        pos = file.indexOf("\n", pos) + 1;
                        pos = file.indexOf("\n", pos) + 1;
                        int boundaryLocation = file.indexOf(boundary, pos) - 4;
                        int startPos = ((file.substring(0, pos)).getBytes()).length;
                        int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length;
                        FileOutputStream fileOut = new FileOutputStream(saveFile);
                        //fileOut.write(dataBytes);
                        fileOut.write(dataBytes, startPos, (endPos - startPos));
                        fileOut.flush();
                        fileOut.close();
    The above code is working file for small file size only ,if the file size exceeds 400kb then it will through a
    *javax.servlet.ServletException: javax/servlet/jsp/SkipPageException          *

    Hi,
    yeah i have included above code in Try{} catch {} block even though i am getting an exception if file size exceeds 400kb . ..
    when i try to upload a file more than 400kb i am getting the below exception .
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: javax/servlet/jsp/SkipPageException
    *     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:273)*
    *     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)*

  • Where to place the class file of the java bean when using the packager

    I am using the activex bridge in j2se 1.5.0_06
    now i have created the jar file for my bean but where do i place the class file?
    i.e the bean..if i keep it in jdk\bin the packager gives me an error..i created a folder in my public jre jre\axbridge\bin and placed the class file there too but even this didnt work
    Kindly tell me what is the fully qualified package bean name if i have placed all my files under jdk\bin..

    D:\Java\jdk1.5.0_06\bin>packager -reg d:\java\jdk1.5.0_06\bin\PersonBean.jar Per
    son
    Processing D:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\\Person.idl
    Person.idl
    Processing D:\PROGRA~1\MICROS~2\VC98\INCLUDE\oaidl.idl
    oaidl.idl
    Processing D:\PROGRA~1\MICROS~2\VC98\INCLUDE\objidl.idl
    objidl.idl
    Processing D:\PROGRA~1\MICROS~2\VC98\INCLUDE\unknwn.idl
    unknwn.idl
    Processing D:\PROGRA~1\MICROS~2\VC98\INCLUDE\wtypes.idl
    wtypes.idl
    Registration failed:
    The packaged JavaBean is not located under the directory <jre_home>\axbridge\bin
    this is the error i get

  • How to pass value from the jsp file to a java bean

    I have huge promblem .I want to pass value of combo box to bean file to set my database contecting.The is how i call function to pass database to the bean file
    <%db.setDatabase(database);%>are coding to set my databse connection
    private String database;
        public Conn(){
         try{
                   Class.forName("org.gjt.mm.mysql.Driver");
                   DriverManager.registerDriver((Driver) Class.forName("org.gjt.mm.mysql.Driver").newInstance());
                   String data=getDatabase();
                   String url = "jdbc:mysql://localhost/"+data;
                   Connection conn = DriverManager.getConnection(url);
                   setConnection(conn);
              catch(SQLException e){
                   System.out.println(e.toString());
              catch(Exception e){
                   System.out.println(e.toString());
         public void setDatabase(String Database){
          this.database = Database;
         public String getDatabase(){
         return this.database;
         }     and Below are error produce
    Note: sun.tools.javac.Main has been deprecated.
    /mrs/system_menu.jsp:18: Method setDatabase(java.lang.String) not found
    in class bgoc.dbConn.Conn.
    db.setDatabase(database);
    ^
    1 error, 1 warning
    please help me soon. any that come to your will help
    thank you

    I have huge promblem .I want to pass value of combo box to bean file to set my database contecting.The is how i call function to pass database to the bean file
    <%db.setDatabase(database);%>are coding to set my databse connection
    private String database;
        public Conn(){
         try{
                   Class.forName("org.gjt.mm.mysql.Driver");
                   DriverManager.registerDriver((Driver) Class.forName("org.gjt.mm.mysql.Driver").newInstance());
                   String data=getDatabase();
                   String url = "jdbc:mysql://localhost/"+data;
                   Connection conn = DriverManager.getConnection(url);
                   setConnection(conn);
              catch(SQLException e){
                   System.out.println(e.toString());
              catch(Exception e){
                   System.out.println(e.toString());
         public void setDatabase(String Database){
          this.database = Database;
         public String getDatabase(){
         return this.database;
         }     and Below are error produce
    Note: sun.tools.javac.Main has been deprecated.
    /mrs/system_menu.jsp:18: Method setDatabase(java.lang.String) not found
    in class bgoc.dbConn.Conn.
    db.setDatabase(database);
    ^
    1 error, 1 warning
    please help me soon. any that come to your will help
    thank you

  • Pluggable Java Beans examples using Native IE mode

    Hello
    I would like to know if anybody has tested JPC using IE=NATIVE
    setting to avoid using JInitiator
    I have tried and done the following
    I downloaded a JPC from http://forms.pjc.bean.over-blog.com/categorie-453384.html to try add File chooser functionality
    I tried it useing Jinitiator and it works perfectly.
    i then added the jar file to ARCHIVE_IE
    archive_ie=f90all.cab,GetImageFileName.jar
    The java console gave a message indicating that the JAR has been skipped.
    I figured that i need to convert the jar file into a CAB file
    I Used cabarc.exe to create MS archive cabinets
    1- I extracted the GetImageFileName.jar file to an oracle directory
    2- Archived again to MS format
    cabarc -r -p n GetImageFileName.cab oracle\*.*
    3- I included the cab file in the formsweb.cfg as follows
    archive_ie=f90all.cab,GetImageFileName.cab
    4- I ran the form, no error was generated, but at the same time the
    function was not executed (no dialog poped up).
    If you are wondering why i am not using webutil, it is because the user
    does not want to use Jinit. Webutil does not work without Jinit.
    thanks
    Regards
    Ammar Sajdi
    www.e-ammar.com
    www.realsoft-me.com
    www.palco-me.com

    While trying to work with PJC on Forms REL 2, i noticed that the default FORMWEB.CFG does not have all setting related to Native IE
    Can anybody confirm if NATIVE IE is no more support in REL 2
    Ammar Sajdi

  • Problems with a java bean in Weblogic 5.1

    Hello,
              I am having a problem deploying a java bean in Weblogic 5.1:
              I have been given a .class and a .jar file for a java bean (not an EJB). I
              placed the .class file into e:\temp\WEB-INF\classes and added the following
              line to my weblogic.properties file:
              weblogic.httpd.webApp.testApp=e:/temp/
              I have also updated the web.xml file in the WEB-INF directory as follows:
              <?xml version="1.0" encoding="UTF-8"?>
              <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
              Application 1.2//EN"
              "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
              <web-app>
              <servlet>
              <servlet-name>EdIface</servlet-name>
              <jsp-file>test.jsp</jsp-file>
              </servlet>
              <servlet-mapping>
              <servlet-name>EdIface</servlet-name>
              <url-pattern>EdIface</url-pattern>
              </servlet-mapping>
              </web-app>
              When I try to access my http:\\server:port\testApp\test I get an "Error
              500 - internal server error".
              Has anyone had experice with deploying a java bean with jsut the .class and
              .jar file? Where should I put the .jar file?
              I appreciate any advice!
              

    Bump

  • Convert xml to java bean

    hi all
    i want to know how to convert a XML file to a java bean and this bean should be integrated with obejectweb,a open source middleware.
    1. how to create beans in NetBeans5.5
    2. how to run the bean
    3. how to connect the xml file to a bean program

    I think you need to start over and read a few tutorials. You cannot "run" a bean (unless it has a main() method but that would be very non-standard). You should not worry about which IDE you are using (Eclipse, NetBeans, etc.) And you do not "connect" the XML file to the bean, which again is not a program.
    The technologies you want to use will be JAXB (java XML binding) or Apache's XMLBeans. Both will require you to write a XML schema, which those API's can then use to create JavaBeans for you. There are tutorials for JAXB here at Sun and at Apache for XMLBeans.
    - Saish

  • XSD to java bean

    Hi all,
    I'm looking for a utility that converts an XSD file into a java bean code.
    Thanks in advance

    or perhaps jaxb
    http://java.sun.com/webservices/jaxb/index.jsp

  • How to deploy the wrapped Java Bean on PowerBuilder

    Using the JavaBeans Bridge for ActiveX Packager, I could generate the .tbl and .reg files for my Java Bean. Since I am a 100% Java guy and don't have much knowledge of PowerBuilder, I don't know how to deploy this on PB. When I try to register an OLE, PB looks for the files with an extension .ocx but not .tbl. Please let me know how I can see my wrapped up Java Bean on PowerBuilder or on VB.
    Thanks a lot in advance.

    I found it, I have to update the system registry with the .reg file and then the java bean automatically gets listed in the controls list in PB.

  • Newbie : memory problem with file uploading

    Hello
    I'm exdending a web app based on jsf and , being new to it and java in general, i'm having a problem with file uploading.
    The customer needs to upload large file (more than 30 MB). The application accomplish this using a fileupload component, to let the user select the file, and passing the array of bytes to a web service method.
    I'm using netbeans 6, tomcat 5.5.
    When i try to upload a file too large i got an outofmemory on the local tomcat. So i've rised jvm memory and going on with tests i've found that growing the size i got an http 500 error from the service (the developer of the service has found an out of memory too ).
    I think the service is not modifiable, so i were asking if threre were a way to optimize the file uploading process (a component, a library, a pattern ...) or my only chioice is to rise available memory on both sides.
    I've notice the wsdl declares as base64binary type the data parameter , while netbeans 6 generates a client proxy with a byte[] parameter. Is correct or is a netbeans problem?
    searching with google i've found few thing i haven't fully understood due to my lack of experience:
    the mtom , how can evaluate if it's suitable to help in my problem (i suppose it involves more the web service rather than the client)
    something about the size of a soap body.
    thank you in advance
    Stefano

    Which component exactly are you using? Declaring the stream as a raw byte[] is certainly not efficient. Write code yourself, don't let it autogenerate.
    I can highly recommend you the Tomahawk t:inputFileUpload component. It is easy to integrate in Mojarra. You can find here an useful article: [http://balusc.blogspot.com/2008/02/uploading-files-with-jsf.html].

  • File Upload Problem in JSF

    Hi all,
    I have a problem in file upload. I have a file upload third party component which uploads the file with the filter action depending on the url. My requirement is to trace the uploaded filename for addressing it with the database record. So I need the filename in my backing bean to store it in the database. Ho can i get the filename from view page to backing bean. Any Ideas and help please.
    Many thanx,
    vijaycanaan

    Mr BalusC,
    Yes Iam talking about a custom made upload component. The fileupload tutorials u send are good but my requirement is not meeting them. Among my requirements one is mutilple file uploads in the single view page. This is possible at present with my custom upload componet. Only if the problem gets solved. Any way once again please think on my problem and give your solution on it.
    Here is my problem:
    The problem is I have to access the components from view page which this kind of requirement possible in jsp by request parsing which results the key value pairs of the form components. This same thing/way I should get in backing bean from JSF view page.
    The solution I want may like as follows.
    Note this code is incorrect and wrong but for to understand my requirement.
    someobject.getComponentIdValue("clientID"); which returns a string value as d:\images\Tutle.jpg
    The clientID is upload file component' Id . In the request it may be the key associated with value as file complete path. By this kind of way my upload filter is able to get the orignal file. Ok i need this in my  backing bean to get the orignal filename to insert into the database. Please for this give the solution or reply.many thanx,
    vijaycanaan.

  • File upload diff server

    hi
    i have done the file upload using java program with in same network.but when i try to upload to a file server of other domain then the upload is not working.i can ping to the file server but through java application the file does n't get uploaded.i am sure this is some networking issue.can you help me on this?
    Thanks
    Sandeep

    Hi,
    I think you can map the file server driver to a disk of the webserver, and be sure that the java applation can read/write the disk.
    Perhaps it can , i don't try it. Just an idea.
    good luck.

  • File Upload Extension

    When using the Input File Upload (af:inputFile) component, is there a way to set the file extension for certain mime types?
    For example, when the user uploads a file, I only want to allow files with the .doc (MS Word) extension. Thanks.

    Actually not. You can only check the filename or mime type after the user has selected and uploaded the file. Then you can use the code from the post above.
    Timo

  • How to upload a file using java bean?

    hi,
    i need a code simple how to upload a file from jsp form to a java bean file (not a servlet)
    thank,s zik

    Hi,
    i need a code sample how to upload a file from jsp
    form to a java bean file (not a servlet)You can use jspSmartUpload component which is a free, fully-featured JSP component.
    jspSmartUpload provides you with all the upload/download features you could possibly wish for :
    * Simple and complete upload
    * Total control over the upload process
    * �Mixed forms� management
    * Total control over files sent
    * Download whatever you want
    For further information about jspSmartUpload please visit
    http://www.jspsmart.com/
    Hope this helps.
    Good Luck.
    Gayam.Srinivasa Reddy
    Developer Technical Support
    Sun Micro Sysytems
    http://www.sun.com/developers/support/

Maybe you are looking for

  • Io6 update deleted my mobileme account and all my emails and won't let me add it again. Does anyone know if there is a way?

    I updated my iPhone 3GS with the new IO6 update last night and when it rebooted, my mobileme email account had been deleted along with all of my emails. I am unable to add the account again despite copying the settings on my ipad. There must be a way

  • Unknown error -200... HELP!!

    when i first installed iTunes 7 onto my computer, it worked fine. But then i did a system restore, and when i tried to open it again, a message popped up saying, The iTunes application cannot be opened. An unknown error occurred (-200). I tried reins

  • Sorting based on non-base table columns

    I have a form block based on X table. There are also some columns from Y table in the same block and the tables X and Y are joined through the appropriate columns. I want to sort the queried record in the block ( based on table X ) based on two colum

  • How do I remove the extra large icons

    I unplugged my phone this morning and the icons are HUGE. I can't see to do anything. I have tried everything, I tried to turn it off, and then on again. I tried to go into settings to make the icons smaller. I am unable to use from phone. Any advice

  • Can't re-install cs 3.2 or uninstall - help

    get an error message: can't be xxxxxxxxx because j-script is not properly registered. please repair j script. i'm roadblocked as the program is unusable its critical to get up and running soon. What should i do please? thank you