Rmi problem... with blobs

i have to save some files on a remove server database
and i am using rmi for this.
i am able to pass the file name as parameter to the remote method but when i pass the file as the file object
it not storing the file but only the detail so when i am using the fileinputstream to pass it to setbinarystream to set it the prepare statement it is not posible as the actual file is in the
client and the setting or reading to the fileinputstream to set it for the setbinarysteam is done on the server.
and there is an error that the file is not found ..
any help or suggestion would be great
thank you
gautam

You can't pass a File object as a parameter.

Similar Messages

  • Problem with BLOB data type and acute characters

    Hi all, I have an issue related with BLOBS cols:
    I have table A with a BLOB column and I need to insert that data into another table B, the thing is I use dbms_lob.read() that returns data into a RAW variable and then I convert it to a varchar2(with utl_raw.cast_to_varchar2) and it works ok if I have no "acute characters" on it, e.g Québec.
    If I have acute characters, the "é" is inserted wrongly with an "¿" character on the table B. I tested the BLOB on the table A to check the data and the BLOB is showing correctly the "é" character, it seems that the dbms_lob.read() funct cannot handle accute characters and replace them with "¿".
    How can I replace acute characters when I use the dbms_lob.read functionality?
    Thank you!

    what's the OS of the db server? is this code an anonymous pl/sql block, or stored pl/sql? does it run on the server or a client? if it's on the client, what's the o/s of the client?
    you might want to look at the following, plus the first 3 notes in it's reference section
    https://metalink.oracle.com/metalink/plsql/f?p=130:14:3038746456038321058::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,264157.1,1,1,1,helvetica

  • Weird Problem with BLOB CMP field

    Hi,
    I am trying to deploy an EJB2.0 CMP Bean in Weblogic6.1 .The Bean has one of the CMP Field as a serializable object mapped to a BLOB Datatype in Oracle8i
    When i try to creae this Entity Bean
    I get "java.io.IOException: ORA-22920: row containing the LOB value is not locked" as a nested exception.
    When i increased the isolation level . I got "java.io.IOException: ORA-01002 fetch out of sequence" as the nested exception
    And one more horrible thing that is happening is the other arguments to the create method are getting updated in the DB except the Blob field(Supposed to rollback? when there is an EJB Exception ??)
    Any thoughts? Comments?
    Regards
    Sathya

    Hi,
    I seem to recall that there are multiple issues with BLOBS & WLS. I'll describe my setup, and you can see if your missing anything:
    - In weblogic-cmp-rdbms-jar.xml you need to set the column type as a Blob:
    <field-map>
    <cmp-field>binary</cmp-field>
    <dbms-column>binary</dbms-column>
    <dbms-column-type>OracleBlob</dbms-column-type>
    </field-map>
    - In weblogic-ejb-jar.xml you may need to set the isolation level of your set method:
    <transaction-isolation>
    <isolation-level>TRANSACTION_READ_COMMITTED_FOR_UPDATE</isolation-level>
    <method>
         <ejb-name>TerminalSoftwareKernelBDO</ejb-name>
         <method-name>setBinary</method-name>
    </method>
    </transaction-isolation>
    - The bean get/set methods should look like this:
    public abstract void setBinary(java.lang.Object binary);
    public abstract java.lang.Object getBinary();
    - In WLS 6.1 up to Service Pack 2 (I don't know about SP3 yet), BLOBs are incorrectly implemented. For some (odd) reason you can only put serialized objects into the DB... I think this means that if you have a BLOB put in by anything but WLS, WLS get very unhappy. So empty out your table with the blobs first.
    Hope that helps.
    Daniel.

  • Problem with blobs larger than (about) 2kb

    Hello,
    I try to insert binary files with java (jdbc) into tables in my 9i database, and small files with e.g. 500bytes are no problem, but files with 3 or more kbytes are not inserted yet. I got no sql-exception. It simply seems not written into my table.
    This is the SQL I used to create the table:
    create table tblblob2 (
    name varchar2(30),
    content blob)
    lob (content) store as glob_store (
    tablespace LOBSPACE_1
    storage (initial 100k next 100k pctincrease 0)
    chunk 4
    pctversion 10
    INDEX glob_index (
    tablespace raw_index))
    TABLESPACE LOBSPACE_1
    storage (initial 1m next 1m pctincrease 0);
    insert into tblblob2 (name) values ('Test')
    Before this I already tried a very simple create-statement, but it wouldnt work ,too. Thats why I tried this lob...
    And then I used java to update this row:
    DbConnectionHandling dbConnection = new DbConnectionHandling();
              dbConnection.connect();
              FileInputStream fis = null;
              Connection cn = dbConnection.connection;
              PreparedStatement st = null;
              try {
              File fl = new File( FILE ); // imgFile
              fis = new FileInputStream( fl );
              st = cn.prepareStatement( "update tblblob2 set content = ? where (name = 'Test')" );
              st.setBinaryStream( 1, fis, (int)fl.length() ); // imgFile
              st.executeUpdate();
              System.out.println( fl.length() + " Bytes successfully loaded." );
              } catch( SQLException ex ) {
                   System.out.println("0: " + ex.getMessage());
              } catch( IOException ex ) {
                   System.out.println("0: " + ex.getMessage());
              } finally {
              try {
                   if( null != st ) st.close();
              } catch( Exception ex ) {
                   System.out.println("1: " + ex.getMessage());
              try {
                   if( null != cn ) cn.close();
              } catch( Exception ex ) {
                   System.out.println("2: " + ex.getMessage());
              try {
                   if( null != fis ) fis.close();
              } catch( Exception ex ) {
                   System.out.println("3: " + ex.getMessage());
    With small files it works, but whats wrong with "larger" files?
    I need fast help...
    Thanks, Nick

    No Ideas? May it perhaps be a restriction of db-admin?

  • Problem with BLOB fields (DBMS_LOB)

    I want to read a word document from hard disc and save it into a BLOB field with using DBMS_LOB package. but when using it I always receive error "Invalid LOB locator specified" even I use oracle examples.
    I use FormBuilder 6.0.
    How can I do this. plz give me a code.
    Thanks so much

    >
    help plzzz
    >
    If you want help in the forum you need to use English when you post.
    You also need to actually ask a question or present the issue that you need help with. Just saying you nave a problem and then posting code isn't sufficient.
    Please edit your post and provide the English version of your code, comments, error messages and your action question or issue.

  • RMI Problem with rebind()

    created files as below. All compiled successfully.
    ran <rmic -v1.1 -d %cp% -classpath %cp% server.TempServerImpl> from command window.
    this generated a stub file called TempServerImpl_Stub.class
    I launched the rmiRegistry
    To make the remote object available to recieve mathod calls from clients I run TempServerImpl.class
    But ..... when I run TempServerImpl I get the exception "java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: "
    AND..... my stub class is deleted without any warning!!!
    if I comment out the line "Naming.rebind( serverObjectName, tempServer );" after I generate the stub class then TempServerImpl runs without throwing any exception but this must be included to bind my remote server object to the RMI registry.
    Any ideas what Im missing?
    import java.rmi.RemoteException;
    import java.rmi.server.UnicastRemoteObject;
    import java.net.URL;
    import java.rmi.Remote;
    import java.rmi.Naming;
    public class TempServerImpl extends UnicastRemoteObject implements TempServer{
       public TempServerImpl() throws RemoteException {
          super();
       public Info getInfo() throws RemoteException{
          return new Info("some temperature data returned");
       public static void main( String args [] ) throws Exception{
          TempServerImpl tempServer = new TempServerImpl();
          String serverObjectName = "//localhost/TempServer";
          Naming.rebind( serverObjectName, tempServer );
    //************ Remote Interface
    import java.rmi.*;
    import java.rmi.RemoteException;
    public interface TempServer extends Remote {
      public Info getInfo() throws RemoteException;
    import java.io.Serializable;
    public class Info implements Serializable{
       private String data;
       public Info(String data){
          this.data = data;
       public String toString(){
          return this.data;
    [\code]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Are you sure that the stub is being deleted, or is it just that the exception message says it can't be found. If it's the latter it might be that the stub is not in the class path of either the commandline running the rmi registry or the commandline running the TempServerImpl. However as you are running this i assume it ok.
    The code looks fine, The problem is something to do with classpaths ect.

  • JDBC performance problem with Blob

    Hi,
    I've some performance problem while inserting Blob in an Oracle
    8i database. I'm using JVM 1.17 on HP-UX 11.0 with Oracle thin
    client
    The table I used contains only two columns : an integer (the
    primary key) and a blob.
    First I insert a row in the table with an empty_blob()
    Then I select back this row to get the blob
    and finally I fill in the blob with the data.
    But it takes an average 4.5 seconds to insert a blob of 47 Kb.
    Am I doing something wrong?
    Any suggestion or hint will be welcome.
    Thanks in advance
    Didier
    null

    Don S. (guest) wrote:
    : Didier Derck (guest) wrote:
    : : Hi,
    : : I've some performance problem while inserting Blob in an
    Oracle
    : : 8i database. I'm using JVM 1.17 on HP-UX 11.0 with Oracle
    thin
    : : client
    : : The table I used contains only two columns : an integer (the
    : : primary key) and a blob.
    : : First I insert a row in the table with an empty_blob()
    : : Then I select back this row to get the blob
    : : and finally I fill in the blob with the data.
    : : But it takes an average 4.5 seconds to insert a blob of 47
    Kb.
    : : Am I doing something wrong?
    : : Any suggestion or hint will be welcome.
    : : Thanks in advance
    : : Didier
    : In our testing if you use blob.putBytes() you will get better
    : performance. The draw back we found was the 32k limit we ran
    in
    : to. We had to chunk things larger than that and make calls to
    : the append method. I was dissappointed in Oracle's phone
    support
    : on what causes the 32k limit. In addition the getBytes() for
    : retrieve doesn't seem to work. You'll have to use the
    : InputStream for that. Oh, and FYI. We ran into a 2k limit on
    : putChars() for CLOB's.
    the thin drivers currently use the package "dbms_lob" behind the
    scenes while the jdbc oci 815 drivers and higher uses the native
    oci calls which makes them much faster.
    there also is a 32k limit on pl/sql stored procedures/functions
    for parms.
    you may have run into that.
    null

  • Typical problem with BLOB.

    while i am using blob to store file content
    (for word documents more than 400 kb) iam facing this error.
    java.sql.sqlexception : ORA-01401:INSERTED VALUE TOO LARGE FOR COLUMN
    if it is some pdf files more than this size it is uploading.
    pls help me in this regard.
    Thanks in advance....

    >
    help plzzz
    >
    If you want help in the forum you need to use English when you post.
    You also need to actually ask a question or present the issue that you need help with. Just saying you nave a problem and then posting code isn't sufficient.
    Please edit your post and provide the English version of your code, comments, error messages and your action question or issue.

  • RMI Problems with WL 6 and JDK1.3

    I have been working on converting an existing RMI Service- Client
    Application to use Weblogic 6.0. All the rmi services run in an
    external VM seperate from the WL server. This setup works fine with
    plain RMI, I have converted this to WL and JNDI. I get the following
    error after a few connections to the service have been made. It always
    happens.
    <Feb 18, 2001 10:53:39 PM EST> <Error> <ConnectionManager> <Closing:
    'weblogic.r
    jvm.t3.T3JVMConnection@91cee' because of: 'Client received a routed
    message from
    an unknown JVM: '-5623439693736234706C:24.185.83.208''>
    I have taken the Stock Applet example from WL5.1 and it also exhibits
    the same problems. Since there are no examples with RMI and JNDI in
    WL6 maybe I am missing something. I create an initial an IntialContext
    and I can list and see any objects. But I will always wind up getting
    these errors that Peer has shutdown because a message has been
    received from an unknown VM. I have dumped out the info of and the
    message is coming from a "known" VM but the weblogic rmi subsystem
    seems to have lost the information. Any ideas or help would be
    grateful.
    Thanks
    Alex Jeannopoulos

    I have been working on converting an existing RMI Service- Client
    Application to use Weblogic 6.0. All the rmi services run in an
    external VM seperate from the WL server. This setup works fine with
    plain RMI, I have converted this to WL and JNDI. I get the following
    error after a few connections to the service have been made. It always
    happens.
    <Feb 18, 2001 10:53:39 PM EST> <Error> <ConnectionManager> <Closing:
    'weblogic.r
    jvm.t3.T3JVMConnection@91cee' because of: 'Client received a routed
    message from
    an unknown JVM: '-5623439693736234706C:24.185.83.208''>
    I have taken the Stock Applet example from WL5.1 and it also exhibits
    the same problems. Since there are no examples with RMI and JNDI in
    WL6 maybe I am missing something. I create an initial an IntialContext
    and I can list and see any objects. But I will always wind up getting
    these errors that Peer has shutdown because a message has been
    received from an unknown VM. I have dumped out the info of and the
    message is coming from a "known" VM but the weblogic rmi subsystem
    seems to have lost the information. Any ideas or help would be
    grateful.
    Thanks
    Alex Jeannopoulos

  • Oracle Rdb Driver 3.1.0.0 problem with blobs

    I am trying to convert an MsAccess application to use an MsAccess front end and an Oracle Rdb back end.
    I've created the test database under VMS and can successfully link to the Oracle Rdb tables from MSAccess 2000. One of the main reasons for converting to Oracle Rdb is to be able to store large word documents in the database. I was able to do that using Oracle rdb Driver v 3.00.02.06. I recently converted to Oracle Rdb Driver version 3.1.0.0 and can no longer access the Blob field containing the Word document. MsAccess now sees this field as type ‘Binary’ and I keep getting an ‘invalid field type’ error. (with 3.00.02.06 this field was seen by MsAccess as an ‘Ole Object’ and the getchunk and appendchunk functions for getting and saving a blob worked reasonably well).
    Is this a bug in 3.1.0.0 or is there some way to get MsAccess to recognize this Binary field type?

    I suspect you'll need to contact Oracle support on this. There aren't, to my knowledge, any RDB folks around here.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Problem with Blob key legnth in MySQL & JBoss

    Hi,
    I am using MySQL 3.23.55, JBOSS 3.0.6, EJB 2.0, CMP 2.0
    I have configured the database, the tables are created but it stops at one place.In the type mappings-mappings , i have the following in the standardjbosscmp-jdbc.xml
    java-type jdbc-type sql-type
    java.lang.Object Blob LongBlob
    I get the following error while creating one of the fields at the time of deployment.
    org.jboss.deployment.DeploymentException: Error while creating table; - nested throwable: (java.sql.SQLException: General error, message from server: "BLOB column 'start_ip' used in key specification without a key length")
    I have searched on the net and came up with the following,
    it seems that we need to specify the column legnth in the create table statement. I would have to use the following
    CREATE INDEX part_of_name ON customer (name(10))
    if i was directly working on the database @ command line.
    But i am using CMP, so how do i fix this ?
    Any help is appreciated
    Regards
    Meka Toka

    That is what i said in my post
    I have searched on the net and came up with the following,
    it seems that we need to specify the column legnth in the create table statement. I would have to use the following
    CREATE INDEX part_of_name ON customer (name(10))
    if i was directly working on the database @ command line.
    My question now is
    how do i do this in CMP
    Regards
    Meka Toka

  • Problem with BLOB image retrieval

    We are on Coldfusion 9,0,1,274733. I checked on "Enable binary large object retrieval (BLOB)" on the database but the image is still cut off (3/4 partly grey). On our dev server it works perfectly, our production server just gives off the partly grey images. I checked the CF database settings between dev and production and they are exactly the same. We restarted the server but still the same problem. It is like Coldfusion doesn't see the setting changes. Anyone else has this problem?

    We found the solution. Our production servers are in a clustered environment. You have to enable "Enable binary large object retrieval (BLOB)" at the instance cluster level. You will have to do this change on all the instances in the cluster. I was only enabling it at the "local" level on each server in the cluster (which didn't work).
    In CF Admin:
    Enterprise Manager > Instance Manager > select the instance and enable BLOB

  • RMI problem with weblogic.jar

    We have a pure Java client that connects to the Weblogic server.
    While trying to connect we receive the error message below.
    I have unjarred the weblogic.jar file and discovered that the
    Stub.class is actually in weblogic/rmi/extensions/server/
    while it expects it to be in weblogic/rmi/extensions .
    Is there a fix for this as we are trying to upgrade from a previous version of weblogic and go live in Jan.
    Thanks
    Dave F
    java.lang.NoClassDefFoundError: weblogic/rmi/extensions/Stub(

    I'd suggest that you run the vm with the debug flag (-verbose) and see where the classes are being loaded; and examine the classpath to determine where the old jar or classes are occurring.
    Rita wrote:
    We have re-jarred the Stub.class and put it under weblogic/rmi/extensions, but when the java app runs, it still tries to look in weblogic/rmi/extensions/server. So, I think somewhere in the weblogic.jar, the path specified is still weblogic/rmi/extensions. Do you know what need to be done?
    Thanks,
    Rita
    Eduardo Ceballos <[email protected]> wrote:
    Yes, please regenerate your stub classes. That is, re-run rmic or ejbc.
    David Furlong wrote:
    We have a pure Java client that connects to the Weblogic server.
    While trying to connect we receive the error message below.
    I have unjarred the weblogic.jar file and discovered that the
    Stub.class is actually in weblogic/rmi/extensions/server/
    while it expects it to be in weblogic/rmi/extensions .
    Is there a fix for this as we are trying to upgrade from a previous version of weblogic and go live in Jan.
    Thanks
    Dave F
    java.lang.NoClassDefFoundError: weblogic/rmi/extensions/Stub(

  • RMI problem with j2sdk1.4

    Hi,
    I have written a simple Ping program, to exercise me with RMI, this program worked fine with jdk1.3, now I have downloaded j2sdk1.4 and I have installed it, I runned the RMI program but now I have a run-time error message.
    Could you explain me what can be happened?
    Thanks a lot

    The error message + stacktrace would help...
    did you also compile with jdk1.4 or just execute with the jre shipped with 1.4?

  • Problem with blob column index created using Oracle Text.

    Hi,
    I'm running Oracle Database 10g 10.2.0.1.0 standard edition one, on windows server 2003 R2 x64.
    I have a table with a blob column which contains pdf document.
    Then, I create an index using the following script so that I can do fulltext search using Oracle Text.
    CREATE INDEX DMCS.T_DMCS_FILE_DF_FILE_IDX ON DMCS.T_DMCS_FILE
    (DF_FILE)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS('DATASTORE CTXSYS.DEFAULT_DATASTORE');
    However, the index is not searchable and I check the following tables created by database for my index and found them to be empty as well !!
    DR$T_DMCS_FILE_DF_FILE_IDX$I
    DR$T_DMCS_FILE_DF_FILE_IDX$K
    DR$T_DMCS_FILE_DF_FILE_IDX$N
    DR$T_DMCS_FILE_DF_FILE_IDX$R
    I wonder what's wrong with it.
    My user has been granted the ctx_app role and I have other tables that store plain text which I use Oracle Text are fine. I even output the blob column and save as pdf file and they are fine.
    However the database seems like not indexing my blob column although the index can be created without error.
    Please advise.
    Really appreciate anyone who can help.
    Thank you.

    The situation is I have already loaded a few pdf document into the table's blob column.
    After I create the Oracle text index on this blob column, I find the system generated index tables listed in my earlier posting are empty, except for the 4th table.
    Normally we'll see words inside the table where those are the words indexed by oracle text on my document.
    As a result, no matter how i search for the index using select statement with contains operator, it will not give me any result.
    I feel weird why the blob is not indexed. The content of the blob are actually valid because I tested this by export the content back to pdf and I can still view and search within the pdf.
    Regards,
    Jap.

  • Toplink with mysql: problem with blob size

    I'm using toplink with a mysql database. I want to store some data in a blob.
    In mysql there exist different sizes of blobs (in my case I need a mediumblob).
    But if I create the scheme for the database with jpa/toplink it alway creates only a column with type blob.
    I can explicitly tell the database to use a mediumblob by this:
    @Column("MEDIUMBLOB")
    But by doing this I limit my program to mysql of course, as this data type is not known to other databases.
    Does anybody know a more elegant solution to setting the blob size?
    for example with hibernate it can be done this way:
    @Column(length=666666)

    Looks like you are using JPA, and in JPA you would set the columnDefinition to the type that you want, e.g.
    @Lob
    @Column(name="BLOBCOL", columnDefinition="MEDIUMBLOB")
    byte[] myByteData;
    As you mentioned, this does introduce a dependency on the database. However, you can always either put the Column metadata in XML, or override it with something else later in XML.
    The length attribute was intended and specified for use with Strings but I guess there is no reason why it couldn't be used for BLOBs as well (please enter an enhancement request, or submit the code to add the feature to EclipseLink). Be aware, though, that doing so at this stage is going to be introducing a dependency on the provider to support a non-spec defined feature.

Maybe you are looking for

  • Problem Submit Via Job in BADI

    Hello All I am using SUBMIT VIA JOB in BADI "work order update" and but no job is created....also sy-subrc is 0. Here is the code   call function 'JOB_OPEN'     exporting       jobname          = name     importing       jobcount         = number    

  • My Mac simply ignores my Iphone when I connect it with the USB cable. WHY? how Can I fix it?

    My Mac simply ignores my Iphone when I connect it with the USB cable. WHY? how Can I fix it? I was able to connect the first time, but after that my computer simply rejects the Iphone and nothing happens. The Iphone doesn't spin or try to reboot even

  • Install error : disk cannot be used to start up your computer [or] MediaKit reports partition (Map) too small

    Greetings, I am aware that this problem has been discussed, but in long and vague discussions that I had to sift deeply to find an answer. Therefore I am posting a clear message, as this problem can be very troublesome for someone who just received a

  • Deployment issue with SOA - OSB 11g  environment

    Hi, We have Dev Environment configured with SOA 11g (11.1.1.4) and OSB 11g (11.1.1.4) on a single weblogic domain. Developed SOA composite app and deployed to the SOA Server. We are exposing our SOA Composite thru OSB ( created osb proxy and business

  • Photoshop cs6 problem

    we have 4 nos licence of photoshop cs6 ,our end user id is 22064943, now we suffering problem in cs 6 file .when we doing work in cs6 after sometime i saved file already ,when reopen this same file my all work has been lost ,even i saved file