Setting maximum packet size in JDBC driver to send data to database

Could someone tell me how I can set the JDBC connection property of maximum packet size to send data to database?
Regards
Rashed

Hi thanks....I'm having this strange SQLException while trying to insert BLOB image data to Oracle database. I'm saying this strange because for the same image that has been inserted before it's throwing the exception. My program is run from Oracle form and then some image data are inserted into database through a loop. I can't realize what's the problem inside my code that's causing this problem. In fact, when I run my program independently not from Oracle Form, it runs fine, every image data get inserted into database. Given below is my code snippet:
public void insertAccDocs(String[] accessions) throws SQLException
    for(int q=0; q<accessions.length; q++)
    final String  docName = accessions[q];
    dbThread = new Thread(new Runnable(){
    public void run()
      try{
      System.out.println("insertDB before connection");
               getConnected();
               System.out.println("insertDB after connection");
               st=con.createStatement();
         //String docName = acc; commented
     // String docName = singleAccession;
               String text = formatFree;
               String qry = "INSERT INTO DOCUMENT VALUES
('"+docName+"','"+text+"','"+formatted+"','"+uiid+"')";
               System.out.println("parentqry"+qry);
               int ok=0;
               ok=st.executeUpdate(qry);
               if(ok==1)
            System.out.println("INSERTION SUCCESS= "+ok);
                    System.out.println("Image List Size"+ imgList.size());
            // inserting into child
                    for(int i=0;i<imgList.size(); i++)
                  String imgPath = ""+imgList.get(i);
                              System.out.println("db"+imgPath);
                              FileInputStream fin = new FileInputStream(imgPath);
                              BufferedInputStream bufStr = new BufferedInputStream(fin);
                              byte[] imgByte = new byte[bufStr.available()];
                              String img = "" + imgNameList.get(i);
                              System.out.println("imgid="+i);
            callable = con.prepareCall("{call prc_insert_docimage(?,?,?)}");
            callable.setString(1,docName);
                        callable.setString(2,img);
            callable.setBinaryStream(3, bufStr , (int)imgByte.length);
            callable.execute();
        callable.close();
                 con.commit();
        con.close();
               else
                    System.out.println("INSERTION NOT SUCCESS");
   //   } //else end of severalAcc
               }catch(Exception err){ //try
                    System.out.println(err.toString());
    } //run
  }); //runnable
  dbThread.start();     
}And the exception thrown is :
java.sql.SQLException: Data size bigger than max size for this type: #####
Please let me know if possible how I can get around this.
Regards
Rashed

