1 2 Previous Next 22 Replies Latest reply: Sep 6, 2009 1:49 AM by AmmadAhmed RSS

    webutil images

    450503
      Hi All,
      I have a problem in using the webutil hope can get some help here

      I have provided an option to attach scanned documents and images on the form where in the path of it will be stored on the form but the image will be loaded from the physical drive when ever a user click on the view button.
      It is working fine when im on the server itself .
      When i try to attach one file from the client machine then it is giving me the error.

      The source for attaching the image and for viewing is followed here

      ***** when button pressed trigger for attaching


      Declare     
      v_type      varchar2(4);
      v_path     varchar2(100);
      begin

           v_path := Client_Get_file_name(file_filter=>'All Files (*.*) |*.*|Bmp Files (*.Bmp)|*.Bmp|Gif Files(*.gif)|*.gif|Tiff Files (*.Tif)|*.Tif|JPEG Files (*.jpg)|*.jpg|');
           :block2.rdocpath:=v_path ;
           if ltrim(v_path) is not null then
                v_type := substr(v_path,-3);
                Client_Image.Read_image_file(v_path, v_type, 'img.img');
                if form_success then
                     go_item('img.img');
                end if;
           end if;
      end;

      and for viewing the source image


      :parameter.helpitem := :system.cursor_item;
      Declare     
      v_type      varchar2(4);
      v_path     varchar2(100);
      AL NUMBER;
      begin
      IF :block2.rdocpath IS NOT NULL THEN
           V_PATH:=:block2.rdocpath;
           GO_BLOCK('img');
           CLEAR_BLOCK(NO_VALIDATE);
           Client_Image.Read_image_file(v_path, v_type, 'img.img');
           GO_BLOCK('img');
           
      ELSE
           SET_ALERT_PROPERTY('STOP',ALERT_MESSAGE_TEXT,'Image file not specified');
           al:=show_alert('STOP');
           GO_BLOCK('img');
           CLEAR_BLOCK(NO_VALIDATE);
                GO_BLOCK('RETSHAREPURCH2');
           end if;
      end

      Please help
        • 1. Re: webutil images
          François Degrelle
          what error ?
          • 2. Re: webutil images
            450503
            error is FRM-47100

            It is trying to locate the file in the server itself I believe and not at the client machine.
            Please look into this and help
            Regards
            • 3. Re: webutil images
              François Degrelle
              I do not understand your code.

              Does the first procedure run ok ?

              In the second, you seem to not display image but read another one with the Read_Image_File() again.
              Does the VPATH variable contains a correct value ?

              Francois
              • 4. Re: webutil images
                450503
                I have two buttons placed on the form.one for opening and displaying the image and the second one for directly displaying the image for which the path is stored in a field that is block2.rdocpath .
                both the procedures are running ok on the server.
                the problem is when I try to run from a client machine where in it is trying to loacate the fies in the directories off the server and not the client machine.
                Regards
                • 5. Re: webutil images
                  François Degrelle
                  And you are sure the V_PATH variable contains a client local file name location ?

                  Francois
                  • 6. Re: webutil images
                    450503
                    Yeah in the first procedure the variable v_path will have the file name from the local client . I am able to read the complete path of the file including the file name in the v_path variable. but when it is trying to load the specified file thru read image it is looking for the specified directories in the server and not the client machine that is where the problem is.
                    • 7. Re: webutil images
                      François Degrelle
                      This is inexplicable.
                      You have to be sure that your procedure use CLIENT_READ_IMAGE_FILE() and not READ_IMAGE_FILE()

                      Francois
                      • 8. Re: webutil images
                        450503
                        Wel Francois as you can see in my source code im using
                        this line to read
                        Client_Image.Read_image_file(v_path, v_type, 'img.img')

                        I havent seen the function or procedure which you are talking about in the web util package.
                        I think it has some thing to do with the way we configure our webutil package.
                        Or may be some other reason. which im not able to identify.
                        can u rewrite the code pls which I have posted and send me back for me with the suggestions as u are trying to do as I couldnt understand your point
                        Regards
                        • 9. Re: webutil images
                          François Degrelle
                          The Client_Image.Read_image_file internally use the Read_image_file() built-in, but after the local file is copied to the A.S.

                          Maybe there is something wrong with your Webutil config.
                          Did you allow the AS ans DATABASE transfert in the webutil.cfg file ?

                          Francois
                          • 10. Re: webutil images
                            450503
                            how to do that . Please tell me the things which I need to check and do in that file.
                            Regards
                            • 11. Re: webutil images
                              François Degrelle
                              Find and open the webutil.cfg file

                              # 3. Upload / Download options
                              # For the file upload and download options you can define the default
                              # locations on the server that webutil can use as a work area
                              # Optionally you can switch upload and download off
                              #
                              # Details
                              # -------
                              # transfer.database.enabled: Can be TRUE or FALSE - allows you to disable
                              # upload and download direct from the database
                              # server.
                              # transfer.appsrv.enabled: Can be TRUE or FALSE - allows you to disable
                              # upload and download direct from the application
                              # server.
                              # transfer.appsrv.workAreaRoot: The root of the location in which WebUtil can
                              # store temporary files uploaded from the client.
                              # This location is always readable and writable
                              # no matter what the settings in appsrv.read and
                              # appsrv.write are.
                              # This setting is required if you need the
                              # Client side READ /WRITE_IMAGE_FILE procs
                              # transfer.appsrv.accessControl:Can be TRUE or FALSE - allows you to indicate
                              # that uploads and downloads can only occur from
                              # the directories named in the
                              # transfer.appsrv.read.n and transfer.appsrv.write.n
                              # entries and their subdirectories. If this setting
                              # is FALSE transfers can happen anywhere.
                              # transfer.appsrv.read.<n>: List of directory names that downloads can read
                              # from.
                              # transfer.appsrv.write.<n>: List of directory names that uploads can write
                              # to.

                              #NOTE: By default the file transfer is disabled as a security measure
                              transfer.database.enabled=TRUE
                              transfer.appsrv.enabled=TRUE
                              transfer.appsrv.workAreaRoot=d:\temp
                              transfer.appsrv.accessControl=TRUE
                              #List transfer.appsrv.read.<n> directories
                              transfer.appsrv.read.1=d:\temp

                              As you can see, you have to set to TRUE the file transfert and set read and/or write directory on the A.S.

                              Francois
                              • 12. Re: webutil images
                                450503
                                This is My Existing Webutil.cfg file .lease have a look at it and advise the need ful
                                Thanks & Regards


                                # -------------------------------------------------------
                                # webutil.cfg - WebUtil default configuration file
                                # -------------------------------------------------------
                                # This file provides all of the configuration settings
                                # for webutil. These are divided into the following
                                # sections:
                                # 1. Logging Options
                                # 2. Installation Options
                                # 3. FileUpload and Download Options
                                # 4. Untranslatable Strings
                                # 5. Translatable Strings


                                # 1. Server Side Logging Options for logging errors and log messages
                                # You must set Enabled to true to allow mid tier logging without this
                                # mid tier logging will not take place no matter what PL/SQL or URL
                                # options are supplied to switch it on
                                # Once logging is enabled the other settings come into play
                                #
                                # Details
                                # -------
                                # file : Defines the file name and location of the log file.
                                # Note that WebUtil does no log file management you may
                                # need to manually clean this file up from time to time
                                # enabled : Can be TRUE or FALSE
                                # errorsonly : Can be TRUE or FALSE setting to true will ensure that
                                # only errors and not normal informational log messages
                                # are written to the log file
                                # For product use this would normally be set to TRUE
                                # connections: Can be TRUE or FALSE setting to true will cause each connection
                                # from a form using WebUtil to write into the log as it sets up.

                                logging.file=
                                logging.enabled=FALSE
                                logging.errorsonly=FALSE
                                logging.connections=FALSE


                                # 2. Installation Options
                                # WebUtil needs to download some files to the client in order to perform
                                # certain integration operations such as OLE or Registry Access
                                # These files are downloaded the first time that you access one of the
                                # functions than needs them
                                # You have to define the location of these files on the server
                                #
                                # Details
                                # -------
                                # syslib.location: The vitual path to the directory holding the
                                # the webutil library files on the server side
                                # this must either be an absolute URL or a url
                                # URL that is relative to the documentbase
                                #
                                # syslib.<os>.<package>.<n>: The name(s) of the libraries required for particular
                                # webutil beans
                                # The format of this is name|size|version|showDownloadDialog
                                # multiple libraries can be downloaded per package but
                                # ensure that the <n> values are consecutive and start at 1

                                install.syslib.location=/webutil

                                ## Do not change the following lines unless instructed to do so
                                install.syslib.0.7.1=jacob.dll|94208|1.0|true
                                install.syslib.0.9.1=JNIsharedstubs.dll|65582|1.0|true
                                install.syslib.0.9.2=d2kwut60.dll|192512|1.0|true

                                ## But you can add your own libraries in here
                                #install.syslib.0.user.1=testwebutil.dll|204872|1.0|true




                                # 3. Upload / Download options
                                # For the file upload and download options you can define the default
                                # locations on the server that webutil can use as a work area
                                # Optionally you can switch upload and download off
                                #
                                # Details
                                # -------
                                # transfer.database.enabled: Can be TRUE or FALSE - allows you to disable
                                # upload and download direct from the database
                                # server.
                                # transfer.appsrv.enabled: Can be TRUE or FALSE - allows you to disable
                                # upload and download direct from the application
                                # server.
                                # transfer.appsrv.workAreaRoot: The root of the location in which WebUtil can
                                # store temporary files uploaded from the client.
                                # This location is always readable and writable
                                # no matter what the settings in appsrv.read and
                                # appsrv.write are.
                                # This setting is required if you need the
                                # Client side READ /WRITE_IMAGE_FILE procs
                                # transfer.appsrv.accessControl:Can be TRUE or FALSE - allows you to indicate
                                # that uploads and downloads can only occur from
                                # the directories named in the
                                # transfer.appsrv.read.n and transfer.appsrv.write.n
                                # entries and their subdirecories. If this setting
                                # is FALSE transfers can happen anywhere.
                                # transfer.appsrv.read.<n>: List of directory names that downloads can read
                                # from.
                                # transfer.appsrv.write.<n>: List of directory names that uploads can write
                                # to.

                                #NOTE: By default the file transfer is disabled as a security measure
                                transfer.database.enabled=TRUE
                                transfer.appsrv.enabled=TRUE
                                transfer.appsrv.workAreaRoot=c:\temp
                                transfer.appsrv.accessControl=TRUE
                                #List transfer.appsrv.read.<n> directories
                                transfer.appsrv.read.1=c:\temp
                                #List transfer.appsrv.write.<n> directories
                                transfer.appsrv.write.1=c:\temp




                                # 4. Untranslatable Strings
                                # These errors can happen early in the initialisation process before we
                                # have the client locale information to use to detect the correct
                                # language version for the error
                                EN.msg.error.error008=WUC-008: Server side logging was requested but no log file was specified - logging is disabled


                                # 5. Translatable Strings
                                # The following properties represent Strings displayed in various server
                                # side error messages
                                # They are available here to allow customisation
                                # Messages are in the Format "<countrycode>.msg.key
                                # The message reading code picks up the country code automatically from the
                                # client. If the required country code cannot be found then the english (EN)
                                # message is displayed as a default.
                                # You may alter the EN versions of each key, but do not remove them!
                                #
                                # General Dialog titles
                                EN.msg.install.progress.title=WebUtil Install
                                EN.msg.install.progress.subtitle=Downloading required libraries; Please wait...
                                EN.msg.errordialog.title=WebUtil Error

                                # App Server side errors
                                EN.msg.error.error007=WUC-007: Unable to write to WebUtil logging file
                                EN.msg.error.error015=WUC-015: Your Form must contain the following Bean for this function to be available:
                                EN.msg.error.error408=WUH-408: The WebUtil Client code sent back a bad Process ID - Please report this error
                                EN.msg.error.error110=WUT-110: Database LOB is of zero length
                                EN.msg.error.error111=WUT-111: Database LOB is un-initialised
                                EN.msg.error.error112=WUT-112: Invalid open mode for Blob. Value should be W or R
                                EN.msg.error.error113=WUT-113: Too many rows match the supplied where clause
                                EN.msg.error.error114=WUT-114: SQL Error
                                EN.msg.error.error115=WUT-115: Checksum Failed
                                EN.msg.error.error116=WUT-116: Transfer already in progress
                                EN.msg.error.error117=WUT-117: Application Server file name cannot be null
                                EN.msg.error.error118=WUT-118: Application Server file does not exist or is of zero length
                                EN.msg.error.error119=WUT-119: Error reading data from Application Server file
                                EN.msg.error.error120=WUT-120: Zero bytes read from Application Server file
                                EN.msg.error.error121=WUT-121: This file transfer has been forbidden by the Adminstrator
                                EN.msg.error.error122=WUT-122: Java Functions are not available on the Appliciation Server
                                EN.msg.error.error123=WUT-123: The webutil.jar file cannot be found on the Appliciation Server Classpath - Some file transfer functions will not work.
                                EN.msg.error.error124=WUT-124: Unable write data on the application server
                                EN.msg.error.error125=WUT-125: Checksum error closing file on application server
                                EN.msg.error.error126=WUT-126: Error closing application server file
                                EN.msg.error.error127=WUT-127: Unable to create workarea
                                EN.msg.error.error128=WUT-128: Exception creating workarea

                                #German versions of the Dialog Titles
                                DE.msg.install.progress.title=WebUtil Installation
                                DE.msg.install.progress.subtitle=Benötigte Bibliotheken werden geladen; Bitte warten ...
                                DE.msg.errordialog.title=WebUtil Fehler

                                #German versions of the Errors
                                DE.msg.error.error007=WUC-007: Kann nicht auf die WebUtil Log Datei zugreifen
                                DE.msg.error.error015=WUC-015: Folgende Bean muss in der Form enthalten sein um diese Funktion zu nutzen:
                                DE.msg.error.error408=WUH-408: Der WebUtil Client Code hat eine ungültige Prozess ID zurückgegeben - Bitte melden Sie diesen Fehler
                                DE.msg.error.error110=WUT-110: Datenbank LOB hat eine Länge von Null
                                DE.msg.error.error111=WUT-111: Datenbank LOB ist nicht initialisiert
                                DE.msg.error.error112=WUT-112: Ungültiger Modus zum Öffnen eines Blobs. Wert muss W oder R sein
                                DE.msg.error.error113=WUT-113: Zu viele Reihen entsprechen der angegebenen Bedingung
                                DE.msg.error.error114=WUT-114: SQL Fehler
                                DE.msg.error.error115=WUT-115: Checksummen Fehler
                                DE.msg.error.error116=WUT-116: Übertragung erfolgt bereits
                                DE.msg.error.error117=WUT-117: Ein gültiger Dateiname auf dem Applikation Server ist erforderlich
                                DE.msg.error.error118=WUT-118: Datei auf dem Applikation Server fehlt oder hat eine Länge von Null
                                DE.msg.error.error119=WUT-119: Fehler beim Lesen der Datei auf dem Applikations Server
                                DE.msg.error.error120=WUT-120: Es konnte kein Byte vom Applikation Server gelesen werden
                                DE.msg.error.error121=WUT-121: Die Übertragung dieser Datei wurde vom Administrator unterbunden
                                DE.msg.error.error122=WUT-122: Java Funktionen sind auf dem Applikations Server nicht verfügbar
                                DE.msg.error.error123=WUT-123: Die Datei webutil.jar befindet sich nicht im CLASSPATH des Applikations Servers - Einige Dateiübertragungsfunktionen stehen somit nicht zur Verfügung
                                DE.msg.error.error124=WUT-124: Es konnte nicht schreibend auf den Applikations Server zugegriffen werden
                                DE.msg.error.error125=WUT-125: Checksummen Fehler beim Schließen der Datei auf dem Applikations Server
                                DE.msg.error.error126=WUT-126: Fehler beim Schließen der Datei auf dem Applikations Server
                                DE.msg.error.error127=WUT-127: Der Arbeitsbereich konnte nicht erstellt werden
                                DE.msg.error.error128=WUT-128: Ausnahmefehler beim Erstellen des Arbeitsbereiches

                                #French versions of the Dialog Titles
                                FR.msg.install.progress.title=WebUtil Installation
                                FR.msg.install.progress.subtitle=Benötigte Bibliotheken werden geladen; Bitte warten ...
                                FR.msg.errordialog.title=WebUtil Fehler

                                #French versions of the Errors
                                FR.msg.error.error007=WUC-007: Ecriture impossible dans le fichier de log WebUtil
                                FR.msg.error.error015=WUC-015: Votre forme doit contenir le Bean suivant pour que cette fonction soit disponible:
                                FR.msg.error.error408=WUH-408: Le client Webutil a renvoyé un numero de process erroné - Contactez votre administrateur
                                FR.msg.error.error110=WUT-110: LOB dans la base de données a une longueur de zero
                                FR.msg.error.error111=WUT-111: LOB dans la base de données n'est pas initialisé
                                FR.msg.error.error112=WUT-112: Mode d'ouverture invalide pour un BLOB. La valeur doit être W ou R
                                FR.msg.error.error113=WUT-113: Trop de lignes renvoyées pour cette clause where
                                FR.msg.error.error114=WUT-114: Erreur SQL
                                FR.msg.error.error115=WUT-115: Echec du Checksum
                                FR.msg.error.error116=WUT-116: Transfer déjà en progrès
                                FR.msg.error.error117=WUT-117: Le nom du fichier sur le serveur d'application ne peut être null
                                FR.msg.error.error118=WUT-118: Le nom du fichier sur le serveur d'application n'existe pas ou a une taille de zero
                                FR.msg.error.error119=WUT-119: Erreur en lecture des données provenant du fichier sur le serveur d'application
                                FR.msg.error.error120=WUT-120: Zero bytes lu à partir du fichier sur le serveur d'application
                                FR.msg.error.error121=WUT-121: Ce transfert de fichier est interdit par l'administrateur
                                FR.msg.error.error122=WUT-122: Java Fonctions non disponibles sur le serveur d'application
                                FR.msg.error.error123=WUT-123: Le fichier webutil.jar n'est pas present dans le Classpath du serveur d'application - Certaines fonctions de transfert de fichiers ne fonctioneront pas
                                FR.msg.error.error124=WUT-124: Impossible d'écrire sur le serveur d'application
                                FR.msg.error.error125=WUT-125: Erreur de Checksum en fermant le fichier sur le serveur d'application
                                FR.msg.error.error126=WUT-126: Erreur pendant la fermeture du fichier sur le serveur d'application
                                FR.msg.error.error127=WUT-127: Creation de la Workarea impossible
                                FR.msg.error.error128=WUT-128: Exception pendant la creation de la workarea
                                • 13. Re: webutil images
                                  François Degrelle
                                  transfer.appsrv.read.1=c:\temp
                                  transfer.appsrv.write.1=c:\temp


                                  that's mean that you test on iDS ? (on your own machine)
                                  How can you say that it look for the image on the A.S. ?
                                  (wich is the same as your local machine)

                                  Or your A.S is another Windows machine ?

                                  Francois
                                  • 14. Re: webutil images
                                    450503
                                    no I am testing on 10g IAS and 9i Database with 9iDS. I have installed win2k server ,Db and As are installed on the same machine.So is my application files
                                    1 2 Previous Next