How to divide big serialized object in parts to be able to save as Blob typ

Hi,
Actually i have serialize a big XML document object and want to save in a field of type Blob. As Blob size is 64k. So if the serialized object is greater than 64k. It gives me error of size.Can anybody tell how to break large serialized objects.
I am using this code
File f = new File("out.ser");
FileInputStream fin = new FileInputStream(f);
p = farCon.prepareStatement("insert into TeeColor values('3',?)");
p.setBinaryStream(1, fin, f.length());
p.executeUpdate();
This code works fine if the size of out.ser file is less than 64k. But does not work for bigger sizes
Please help me out
Thanks

Read your data from the file into a byte array, then extract 64K at a time into a smaller byte array, and use a ByteArrayInputStream for updating the database.

Similar Messages

  • How to divide a movie in two parts in order to make two DVDs

    I have made a large movie with titles, transitions and chapters. Lots of small clips, some of them put on time line, others on clips board. The "time line" material is 2:00 long.
    I would like to keep the structure of the movie, and make 2 dvds out of the timeline materiel.
    I am not sure how to do this : using "create IDVD project" from the right panel does not seem to offer the possibility to split.
    Using "File / share" gives me the possibility to export only selected clips, but tells me that I can add chapters using the idvd pane. Does this mean that I will loose the already made chapters ?
    Thanks for any comments or advice.
    Luc

    Hi Beverley,
    Best wishes for the 2006 , and happy new year to you !!
    Sorry for this late reply to your suggestion. Here is finally what worked for me :
    I simply moved the second part of my movie (this second part is for my second DVD) to the right pane, including all the transitions etc, that I previously made. Doing this I just kept in timeline the content of my first DVD, and it worked like a charm.
    Afterwards, I did the contrary : took back the second part to the beginning of the time line, and moved the first to the right panel.
    I had tried copy.paste the clip to another project before, but this duplicate the materiel and take a huge space onto the hard drive. Moreover, as you may have noticed, there is no simple way to decrease the size of a project after you have imported the clips. The trash/ empty trash fonction is very conservative and does not make it possible to reduce the size of the altered materiel (I finished with a 45 gig project for a 2 hours movie).
    Luc

  • I want to save many of my documents in my Documents file to the iCloud. How do I do it? I used to be able to save them to the idisk.

    iDisk, iCloud, MobileMe?  I just want to save important documents currently in my MacBook Pro in "DOCUMENTS" (pdf, etc. from any source) to the "cloud" as a backup source and to access from my iPhone. Now that iCloud is loaded, I cant find the documents I used to save to "iDisk". Any help out there?

    Apple IDs and iCloud
    Copying Data From MM to iCloud
    Creating an iCloud account- Frequently Asked Questions
    MobileMe services that no longer sync after moving to iCloud
    MobileMe- About moving to iCloud

  • How can I fix a program error so I am able to save files?

    My version of Photoshop CS6 is suddenly not allowing me to save any files at all. I can't save .psd, .jpg, .gif, etc. When I try to save it it pops up with a program error message. I haven't had this program very long so I would like to get it fixed so I can start using it. Thanks!

    Hello! I'm guessing that you either have allowed Photoshop to use an inadequate amount of disk space, which you can change by going to Edit>Preferences or you have run out of space on the disk you have told Photoshop to use. Either free up space, or, if you have a second hard drive, go to Edit>Preferences and it should be under General. I haven't gone through all of these preferences menus yet, so can't promise you'll find everything there, but you should at least get some leads. I know there are more specific options under preferences, but as I said, I haven't gone through those yet, and don't know where to find disk space options.
    Hope this helps!
    Cole

  • When trying to save an image from ichat or even online to my desktop it will not allow me and says 'You don't have permission.' how can i change this? I used to be able to save all Images.

    HELP!!!!

    deastewart wrote:
    when in system prefrences there is no 'accounts' option. under users and groups it says th account i am currently using is me and I am an admin.
    Thank you agian for trying to help.
    I should have looked closer at your system info on your OP. You're on 10.7 (I'm not) and apparently things are set up differently there. My apologies. I hope someone else will post here. If not, you should probably start a new thread in the 10.7 forum. Good luck to you.

  • How to transport proxy  object  abap part

    Hi ,
    I am working with one outbound proxy . The proxy was working fine in production ,now one requirement came in which we have to add one extra field to Proxy .field has been added in message type  and proxy was generated in respective ABAP box
    abap coding every thing was done and it worked fine in Dev . I transported the PI part ( DT,MT,MI and MM ) .
    However I am not sure how to transport  the ABAP proxy in ECC from dev to prod .
    Can you kindly please tell me all steps I tried to search in SDN but getting confused in what object I have to transport and how from ECC .
    Regards,
    Saurabh

    Hi Sarvesh ,
    Thanks a lot for all your reply .
    It partially worked as I created the transport with proxy object but not toatally as all my objects are not included in the transport .
    when I am doublicking the My proxy interface and then going in used object TAB then I am able to see the structures .
    Abap team wants to include these structure in the transport .
    Actually the code has already been transported and it is throwing the dump value as it is unable to find the new field as the new strucutre is not transported .
    Should I tell Abap team to manually make some  random change in the str now and save them again so that when I re generate proxy then it will be added to transport.
    Regards,
    Saurabh

  • How convert a big image to parts of images? means split a jpg image to several sub imges.(thi​s sub image can joint into that big image)

    hi friends..
    how convert a big image to parts of images? means split a jpg image to several sub imges.(this sub images can joint into that big image) any help
    Solved!
    Go to Solution.

    In the example, i have created two images and added them together, and the converse can be done in the same way.
    Thanks
    uday,
    Please Mark the solution as accepted if your problem is solved and help author by clicking on kudoes
    Certified LabVIEW Associate Developer (CLAD) Using LV13

  • How to pass serialized object and the string through the socket together?

    I have an application which listens on a port and I usually read string lines from it. Now I want to pass serialised object through it , plus I should indicate (using some string like "object coming") tht the following packet is a serialized object.

    Since Strings are serializable you could just send a stream of serialized objects then you don't have to know anything about the format.

  • How to search inside files of serialized objects without load then?

    Hi,
    I have many files and the content is default serialized objects, and I need to make a search in these files, and just load the files that match a search criteria, exists any tool or framework that can search inside these files in binary form, iow without load one by one and reflect to see if the criteria matches?
    for example the search criteria can be: *"ClassName.attribute = 2"* and the search engine will search the binary format and just returns what files match that search criteria.
    thanks for any tip or help

    I dont know if there is a API for this but even if you have one it will still take almost the same time to do the searching because it will still have to read all the files completely.
    Why not move to a database.

  • OID and binding java serialized object

    Hi there,
    How are you doing? I am trying to bind a serialized java object to a name in Oracle Internet Diectory (oid) using JNDI.
    it gives me an errror.
    "OperationNotSupported LDAPA error 53: Unwilling to perform:
    I have directory manager 2.1.1 and JNDI 1.2.1
    I arrpeciate any clue and/or help
    Thanks
    null

    Hello:
    Although OID supports calls from JNDI, the JNDI schema for storing JAVA serialized objects is not yet a standard part of the OID schema. This is easy to remedy. Go to javasoft.sun.com and download the JNDI schema for java serialized objects and load the attributes and objectclasses into OID from the ldif files provided at this web site. . Make sure the attributes are loaded before the objectclasses.
    Once this schema is loaded this problem should go away
    Use the ldapmodify command line tool to add the schema items from the ldif file.
    Let me know if you need further assistance setting this up. A future version of OID will contain these schema items standard.
    Thanks,
    Jay
    null

  • Reducing Size of Serialized Object

    Does anyone know how to crunch the size of the serialized object? My serialized objects are exceeding 20 megabytes and it's going to cost a lot of bandwidth transfers within our network.
    Thanks. :-)

    Make any fields transient that you can compute on the other side. If they're still too big after zipping them you may have to use another mechanism other then serialization: extract the minimum necessary data to create the objects and send it over using your own protocol.
    I should note that most modems all ready do hardware compression so compressing it yourself may not improve performance much.

  • How to extract Slide data in 3rd part application from clipboard

    I need to be able to copy/paste or drag/drop from PowerPoint into another application (C# WPF). In my OnDrop method the DragEventArgs Data has these formats:
            [0]    "Preferred DropEffect"    string
            [1]    "InShellDragLoop"    string
            [2]    "PowerPoint 12.0 Internal Slides"    string
            [3]    "ActiveClipBoard"    string
            [4]    "PowerPoint 14.0 Slides Package"    string
            [5]    "Embedded Object"    string
            [6]    "Link Source"    string
            [7]    "Object Descriptor"    string
            [8]    "Link Source Descriptor"    string
            [9]    "PNG"    string
            [10]    "JFIF"    string
            [11]    "GIF"    string
            [12]    "Bitmap"    string
            [13]    "System.Drawing.Bitmap"    string
            [14]    "System.Windows.Media.Imaging.BitmapSource"    string
            [15]    "EnhancedMetafile"    string
            [16]    "System.Drawing.Imaging.Metafile"    string
            [17]    "MetaFilePict"    string
            [18]    "PowerPoint 12.0 Internal Theme"    string
            [19]    "PowerPoint 12.0 Internal Color Scheme"    string
    The "PowerPoint 14.0 Slides Package" is a byte array... can this be converted into Slides?
    If not how would I go about getting high-resolution images + slide text from a drag/drop?
    [Originally posted here: http://answers.microsoft.com/en-us/office/forum/office_2013_release-powerpoint/how-to-extract-slide-data-in-3rd-part-application/a0b5ed64-eb77-49bb-bf44-e0732e23a5eb]

    What I'd like to do:
    Open PowerPoint
    In PPT open a presentation
    In PPT select a slide
    Drag it to my 3rd party WPF application
    In the 3rd party WPF application drop handler get the slide data (text, background image, etc...).
    When I do this I get the DragEventArgs Data (the clipboard data) and it has the 20 supported formats I listed in the 1st post. From these formats #4 seemed like it could have some useful info.
    WPF
    <Window x:Class="PowerPointDropSlide.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Height="350" Width="525" AllowDrop="True" Drop="UIElement_OnDrop" DragOver="UIElement_OnDragOver">
    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="LightBlue">
    <TextBlock Text="Drop something here!"/>
    </Grid>
    </Window>
    Handlers:
    public void UIElement_OnDragOver(object sender, DragEventArgs e)
    public void UIElement_OnDrop(object sender, DragEventArgs e)
    string[] supportedFormats = e.Data.GetFormats();
    object pptSlidesPackage = e.Data.GetData("PowerPoint 14.0 Slides Package");

  • FileUpload problem: InputStream does not contain a serialized object

    Hi All,
    I'm using the FileUpload component in a JSPDynPage and the htmlb component seems to work fine but I cannot read the file (InputStream). I get the following error(IOException): "InputStream does not contain a serialized object".
    Please let me know what is wrong with my code. This is a part of the code I used:
    public FileInputStream sourceFileInput;
    public ObjectInputStream input;
    FileUpload fu;
    fu = (FileUpload) this.getComponentByName("myFileUpload");
    IFileParam fileParam = ((FileUpload) getComponentByName("myFileUpload")).getFile();
    File f       = fileParam.getFile();
    file         = fu.getFile().getFile();
    absolutepath = fu.getFile().getFile().getAbsolutePath();
    this.sourceFileInput = new FileInputStream(file);
    input = new ObjectInputStream(sourceFileInput);
    The last line of code seems to generate te error.

    Hi,
    I have found the answers, thank you both.
    (I included the examle code. Perhaps of some use to someone.)
    FileUpload fu;
    fu = null;
    fu = (FileUpload) this.getComponentByName("myFileUpload");
    //       this is the temporary file
    if (fu != null) {
         IFileParam fileParam = ((FileUpload) getComponentByName("myFileUpload")).getFile();
         if (fileParam != null) {
              // get info about this file and create a FileInputStream
              File f = fileParam.getFile();
              if (f != null) {
                   try {
                        fis = new FileInputStream(f);
                   // process exceptions opening files
                   catch (FileNotFoundException ex) {
                        myBean.setMessage(
                             "1" + f + ex.getLocalizedMessage());
                   isr = new InputStreamReader(fis);
                   br = new BufferedReader(isr);
    String textLine = "";
    do {
         try {
              textLine = (String) br.readLine();
         } catch (IOException e) {
              myBean.setMessage(
                   "1" + e.getLocalizedMessage());
         // Jco append table & put data into the record
         // (I_FILE is the table with txt data that is sent to the RFC)
         I_FILE.appendRow();     
         I_FILE.setValue(textLine, "REC");                              
    } while (textLine != null);

  • Java.io.StreamCorruptedException: InputStream does not contain a serialized object

              I have an applet which calls a JSP to write data object to the db and then the
              JSP sends back the updated data object. The writing part is ok but the response
              is giving the following error. The data object is in a separate class which implements
              Serialized.
              Here's the code in the applet calling the JSP and the response from the JSP
              URL server = null;
              String urlConnectionString = "http://localhost:7001/isLoginValid.jsp";
              try
              server = new URL(urlConnectionString);
              catch(MalformedURLException e)
              System.out.println("URL exception: " + e );
              // send request
              ObjectInputStream response = null;
              Object result = null;
              try
              URLConnection conn = server.openConnection();
              conn.setDoOutput(true);
              conn.setUseCaches(false);
              conn.setRequestProperty("Content-Type", "application/octet-stream");
              ObjectOutputStream request = new ObjectOutputStream(new
              BufferedOutputStream(conn.getOutputStream()));
              request.writeObject((Object)dvo);
              request.flush();
              request.close();
              // get the result input stream
              response = new ObjectInputStream(new BufferedInputStream
              (conn.getInputStream()));
              // read response back from the server
              result = response.readObject();
              if( result!=null && (result instanceof DataVO))
              dvo = (DataVO)result;
              String vo = dvo.printDataVO();
              System.out.println("*DataVO*\n"+vo);
              else
              System.out.println("not an instanceof DataVO");
              catch(IOException ignored)
              System.out.println("Error in DataVO response");
              ignored.printStackTrace();
              Here's the code in the JSP sending the response back to the applet. The 'dvo'
              object is the object which is serialized and has gets and sets for the diff. data
              elements. When I print the 'dvo' before writing the object to outputStream it
              prints the correct values for the data element.
              // send response
              response.setStatus(HttpServletResponse.SC_OK);
              ObjectOutputStream outputStream = new ObjectOutputStream (new BufferedOutputStream
              (response.getOutputStream()));
              outputStream.writeObject(dvo);
              outputStream.flush();
              ERROR is as follows:
              Error in DataVO response
              java.io.StreamCorruptedException: InputStream does not contain a serialized object
              at java/io/ObjectInputStream.readStreamHeader
              at java/io/ObjectInputStream.<init>
              What am I doing wrong?. Please respond soon. The applet is run on IIS and the
              JSP in on weblogic 6.1. I'm not sure if that makes any difference.
              

              I have an applet which calls a JSP to write data object to the db and then the
              JSP sends back the updated data object. The writing part is ok but the response
              is giving the following error. The data object is in a separate class which implements
              Serialized.
              Here's the code in the applet calling the JSP and the response from the JSP
              URL server = null;
              String urlConnectionString = "http://localhost:7001/isLoginValid.jsp";
              try
              server = new URL(urlConnectionString);
              catch(MalformedURLException e)
              System.out.println("URL exception: " + e );
              // send request
              ObjectInputStream response = null;
              Object result = null;
              try
              URLConnection conn = server.openConnection();
              conn.setDoOutput(true);
              conn.setUseCaches(false);
              conn.setRequestProperty("Content-Type", "application/octet-stream");
              ObjectOutputStream request = new ObjectOutputStream(new
              BufferedOutputStream(conn.getOutputStream()));
              request.writeObject((Object)dvo);
              request.flush();
              request.close();
              // get the result input stream
              response = new ObjectInputStream(new BufferedInputStream
              (conn.getInputStream()));
              // read response back from the server
              result = response.readObject();
              if( result!=null && (result instanceof DataVO))
              dvo = (DataVO)result;
              String vo = dvo.printDataVO();
              System.out.println("*DataVO*\n"+vo);
              else
              System.out.println("not an instanceof DataVO");
              catch(IOException ignored)
              System.out.println("Error in DataVO response");
              ignored.printStackTrace();
              Here's the code in the JSP sending the response back to the applet. The 'dvo'
              object is the object which is serialized and has gets and sets for the diff. data
              elements. When I print the 'dvo' before writing the object to outputStream it
              prints the correct values for the data element.
              // send response
              response.setStatus(HttpServletResponse.SC_OK);
              ObjectOutputStream outputStream = new ObjectOutputStream (new BufferedOutputStream
              (response.getOutputStream()));
              outputStream.writeObject(dvo);
              outputStream.flush();
              ERROR is as follows:
              Error in DataVO response
              java.io.StreamCorruptedException: InputStream does not contain a serialized object
              at java/io/ObjectInputStream.readStreamHeader
              at java/io/ObjectInputStream.<init>
              What am I doing wrong?. Please respond soon. The applet is run on IIS and the
              JSP in on weblogic 6.1. I'm not sure if that makes any difference.
              

  • How to add the Note board web part to a page with powershell

    Hi everyone,
    I've been looking around everywhere but haven't seen it explicitly mentioned. 
    Does anyone know how to add the Note Board web part to a Team Site page, e.g. Non-publishing site, Left Zone, First webpart in the zone in powershell?
    Examples like this one http://adicodes.com/adding-web-part-to-page-with-powershell/ only talk about custom web parts uploaded from a local drive.
    The example here looks good - http://spcrew.com/blogs/lists/posts/post.aspx?id=21 but is it for the Page Viewer Web Part. How would you go about getting the correct name for the note board web part and configuring it? 
    Many Thanks,
    Ashley
    function main(){
    [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
    $url = "http://sp2010dev1/sites/test1"
    $OpenWeb = Get-SPWeb $url
    $OpenWeb
    $OpenSite = Get-SPSite $url
    $file = $OpenWeb.GetFile("http://sp2010dev1/sites/test1/SitePages/test1.aspx")
    $WebPartManager = $file.GetLimitedWebPartManager([System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)
    Add-PageViewerWebPart "http://sp2010dev1/sites/test1" "http://sp2010dev1/sites/test1/SitePages/test1.aspx" "Body" 0 "SPCrew Site" "sp2010dev"
    $OpenWeb.Dispose()
    function Add-PageViewerWebPart($SiteURL, $pageUrl, $webpartzone, $index, $title, $content)
        $site = new-object Microsoft.SharePoint.SPSite($SiteURL)
        $web=$site.OpenWeb()
        $webpartmanager=$web.GetLimitedWebPartManager($pageUrl, [System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)
        $webpart = new-object Microsoft.SharePoint.WebPartPages.PageViewerWebPart
        $webpart.ChromeType = [System.Web.UI.WebControls.WebParts.PartChromeType]::TitleOnly;
        $webpart.Title = $title
        $webpart.ContentLink = "http://www.spcrew.com";
        $webpartmanager.AddWebPart($webpart, $webpartzone, $index);    
        $web.Close()
        $site.Close()
    function Get-SPSite([string]$url) {
        New-Object Microsoft.SharePoint.SPSite($url)
    function Get-SPWeb([string]$url) {
        $SPSite = Get-SPSite $url
        return $SPSite.OpenWeb()
        $SPSite.Dispose()

    Hi,
    According to your post, my understanding is that you wanted to add the Note board web part to a page with PowerShell.
    The name of the Note Board web part is SocialCommentWebPart.
    I recommend to use the powershell code below:
    $pageUrl="http://sitename/SitePages/test.aspx"
    $SiteURL="http://sitename"
    $site = new-object Microsoft.SharePoint.SPSite($SiteURL)
    $web=$site.OpenWeb()
    $webpartmanager=$web.GetLimitedWebPartManager($pageUrl, [System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)
    $webpart = new-object Microsoft.SharePoint.Portal.WebControls.SocialCommentWebPart
    $webpart.title="Note Board"
    $webpartmanager.AddWebPart($webpart, "MiddleZone", 0);
    $web.Close()
    Then the Note board web part will be added to the page.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

Maybe you are looking for

  • Activate datasource SAP-R/3 - FI

    I activate datasource in ECC source system using t-code RSA5 for SAP-R/3 -> FI. got these warnings in the log. Do they matter? Thanks for you help. Generating DataSource 0FI_TV_01 The even-numbered length of the DEC field TRIPDUR can lead to problems

  • 2nd Gen iPod Nano - Impossible Restore

    I recently bought a used 4gb 2g nano and had it working fine. Forgettiing that it needed itunes 7 to work, I formatted it in hope it would would with itunes 6. Remembering this, I had to install itunes 7, bringing me to my problem... When I try to re

  • My phone wont connect to interweb  (im paying for) unless i connected to a public or home wifi

    Like my title says i cant use my data im paying for. the way i can use the intereb is from a public wifi

  • Installing Apache

    I have a Windows 2003 server; I use it for testing and to run the domain to which all the computers in the house belong. I want to install Apache/PHP on one of my XP boxes (not the server). I'm following the instructions in David Powers' "PHP Solutio

  • Error when generating XML

    Hi, I am trying to generate an XML file using the code below and receive the following error; failed ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing LPX-00231: invalid character 60 ('<') found in a Name or Nmtoken Error at l