Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Binary\BLOB issues with Oracle

    Hello, I have a table with Blob column (and the needed supporting metadata fields, in order to map it to "binary"), but I can't view\download it from the app.
    We're using Oracle 11g in the backend.

    We can upload a file using a listGrid or a DynamicForm on the dataSource properly.
    The problem starts when trying to view or download the binary.
    The error in the logs is IOException - "Must be logged on to server". obviously we are connected, we just fetched the record without the binary.
    A bit before the ERROR there is an INFO from the SQLDataSource class-
    "builtinApplication.FILES_viewFile ..... Performing fetch .. criteria{id:1,download_fieldname:"data",download_filename:"bla"} "
    This is followed by a WARN from the SQLWhereClause that states that the download_filename and download_fieldname do not exist.
    I feel like the request is coming to the wrong place.

    Have you every encountered this error?

    Thank you!

    #2
    About that error message "Must be logged on to server" - sounds like it's coming from a third party product. Post the stack trace as a first step (always do this).

    About binary fields related to the main field - it seems like this must be your colleague. This discussion has already completed and moved onto Feature Sponsorship.

    Comment


      #3
      I can't post the actual StackTrace because it contains confidential information and on a seperate network from this computer.

      The stacktrace ranges between isomorphic's classes, InputStream, and Oracle's classes.
      The problem occurs with Oracle9 and Oracle11, using ojdbc14 and ojdbc6 jars.

      Where can I see an example code of viewing\downloading binary?

      Thanks.

      Comment


        #4
        to be more precise - we had configured it all as we believe that smart expects us to. this has nothing to do with the feature we were asking in the other post.

        Comment


          #5
          If you consider basic debugging information to be confidential, you should purchase an Enterprise Support contract in order to have access to the private support extranet. There's no possibility of troubleshooting without basic information like this.

          Comment


            #6
            that`s a bit tricky - we cannot purchase before we make sure it suits our needs..

            i guess a code sample would work (but please make sure that the sample is close to our case)

            thanks!

            Comment


              #7
              Without basic troubleshooting information there's no way we can help you. You've told us you're seeing an error message "Must be logged on to server" and that's it. No one could possibly do anything with this information.

              If you really think a stack trace is confidential, send it to support@isomorphic.com, along with all other relevant details (such as the complete server-side log of the attempt to connect).

              Comment


                #8
                Getting stuff out of our network is a long-long process, so in the mean while
                could you please refer us to a full code and configuration sample of view/download binary data with oracle-sql-datasource?

                (we already google it but found no answer)

                thanks!

                Comment


                  #9
                  All you need to do is take the Upload sample in the SDK and switch databases via the Admin Console. Very simple.

                  Comment


                    #10
                    I read the sample, i can see why our upload isn't working.

                    But - in terms of view/download - i cannot figure,
                    we set the field in the ds.xml file to the type of "binary" and added all the required fields to that table. As far as i can understand ur API that should be it. On the grid we can see the magnifier and the download icons next to the field, it reads its name when the dialog box pop ups just fine, but when we press save it download 0 bytes and prints an error with an extra field that he could not find (download_filename - our field name is data..).

                    do i miss anything?

                    Comment


                      #11
                      .. and that's why we need to see the error message and logs. We have literally dozens of applications running on Oracle with upload/download capability. You've done something wrong, but we can't figure out what it is without the basic diagnostic information we've requested.

                      Comment


                        #12
                        OK!

                        But i`ll try once again - is there a sample of binary download/view sample?
                        (not imageFile, not upload)

                        Comment


                          #13
                          Exactly the same code, just change the field type to "binary". The primary effect of setting the field type to "imageFile" is that the tilegrid and form renders the image inline by default as opposed to providing view/download icons like the grid.

                          You've already got the right sample, you've just done something wrong with your JDBC install or server configuration.

                          Comment


                            #14
                            I Hope this will be enough:

                            using jdb6.jar, the server.properties from showcase with oracle 11g db

                            the last info print is "INFO ProxyHttpServletResponse - content-disposition to: attachment' fileName=test.file - unwrapping response output stream (CompressionFilter)"

                            followed by the next error log:
                            "ERROR IDACall - Error executing operation: FILES_downloadFile
                            jaba.io.IOException: Closed Connection
                            at oracle...SQLToIOExcpetion (SatacaseError.java: 517)
                            at oracle...OracleBlobInputstream.needBytes(OracleBlobInputstream.java:187)

                            ...
                            at com.isomorphic.util.IOUtil.copyStreams(IOUtil.java:108)
                            at com.isomorphic.util.IOUtil.copyStreams(IOUtil.java:52)
                            ...

                            Hope that`s fine, let me know if you need anything else

                            Comment


                              #15
                              What is your exact version of SmartGWT (from the Developer Console)?

                              Try downloading a nightly build from http://smartclient.com/builds/smartgwtee-eval

                              Comment

                              Working...
                              X