Similar Messages

  • Default maximum packet size in 3.7.0.1

    Hello,
    It looks like there is another reason for performing a full cluster restart to apply the first patch for 3.7 (3.7.0.1). On a machine with MTU=1500, it appears that the default maximum packet size value was changed from 1452 to 65535 and this change prevents the cluster from forming during a rolling upgrade.
    16 May 2011 14:08:01,376 ERROR Logger@813856187 3.7.0.1: 2011-05-16 14:08:01.376/1.539 Oracle Coherence GE 3.7.0.1 <Error> (thread=Cluster, member=n/a): This member could not join the cluster because of a configuration mismatch between this member and the configuration being used by the rest of the cluster. The maximum packet size (65535) for this member does not match the maximum packet size that the running cluster is using. Rejected by Member(Id=1, Timestamp=2011-05-16 14:05:49.303, Address=XXX2:11500, MachineId=38601, Location=machine:YYY2,process:14945,member:cacheserver:1, Role=cacheserver).
    16 May 2011 14:24:27,675 ERROR Logger@98371294 3.7.0.0: 2011-05-16 14:24:27.674/1.539 Oracle Coherence GE 3.7.0.0 <Error> (thread=Cluster, member=n/a): This member could not join the cluster because of a configuration mismatch between this member and the configuration being used by the rest of the cluster. The maximum packet size (1452) for this member does not match the maximum packet size that the running cluster is using. Rejected by Member(Id=1, Timestamp=2011-05-16 14:11:11.927, Address=XXX1:11500, MachineId=38600, Location=machine:YYY1,process:18509,member:cacheserver:1, Role=cacheserver).
    Can you please confirm?
    Cheers,
    Alexey

    Hi Alexey,
    Yes, the default maximum packet size for 3.7 was supposed to have been 65535, there was however a bug which prevented this from working. 3.7.0.1 fixes this issue, and thus "introduces" the new higher default value. A rolling restart is still possible, you would however need to manually configure the maximum to be 1468. The new maximum of 65535 allows the Coherence default configuration to support large clusters (greater then ~450 JVMs), where as the old default configuration would prevent new members from joining and would require a re-configuration and full restart.
    thanks,
    Mark
    Oracle Coherence

  • The setting for packet size (RSCUSTV6)

    HI Guys
    i want to know the setting for packet size (RSCUSTV6). can i do in production . or dev.
    i want change as
    Packet size = 20000
    FrequencyStatus-Idoc = 5
    please advise on this.
    Regards
    siva

    Hi Patel,
    This will impact all the loads in the system as this wil change the parameters for all the loads.. And hence its always recommended to reduce the data packet size at the Infopackage level...
    Also u can do the settings for the ODS Activation process as well using this RSCUSTV6 t-code.
    Better chane it for the specific job.
    thanks

  • Data Sources error:[Macromedia][SQLServer JDBC Driver]No more data available to read.

    I have just set up the developer edition coldfusion and a standard SQL Server. When trying to set up a datasource i recieve the following error:  [Macromedia][SQLServer JDBC Driver]No more data available to read. I have no clue what this means. I have tried to find some documentation on this but with now luck. Can anyone help?
    Here are some details:
    SQL SERVER CONNECTION MANAGER:
    Trying to connect to a localhost sql server
    I have TCP/IP Enabled
    Dynamic Ports is set to 0 under IP ALL
    127.0.0.1 is enabled and the port is set to 1433
    COLDFUSION ADMIN:
    server: 127.0.0.1
    port 1433
    username/password set to null (using windows authentication)
    Has anyone ran in to this issue?
    Thanks for helping.

    You can use domain credentials with CF.  To do so you've got to create the datasource in Windows.  Then, in ColdFusion you select ODBC mapping and point it to the Windows DS.
    If I recall correctly, there's a switch in SQL 2005 that you've got to flip to allow SA rights to log in from the network.  I could be way off base on that one though.
    You may want to consider creating a new SQL account with its own password and assigning it to your target database (usually, I grant data reader and writer - your app may vary) and use those new credentials in your JDBC mapping in CF.

  • Set maximum panel size

    Hi,
    I would like to know how can I set the maximum panel size, in order
    that when I maximize it with a state property node set to 5 (maximized)
    when I open it, it don't pass the size I want for that panel.
    How Can I do It? I can set the minimum panel size, in File->Vi
    properties->Window size but I can't set the maximum panel size?
    Thanks,
    ToNi.

    Hi,
    From my vi, before I call another vi from it, I have a FP Open and FP.
    State property set to True and 4 (Minimized) respectively and then I
    use a Run Vi invoke node and finally, after it, I have another FP.
    State property set to 1 (Standard). My front panel  when opens has
    the same size as I saved it but LV not redraws it well. How Can I do to
    solve this kind of problem? I have this problem since a lot of time ago.
    ToNi.
    Attachments:
    sample.JPG ‏40 KB

  • IView Deployment - how to set maximum file size?

    Hello,
    we have a problem while deploying iViews and uploading files to enterprise portal . The maximum upload file size seems to be limited to 1 MB. I have to deploy an iView greater than 1 MB. While deploying with netweaver developer studio I get following error message
    in logfile of developer studio:
    [19.10.04 / 13:33] #ERROR LEVEL#
    com.sap.portal.developmentTools.ideSpecific.eclipse.wizards.sapmakepar.SAPMPWizard$1 > No Information
    java.io.IOException: Error writing to server
    The direct upload of *.par with EP Component Manager also does not work. After clicking upload-button I get a standard http error page "aktion abgebrochen".
    Also on upload of any other document, for example personal documents which are bigger than 1 MB, I get this error.
    If I reduce file size of portal archiv lower than 1MB I can deploy and upload the iView.
    How canI set maximum upload file size in Enterprise Portal?
    Our Version: 6.0.2.4.7.Enterprise_Portal_Service_Pack_2
    Thanks for helping me,
    Nicole

    You need to use a precision argument:
    String foo = "a long name to print";
    System.out.printf("foo say: %.8s", foo); // 8 maxhttp://java.sun.com/j2se/1.5.0/docs/api/java/util/Formatter.html#syntax

  • Set maximum upload size

    Hello,
    We are using Portal 7.0 and the CRM Business Package (BSP's).
    For a user it is possible to upload one or more attachments.
    Is it possible to set a maximum upload size?
    Greetings,
    Gene

    what version BES?
    I know BPS 4.1.4 does have an issue and you would need BES Express 5 to fix it. BES Express 5 is also free.
    order a copy here
    http://us.blackberry.com/business/software/besx.html
    Click here to Backup the data on your BlackBerry Device! It's important, and FREE!
    Click "Accept as Solution" if your problem is solved. To give thanks, click thumbs up
    Click to search the Knowledge Base at BTSC and click to Read The Fabulous Manuals
    BESAdmin's, please make a signature with your BES environment info.
    SIM Free BlackBerry Unlocking FAQ
    Follow me on Twitter @knottyrope
    Want to thank me? Buy my KnottyRope App here
    BES 12 and BES 5.0.4 with Exchange 2010 and SQL 2012 Hyper V

  • Set maximum font size

    Is there a way that I can set the maximum font size?  I want to limit the size of all fonts.

    I found tinkertool, which did exactly what I wanted.  I love it.
    http://www.bresink.com/osx/0TinkerTool/download.php5

  • Set idoc Packet Size to always be a single packet

    Hi All,
    WE20 config has a field for packet size.  If I set it to 1, the system will create 1 packet/LUW for each idoc.
    If I set it to two, it will wait until there are 2 idocs available and then create 1 packet/LUW for both idocs.  however, if that second idoc is never created, the first idoc will never be sent.
    Is there a way to specify that the system always send 1 packet/LUW for any number of idocs?  So lets say today I created 10 idocs - the system would send that as 1 LUW.  Tomorrow, I create 25 idocs, and the system would send that as 1 LUW.
    I'm guessing the answer to this is NO, because the system will never know when to stop waiting for more idocs and send them to the receiving system already.  The PI developers here are looking for a way to avoid implementing BPM, because they say it will cause performance issues.  This was suggested as an alternative.  As I said, I doubt it's possible, but I wanted to make certain before going back to them with that info.
    Thanks,
    Bryan

    For some reason I was under the impression that RSEOUT00 wouldn't send the idocs unless the number had been reached, but I see that is not the case.
    I always make things more complicated than they need to be.
    Thanks!

  • Pool cache exhausted ORA-12519 JDBC Driver configured. Quid for database ?

    Hello,
    I'm developping a java application (1.5) with threads (500). I'm using ojdbc14.jar to connect to my database (Oracle 10.2).
    I'm using a pool (oracle.jdbc.pool.OracleConnectionCacheManager).
    InitialLimit is 30.
    MaxLimit is 100 for tests but production value isn't defined yet.
    After 33 concurrents connections, my pool is exhausted.
    OracleDataSource.getConnection() throws an SqlException with error code : ORA-12519: TNS:no appropriate service handler found.
    So, I would like to configure database to allow more than 33 actives connections.
    I searched inside listener.ora but found nothing. I'm loosing mysel inside data dictionnary and don't find nothing on www.oracle.com, forums.oracle.com or even google.
    How can I configure properly database whether it is possible ?
    Else what can I do to improve number of maximum connections.
    I guess JDBC driver is limited by database configuration.
    Thanks a lot.

    I am also facing a similar problem, can any one let me know how this can be addressed?
    TIA,
    -Sethu

  • Jdbc driver of sender/ receiver jdbc adapter

    Hi Everybody,
    Can you please tell me what is the most commonly used jdbc driver for a sender/receiver jdbc adapter in projects??
    thanks a lot
    Anitha

    It all depends on the database you connect.
    Check the official data base site for JDBC drivers.  You can also check standards SAP docs, notes for compatability in PI.

  • In reciever jdbc adapter config sending data to multiple tables

    Hi Masters,
          Can u help me with examples step by step procedure of sending data to multiple tables in reciever jdbc adapter .. configuration....
    thanks in advance,
    jp.

    Hi,
    My understanding is you are  trying to use one scenario for ex a file to jdbc and want to post data into multiple tables.
    If you are using Message Prortocol XML SQL format then once you define the data type for one structure then juz right click on the statement name and select Duplicate. This will create another statement in the same data type change the table name and the parameters in the duplicates strucutre.
    <b>Document Formats for the Receiver JDBC Adapter</b>
    http://help.sap.com/saphelp_nw70/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    All the other configurations are same simple file to jdbc scenario.
    Cheers,
    *RAJ*

  • Maximum Partition Size for External Drive using DU

    Hello,
    I just purchased a 750g Maxtor USB drive for use with Time Machine. When I went into DU to partition and format the drive I was surprised to find that every time I went to create a single partition using all available space, the operation would error out. I was however able to create two partitions with the largest one sized around 650g or so. I was using the Mac file system.
    This just seems odd to me. Does OS X have a maximum allowable partition size that prevents me from creating one large partition?
    Thanks,
    Robert

    Hi Robert
    You should be able to delete the partition, try again using the instruction in the following article:
    http://macs.about.com/od/applications/ss/diskutilitysize_5.htm
    Dennis

  • Upto how much I can set maximum Heap size for jvm?

    I am running application on 8GB RAM Windows 64 bits machine.
    I am running out of OutOfMemory (Heap Space). I want to increase the Heap Size for my jvm.
    But can anybody please tell me what is the limit by which I can set the maximum size for heap?
    Thanks in Advance,
    Jenish

    Max allowed memory per process is 2 raised to the 64th power. What maximum memory you can set depends on the memory available
    for your application. You may be able to set more than 8GB ram then it will use the swap space and it will slow down your application
    performance. So try different memory size and see which one works best for your application.

  • Is there a way to set maximum cache size or to change default cache directory to sd card on Android?

    I'm low on space in my Android Phone and Firefox Cache is huge by my phone standards. I have to clear data after each time I use firefox. Firefox is great but I'm using it less and less, day by day. I browsed Internet for tips, but while I was able to set a cache directory on sd card using "about:config", it still writes on phones internal too. It seems it duplicated cache.
    Setting a different max size using "about:config" only works temporarily, because it seems Firefox returns to default after a while.
    Thank you.

    Hello.
    To help automatically clear up some cache from Firefox, click on each of the images from left to right. Now at least you won't have to constantly do it yourself.
    Also, to help you with your space issues, download Clean Master from the Google Play app Store: https://play.google.com/store/apps/details?id=com.cleanmaster.mguard this app will clean up hidden cache and useless files on your phone, helping free up space.
    And as for why Firefox keeps reverting to the default cache in "about:config", I do not know. We are sorry for any inconveniences that this has caused you. But please try doing what was mentioned above to help with your issue.
    Hope this helps!

Maybe you are looking for

  • Coreaudiod + other probs after re-install Yosemite 10.10.2

    Problem description: coreaudiod (not responding) error.   **I didn’t get the note several YEARS ago that TimeMachine would fill your drive until it used it all up, then start dropping b\u’s to save your last 1.44MB to write your last words to whomeve

  • S_ALR_87013614 layout issue

    Hello Guru We are using SAP standard transaction S_ALR_87013614 to get the cost center current period/ cumulative selection.we have observed that the layout format is change every month. we tried to find the change log but we couldn't find the change

  • Digital booklets in iTunes

    I recently bought an album on iTunes that included a digital booklet. Usually, digital booklets show up in your iTunes music library as a PDF. However, when I copied the album and Digital Booklet to another of my computers by the "add to library" men

  • Can't manipulate symbols with Flash CS5 3-D rotation tools:

    Please help! I am just learning to use Flash CS5 Professional (aided by the "Flash Basics" tutorials of Lynda.com). I am presently trying to manipulate symbols as motion-tweens with the 3-D rotation tool found in the Flash toolbar. At the moment I'm

  • Formula not working, Plz help

    Hi all i have one scenario for formula$ I am calculatingYTD value in period dim and one more dime CATGORY and INDICATOR scenario is wen indicator member is ID3 we have to calculate ytd values and we have to displaythe values for ytd crossing(which is