Data is getting corrupt in Jscrollpane on Solaris

Hi,
I have added a JtextArea and Jtable in Jscrollpane.When huge amount is added to the Jteaxarea/Jtable,the data gets corrupted when i run it on Solaris 5.10 system.On windows opertaing system,it works fine.
Please find below the sample application.I have set textarea editable property to true.
So to reproduce the problem run below program on Solaris System and then copy the text in story string around 50 times in textArea.The data will be corrupt.
import java.awt.Dimension;
import javax.swing.*;
public class Test{
public JPanel createContentPane (){
JPanel totalGUI = new JPanel();
// This is the text to be stored in Jtextarea.
String story = "Testing JtextArea Text\n\n"+
"data gets corrupted when there is huge amount of data\n\n"+
"The Internet Foundation Classes (IFC) were a graphics \n\n"+
"library for Java originally developed by Netscape Communications\n "+
"Corporation and first released on December 16, 1996.\n\n"+
"On April 2, 1997, Sun Microsystems and Netscape Communications\n"+
" Corporation announced their intention to combine IFC with other\n"+
" technologies to form the Java Foundation Classes. In addition \n"+
"to the components originally provided by IFC, Swing introduced \n"+
"a mechanism that allowed the look and feel of every component \n"+
"in an application to be altered without making substantial \n"+
"changes to the application code. The introduction of support \n"+
"for a pluggable look and feel allowed Swing components to \n"+
"emulate the appearance of native components while still \n"+
"retaining the benefits of platform independence. This feature \n"+
"also makes it easy to have an individual application's appearance \n"+
"look very different from other native programs.\n\n"+
"Originally distributed as a separately downloadable library, \n"+
"Swing has been included as part of the Java Standard Edition \n"+
"since release 1.2. The Swing classes are contained in the \n"+
"javax.swing package hierarchy.\n";
// We create the TextArea and pass the textarea in as an argument.
JTextArea storyArea = new JTextArea(story);
/*setEditable is set to true so that we can add more text into it for testing*/
storyArea.setEditable(true);
storyArea.setLineWrap(true);
storyArea.setWrapStyleWord(true);
/* We create the ScrollPane and instantiate it with the TextArea as an argument*/
// along with two constants that define the behaviour of the scrollbars.
JScrollPane area = new JScrollPane(storyArea, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
// We then set the preferred size of the scrollpane.
area.setPreferredSize(new Dimension(300, 200));
// and add it to the GUI.
totalGUI.add(area);
totalGUI.setOpaque(true);
return totalGUI;
private static void createAndShowGUI() {
JFrame.setDefaultLookAndFeelDecorated(true);
JFrame frame = new JFrame("[=] Embrace of the JScrollPane [=]");
Test demo = new Test();
frame.setContentPane(demo.createContentPane());
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOS E);
frame.setSize(350, 300);
frame.setVisible(true);
public static void main(String[] args) {
//Schedule a job for the event-dispatching thread:
//creating and showing this application's GUI.
SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
Please suggest some solution or appropriate workaround for this.
Thanks in Advance,
Ruchika

1) Cross post: [http://www.coderanch.com/t/460744/Swing-AWT-SWT-JFace/java/Data-getting-corrupt-Jscrollpane-Solaris]
2) In the other posting you where asked to use the "Code tags" so the code is readable. Why do you think this forum is any different? Why should we have to ask you a second time to use the "Code tags"?
I don't use Soloaris so I can't help.

Similar Messages

  • Images getting corrupted in Lightroom 4.2

    I have experienced this aswell. As mentioned in:
    http://forums.adobe.com/message/4138626
    and http://forums.adobe.com/thread/948417?tstart=0
    My lightroom has after two weeks of playing with a fully working raw file corrupted it.
    This is what the photo looked like originally http://500px.com/photo/14737987
    As of today, I tried to reexport it with a diffrent watermark, the raw file corrupted. It exports a corrupted jpg and when I delete the .xmp metadatafile and try to import it again (same happens with it now when trying to import it to photoshop) the raw file now renders as corrupted in all software.
    I have tried every possible way to reimport it, its just plain broken. If this should happen to my whole portfolio I would cry.

    Here's evidence that LR is rewriting an entire JPEG file when I add metadata and do Save Metadata To File, just as Rob has described.
    First, I imported a JPEG in which all the metadata had been stripped using Exiftool.  Exiftool's dump shows that the image data starts at around hex offset 10:
    Immediately after importing, I did Save Metadata To File, and the image data now starts at around hex offset 0cf0:
    Next I added a short caption and did Save Metadata To File, and the image data now starts at around hex offset 0dd0:
    I used the Microsoft Sysinternals' Process Monitor to trace file reads and writes to the JPEG file while LR was doing Save Metadata To File, and that confirms it is writing the entire 1 MB file:
    Obviously, if there's a hardware fault anywhere in the path from the disk to memory and back, the contents of the image data could get corrupted.
    And just as Rob has patiently explained, the fact that the file could get rewritten doesn't constitute any criticism of LR.

  • Date format is corrupted while exporting GridView data to excel

    I have set UK culture on my machine. Date is getting exported correctly. I have written following code:
    Response.ClearContent();
    Response.AddHeader("content-disposition", "attachment; filename=IncidentsSearch.xls");
    Response.ContentType = "application/vnd.xls";
    //Ccreate string writer object and pass it to HtmlTextWriter object
    StringWriter sw = new StringWriter();
    HtmlTextWriter htw = new HtmlTextWriter(sw);
    gv.RenderControl(htw);
    Response.Write(sw.ToString());
    Response.End();
    But when I change my machine culture to US, date format gets corrupted. It exports date in "DD/MM/YYYY" format. When I apply filter on this column, it tries to convert these values to date format "MM/DD/YYYY". If there are 2 date values
    like "05/08/2014" and "13/11/2014". When I try to change format of these 2 values to Long Date, it will try to convert it to MM/DD/YYYY format as US culture is set. So 1st values will be converted to 8 May, 2014 which is actually 5th Aug,2014.
    For 2nd date value, it will not be able to convert it to date as 13 is not valid month. I want that when UK culture is set, it should automatically export date values in "DD/MM/YYYY" format and when US culture is set, it should automatically export
    date values in "MM/DD/YYYY" format. Please suggest some solution.

    Hi
    This is the forum to discuss questions about VSTO develop (add-in, custom document). For your question is more about Web Form Data, I suggest you post this thread to asp.net data forum
    http://forums.asp.net/24.aspx/1?Web+Forms+Data+Controls
     The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.
    Thank you for your understanding.
    Best Regards
    Lan
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • PDF file gets corrupted when generated from BSP

    Hi,
         I am generating a PDF file from a BSP page ( see the code below). The problem is that PDF file gets corrupted and  I am unable to open it. I also tried to use other functions like GUI_Download and DOwnload as suggested by many and they also do not work either. Has any one generated a PDF from BSP and can some one help?
    Data: GG type String.
    event handler for data retrieval
    data : event type ref to cl_htmlb_event.
    class cl_htmlb_manager definition load.
    class CL_HTTP_RESPONSE DEFINITION LOAD.
    DATA : PARAMS TYPE PRI_PARAMS,
             VALID  TYPE C,
    GV_SUCCESS_SPOOL_NO LIKE SY-SPONO.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING DESTINATION           = 'LOCL'
               COPIES                = COUNT
               LIST_NAME             = 'TEST'
               LIST_TEXT             = 'Test NEW-PAGE PRINT ON'
                  IMMEDIATELY           = ''
                  RELEASE               = 'X'
                  NEW_LIST_ID           = 'X'
               EXPIRATION            = DAYS
                  LINE_SIZE             = 140
               LINE_COUNT            = 23
               LAYOUT                = 'X_PAPER'
               SAP_COVER_PAGE        = 'X'
               RECEIVER              = 'SAP*'
               DEPARTMENT            = 'System'
                  NO_DIALOG             = 'X'
        IMPORTING OUT_PARAMETERS        = PARAMS
                  VALID                 = VALID.
      IF VALID <> SPACE.
        NEW-PAGE PRINT ON  PARAMETERS PARAMS NO DIALOG.
    write :/ 'Hello Message1'.
    write :/ 'Hello Message2 '.
    NEW-PAGE PRINT OFF .
      ENDIF.
    data :        spool_no TYPE TSP01-RQIDENT .
    spool_no = sy-spono.
    DATA: itab TYPE TLINE,
            witab TYPE TABLE OF TLINE,
            output TYPE STRING,
            outputx TYPE XSTRING.
    data : l_pdf_len type i.
    data: mi_bytecount type i.
    DATA : APP_TYPE TYPE STRING VALUE  'APPLICATION/PDF' .
    DATA:    cached_response TYPE ref to if_HTTP_RESPONSE.
    data : l_display_url type string .
    data : guid type GUID_32 .
      call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
        EXPORTING
          SRC_SPOOLID              = spool_no
          NO_DIALOG                = 'X'
       IMPORTING
          PDF_BYTECOUNT            =  mi_bytecount
        TABLES
          PDF                      = witab
        EXCEPTIONS
          ERR_NO_ABAP_SPOOLJOB     = 1
          ERR_NO_SPOOLJOB          = 2
          ERR_NO_PERMISSION        = 3
          ERR_CONV_NOT_POSSIBLE    = 4
          ERR_BAD_DESTDEVICE       = 5
          USER_CANCELLED           = 6
          ERR_SPOOLERROR           = 7
          ERR_TEMSEERROR           = 8
          ERR_BTCJOB_OPEN_FAILED   = 8
          ERR_BTCJOB_SUBMIT_FAILED = 9
          ERR_BTCJOB_CLOSE_FAILED  = 10
          others                   = 11.
      if sy-subrc EQ 0.
        LOOP AT witab INTO itab.
          CONCATENATE
            output
            itab-tdline
          INTO output in character mode.
        ENDLOOP.
    endif.
    CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
            EXPORTING
                text   = output
                mimetype =   'APPLICATION/PDF'
            IMPORTING
                buffer = outputx.
    concatenate cl_abap_char_utilities=>byte_order_mark_little
    outputx
    into outputx in byte mode.
      response->set_header_field( name = 'content-type' value =
    'APPLICATION/PDF; charset=utf-16le'  ).
      response->delete_header_field( name =
    if_http_header_fields=>cache_control ).
      response->delete_header_field( name = if_http_header_fields=>expires
      response->delete_header_field( name = if_http_header_fields=>pragma )
      response->set_header_field( name = 'content-disposition'
                                  value = 'attachment; filename = TEST.PDF'
      l_PDF_len = xstrlen( OUTPUTX ).
      response->set_data( data = OUTPUTx
                          length = l_PDF_len ).
    navigation->response_complete( ).
    Regards
    Amit Agrawal

    HI Craig Cmehil,
                   I have tried this code as well as given in the URL specified by you. But using this also browser shows the following  content. It seems that PDF content is corrupted.
    My Output as shown on Browser Starts below this line----
    DF-1.3
    %âãÏÓ
    2 0 obj
    /WinAnsiEncoding
    endobj
    3 0 obj
    <<
    /Type /Font
    /Subtype /Type1
    /BaseFont /Courier
    /Name /F001
    /Encodg 2 0 R
    >>
    endobj
    4 0 obj
    <<
    /Length 5 0 R
    >>
    stream
    /F001 7.30 Tf 0 0 0.753 rg BT 18.00 570.65 Td 0 Tw <33302E30362E3230302020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020>Tj ET 0 0 0.753 rg BT 2950 570.65 Td 0 Tw
    <20204854545020436F6E74726F6C202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020>Tj ET 0 0 0.753 rg BT 572.40 570.65 Td 0 Tw <2020202020202020202020202031>Tj ET q 0 0 0 RG 0.55 w 18.00 562.90 m
    634. 562.90 l S Q 0 0 0.753 rg BT 18.00 551.45 Td 0 Tw <48656C6C6F20416D6974>Tj ET 0 0 0.753 rg BT 18.00 541.85 Td 0 Tw <48656C6C6F204765726176>Tj ET
    endstream
    endobj
    5 0 obj
    624
    endobj
    6 0 obj
    <<
    /Type /Page
    /MediaBox
    /Parent 1 0 R
    /Resource
    <<
    /ProcSet
    /PDF /Text
    /Font
    <<
    /F001 3 0 R
    >>
    /XObject
    <<
    >>
    >>
    /Contents 4 0 R
    >>
    endobj
    7 0 obj
    <<
    /Author (AMG )
    /CreationDate (20050630 181301)
    /Creator (Form X_58_170 EN)
    /Producer (SAP R/3 Release 620 )
    %SAPinfoStart TOA_DARA
    %FUNCTI=(    )
    %MANDANT=(   )
    %DEL_DATE=(00000000)
    %SAP_OBJECT=(          )
    %AR_OBJECT=(          )
    %OBJECT_ID=(                          )
    %FORM_ID=(                                        )
    %FORMARCHIV=(  )
    %RESERVE=(   )
    %NOTIZ=(                                                                )
    %SAPinfoEnd TOA_DARA
    >>
    endobj
    1 0 obj
    <<
    /Type /Pages
    /Kids
    [ 6 0 R
    /Count 1
    >>
    endobj
    8 0 obj<<
    /Type /Catalog
    /Pages 1 0 R
    /PageMode /UseNone
    >>
    endobj
    xref
    0 9
    0000000000 65535 f
    0000001801 00000 n
    0000000017 0000n
    0000000052 00000 n
    0000000157 00000 n
    0000000840 00000 n
    0000000862 00000 n
    0000001048 00000 n
    0000001869 00000 n
    trailer
    /Size 9
    /Root 8 0 R
    /Info 7 0 R
    >>
    startxref
    1944
    %%EOF
    Browser Displey Content Ends----
    My Coding Starts----
    Data: GG type String.
    event handler for data retrieval
    data : event type ref to cl_htmlb_event.
    class cl_htmlb_manager definition load.
    class CL_HTTP_RESPONSE DEFINITION LOAD.
    DATA : PARAMS TYPE PRI_PARAMS,
             VALID  TYPE C,
    GV_SUCCESS_SPOOL_NO LIKE SY-SPONO.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING DESTINATION           = 'LOCL'
               COPIES                = COUNT
               LIST_NAME             = 'TEST'
               LIST_TEXT             = 'Test NEW-PAGE PRINT ON'
                  IMMEDIATELY           = ''
                  RELEASE               = 'X'
                  NEW_LIST_ID           = 'X'
               EXPIRATION            = DAYS
                  LINE_SIZE             = 140
               LINE_COUNT            = 23
               LAYOUT                = 'X_PAPER'
               SAP_COVER_PAGE        = 'X'
               RECEIVER              = 'SAP*'
               DEPARTMENT            = 'System'
                  NO_DIALOG             = 'X'
        IMPORTING OUT_PARAMETERS        = PARAMS
                  VALID                 = VALID.
      IF VALID <> SPACE.
        NEW-PAGE PRINT ON  PARAMETERS PARAMS NO DIALOG.
    write :/ 'Hello Amit'.
    write :/ 'Hello Gaurav '.
    NEW-PAGE PRINT OFF .
      ENDIF.
    GV_SUCCESS_SPOOL_NO = sy-spono.
    data :        spool_no TYPE TSP01-RQIDENT .
    spool_no = sy-spono.
    write: GV_SUCCESS_SPOOL_NO.
    *write: spool_no.
    IF display_type = 'convertspool'.
      DATA: itab TYPE TLINE,
            witab TYPE TABLE OF TLINE,
            output TYPE STRING,
            outputx TYPE XSTRING.
    data : l_pdf_len type i.
    data: mi_bytecount type i.
    DATA : APP_TYPE TYPE STRING VALUE  'APPLICATION/PDF' .
    DATA:    cached_response TYPE ref to if_HTTP_RESPONSE.
    data : l_display_url type string .
    data : guid type GUID_32 .
           spool_no like TSP01-RQIDENT .
    *spool_no = GV_SUCCESS_SPOOL_NO .
      call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
        EXPORTING
          SRC_SPOOLID              = spool_no
          NO_DIALOG                = 'X'
       IMPORTING
          PDF_BYTECOUNT            =  mi_bytecount
        TABLES
          PDF                      = witab
        EXCEPTIONS
          ERR_NO_ABAP_SPOOLJOB     = 1
          ERR_NO_SPOOLJOB          = 2
          ERR_NO_PERMISSION        = 3
          ERR_CONV_NOT_POSSIBLE    = 4
          ERR_BAD_DESTDEVICE       = 5
          USER_CANCELLED           = 6
          ERR_SPOOLERROR           = 7
          ERR_TEMSEERROR           = 8
          ERR_BTCJOB_OPEN_FAILED   = 8
          ERR_BTCJOB_SUBMIT_FAILED = 9
          ERR_BTCJOB_CLOSE_FAILED  = 10
          others                   = 11.
      if sy-subrc EQ 0.
        LOOP AT witab INTO itab.
          CONCATENATE
            output
            itab-tdline
          INTO output in character mode.
        ENDLOOP.
    endif.
    *write : output.
    CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
            EXPORTING
                text   = output
                mimetype =   'APPLICATION/PDF'
            IMPORTING
                buffer = outputx.
    *concatenate cl_abap_char_utilities=>byte_order_mark_little
    *outputx
    *into outputx in byte mode.
    CREATE OBJECT cached_response TYPE CL_HTTP_RESPONSE EXPORTING add_c_msg = 1.
    some Browsers have caching problems when loading Excel Format
      response->set_header_field( name = 'content-type' value =
    'APPLICATION/PDF'  ).
      response->delete_header_field( name =
    if_http_header_fields=>cache_control ).
      response->delete_header_field( name = if_http_header_fields=>expires
      response->delete_header_field( name = if_http_header_fields=>pragma )
        l_pdf_len = xstrlen( outputx ).
        cached_response->set_data( data   = outputx
                            length = l_pdf_len ).
        cached_response->set_header_field( name  = if_http_header_fields=>content_type
                                           value = 'application/pdf' ).
        cached_response->set_status( code = 200 reason = 'OK' ).
        cached_response->server_cache_expire_rel( expires_rel = 180 ).
        CALL FUNCTION 'GUID_CREATE'
          IMPORTING
            ev_guid_32 = guid.
        CONCATENATE runtime->application_url '/' guid '.pdf' INTO l_display_url.
        cl_http_server=>server_cache_upload( url      = l_display_url
                                             response = cached_response ).
    RETURN.
    My Coding Ends----
    Any Further help on this.
    Regards
    Amit Agrawal

  • 4s backs up ok, but when I try to recover get corruption error

    When I try to recover my phone from a backup get corruption error everytime.  Yet I can backup just fine with no errors.  Then on that same backup I just created I try to restore it and get an error.  I tried backing up another iphone, and tried recovering from that backup file and get the same error.  Whats making all my backups get corrupted?  I can sync just fine with no errors.  But can't recover ever from any of my backups, not even one that I create right now.
    Using a PC.
    Thanks
    DJ

    "So you believe the phone is corrupted ...?"  Well, not exactly.  I believe you had been carrying around some corrupted data, possibly associated with a misbehaving app or some such thing.
    "... I'm afraid that if all my backups are corrupted ...".  Yes, this is not absolutely guaranteed to work.  But I think there is a high likelihood it will do an orderly transition of only the good data from the backup to your device.  No guarantee, but for what it's worth, if I were in your situation, I would try this.

  • SQL Anywhere 11 databases are getting corrupt

    Hi
    We are having problems with databases that are getting corrupted.
    We have a server that runs a SQL Anywhere 11 database. (the consolidated database)
    Beside that, we have about 15 remote databases that run on the laptops of our mobile workforces.
    To keep all databases in sync, we have setup a two-way server-to-laptop replication.
    For the replication process we use “SQL Remote”.
    Each laptop should replicate his data once in about 1 or 2 weeks.
    For exchanging the messages we use the message type “file”.
    This year we already experienced 6 times that a remote database got corrupt after replication. (after running dbremote.exe).
    The log file of the dbremote utility does NOT show any errors, the replication seems to be finished without any problems.
    But after this, it’s not possible anymore to connect to the database, because of the following assertion error:
    [Sybase][ODBC Driver][SQL Anywhere]Internal database error *** ERROR *** Assertion failed: 201501 (11.0.1.2376)
    Page 0x0:0x7182d1 for requested record not a table page -- transaction rolled back
    Error code=-301
    SQL state=HY000
    Can someone tell me more about this error?
    What goes wrong and why?
    Or does someone has some tips on how to prevent this or tips on how I can do some analyzing myself to see what exactly got broken in the database?
    Any help is appreciated.
    Thanks.

    Hi Krenton,
    Page 0x0:0x7182d1 for requested record not a table page -- transaction rolled back
    Error code=-301
    SQL state=HY000
    Can someone tell me more about this error?
    Specifically, the page at offset 0x7182d1 in database (So if you have a 4KB page size, this would be byte offset 7439057 x 4096 = 30470377472 into the database) in 0x0 (the main database running) has a page header that indicates that the data on the page is not table data. We don't know what it is, but the signature for table information connected to the table you're scanning is 'not as it should be'.
    What goes wrong and why?
    In the real world, lots of things can go wrong. I list some of the possible things on this question here on the SQL Anywhere forum. This list can include software bugs, but can also include instances where the media is not respecting write-through or write-ordering - see http://scn.sap.com/docs/DOC-34090 (SQL Anywhere I/O Requirements for Linux and Windows) for more details.
    There are also known instances where Intel drivers are not set with the correct write-through settings. The details of this are in the documentation: DocCommentXchange (Improving Robustness on Intel storage drivers).
    Technical Support should still provide assistance. If the problem is a newly-discovered bug in SQL Anywhere 11, their advice will be to apply a more recent EBF or upgrade to a new version. However, that is unlikely in this case.
    Breck is correct - it would probably be best to take a look at the database file in technical support for more clues as to what's happening here. With the current information, it's hard to say more than "something was not correct at the time the page was looked at by the database server."
    Regards,
    Jeff Albion
    SAP Active Global Support

  • Calling procedure with 4 output varchar2 gets corrupted (via SQLExecDirect)

    I have a procedure:
    create or replace procedure
    cme.GetNominalIndividualDetails(iNominalIndexID in
    number,sSurname out varchar2,sForenames out varchar2,sCRONumber
    out varchar2,dtDOB out date) AS
    begin
    select Surname,Forenames,CRONumber,DOB into
    sSurname,sForenames,sCRONumber,dtDOB from v_NominalIndividual
    where NominalIndexID = iNominalIndexID;
    exception
    when no_data_found then
    begin
    sSurname:=null;
    sForenames:=null;
    dtDOB:=null;
    sCRONumber:=null;
    end;
    end;
    When I call this procedure from code I always get corrupt
    strings comming back (it looks like they are not null
    terminated) using ODBC with VC++ using Bindparameters with
    SQLExecDirect.
    The latest odbc driver is no help..
    If anyone has a solution please let me know... (it works fine
    with our Sybase / MS SQL server databases).
    I am persuming it is a bug in the oracle odbc ??
    Matt.
    Can you email at [email protected]
    Thanks.

    fyi
    Related to the solution/workaround posted by Luc.
    see "Do Oracle's JDBC drivers support PL/SQL tables/result sets/records/booleans? "
    at http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#34_05
    regards
    Jan Vervecken

  • Data Base is corrupt message when Installing CS4 web premium unto new computer

    Just purchased a new HP desktop running Win7-64bit and when attempting to load CS4 I keep getting an error message indicating that "Installer data base is corrupt", and to contact Adobe Customer Service.  I already have it installed in another HP DT running Win7 64bit so I don't believe the new machine could be the problem... any suggestions?

    I'm having a very similar issue and it seems to me that absolutely no one knows anything about this and/or are willing to help.  They've given me some advice but nothing has helped and when I ask more questions for specifics they won't respond. 

  • Email attachments gets corrupted (javamail)

    hi i am using javamail1.4
    when i am trying to store the attachmnets in a folder they are getting corrupted.
    please help me in this

    some code plz.
    anyway, here a typical code to send e-mails (with or without attachementpackage test;
    import java.io.File;
    import java.util.Date;
    import java.util.Properties;
    import javax.activation.DataHandler;
    import javax.activation.FileDataSource;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.Multipart;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeBodyPart;
    import javax.mail.internet.MimeMessage;
    import javax.mail.internet.MimeMultipart;
    public class SendMail {
         // Sender, Recipient, CCRecipient, and BccRecipient are comma-separated
         // lists of addresses. Body can span multiple CR/LF-separated lines.
         // Attachments is a ///-separated list of file names.
         public static int Send(String SMTPServer, String SMTPPort, String Sender, String Recipient, String CcRecipient, String BccRecipient,
                   String Subject, String Body, String ErrorMessage[], String Attachments, String encoding) {
              // Error status;
              int ErrorStatus = 0;
              // Create some properties and get the default Session;
              Properties props = System.getProperties();
              props.put("mail.smtp.host", SMTPServer);
              props.put("mail.smtp.port", SMTPPort);
              props.put("mail.mime.charset", encoding);
              Session session = Session.getDefaultInstance(props, null);
              try {
                   // Create a message.
                   MimeMessage msg = new MimeMessage(session);
                   // extracts the senders and adds them to the message.
                   // Sender is a comma-separated list of e-mail addresses as per RFC822.
                        InternetAddress[] TheAddresses = InternetAddress.parse(Sender);
                        msg.addFrom(TheAddresses);
                   // Extract the recipients and assign them to the message.
                   // Recipient is a comma-separated list of e-mail addresses as per RFC822.
                        InternetAddress[] TheAddresses = InternetAddress.parse(Recipient);
                        msg.addRecipients(Message.RecipientType.TO, TheAddresses);
                   // Extract the Cc-recipients and assign them to the message;
                   // CcRecipient is a comma-separated list of e-mail addresses as per RFC822
                   if (null != CcRecipient) {
                        InternetAddress[] TheAddresses = InternetAddress.parse(CcRecipient);
                        msg.addRecipients(Message.RecipientType.CC, TheAddresses);
                   // Extract the Bcc-recipients and assign them to the message;
                   // BccRecipient is a comma-separated list of e-mail addresses as per RFC822
                   if (null != BccRecipient) {
                        InternetAddress[] TheAddresses = InternetAddress.parse(BccRecipient);
                        msg.addRecipients(Message.RecipientType.BCC, TheAddresses);
                   // Subject field
                   msg.setSubject(Subject);
                   // Create the Multipart to be added the parts to
                   Multipart mp = new MimeMultipart();
                   // Create and fill the first message part
                        MimeBodyPart mbp = new MimeBodyPart();
                        mbp.setText(Body);
                        // Attach the part to the multipart;
                        mp.addBodyPart(mbp);
                   // Attach the files to the message
                   if (null != Attachments) {
                        File file;
                        int StartIndex = 0, PosIndex = 0;
                        while (-1 != (PosIndex = Attachments.indexOf(",", StartIndex))) {
                             file = new File(Attachments.substring(StartIndex, PosIndex));
                             if (file.exists()) {
                                  // Create and fill other message parts;
                                  MimeBodyPart mbp = new MimeBodyPart();
                                  FileDataSource fds = new FileDataSource(Attachments.substring(StartIndex, PosIndex));
                                  mbp.setDataHandler(new DataHandler(fds));
                                  mbp.setFileName(fds.getName());
                                  mp.addBodyPart(mbp);
                             PosIndex += 3;
                             StartIndex = PosIndex;
                        // Last, or only, attachment file;
                        if (StartIndex < Attachments.length()) {
                             String filePath = Attachments.substring(StartIndex).trim();
                             file = new File(filePath);
                             if (file.exists()) {
                                  MimeBodyPart mbp = new MimeBodyPart();
                                  FileDataSource fds = new FileDataSource(filePath);
                                  mbp.setDataHandler(new DataHandler(fds));
                                  mbp.setFileName(fds.getName());
                                  mp.addBodyPart(mbp);
                   // Add the Multipart to the message
                   msg.setContent(mp);
                   // Set the Date: header
                   msg.setSentDate(new Date());
                   // Send the message;
                   Transport.send(msg);
              } catch (MessagingException e) {
                   ErrorMessage[0] = e.toString();
                   Exception TheException = null;
                   if ((TheException = e.getNextException()) != null)
                        ErrorMessage[0] = ErrorMessage[0] + "\n" + TheException.toString();
                   ErrorStatus = 1;
              return ErrorStatus;
         } // End Send Class
         public static void main(String[] args) {
              String SMTPServer="";
              String SMTPPort="25";
              String Sender="";
              String Recipient="";
              //String Recipient="";
              String CcRecipient="";
              String BccRecipient="";
              String Subject="";
              String Body="";
              //String Body="";
              String[] ErrorMessage=new String[]{""};
              String Attachments="a.pdf, b.doc";
              String Encoding="ISO-8859-1";
              SendMail.Send(SMTPServer, SMTPPort, Sender, Recipient, CcRecipient, BccRecipient, Subject, Body, ErrorMessage, Attachments, Encoding);
    } // End of public class SendMail):
    You'll need at least activation.jar and mail.jar

  • Files keep getting corrupted.

    Heavily used, shared, files keep getting corrupted. Seems like StarOffice8 or Solaris (not sure which is responsible) doesn't do file locking! If someone opens the file, when it's already open, there's no indication of that! Obviously that can lead to edits being lost. However, the bigger problem is if 2 people save at the exact same time. In that case the file becomes completely mangled and unreadable!
    Anyone have some solutions out there?

    The Captivate version number is shown at Help > About Adobe Captivate.  But you have to be quick because it's right at the top and the list of credits start's scrolling immediately.  Annoys the heck out of me.
    Having Admin rights to your PC is not the same as Run As Administrator on an app.  It's one of the (many) changes to the Vista and Win7 OSs intended to prevent malicious software from gainin a foothold.
    If you're in a corporate IT environment chances are you don't have admin rights to your PC because that prevents people from willy nilly installing apps on their own workstations.  However, a good IT Support dude (who usually all DO have admin rights to everyone's computer) can usually configure the security privileges for a particular application to give you admin rights to it.
    In the case of Captivate 5x and Win7, the app MUST be set up to Run As Administrator.  Otherwise some things just don't work.

  • 10g Data Guard Install Questions... Solaris 9

    Firstly, I've done several Failsafe installes on Wintel platforms, but I'm having a tough time getting started installing Dataguard on Solaris. According to the manual:
    Oracle® Data Guard Broker
    10g Release 1 (10.1)
    Part Number B10822-01
    "The Oracle Data Guard graphical user interface (GUI), which you can use to manage broker configurations, is installed with the Oracle Enterprise Manager software."
    I don't see any link or otherwise access to Data Guard via the 10g Enterprise Manager. Is there something that I missed during install that will allow me access Data Guard GUI?
    I'm stuck
    http://download-east.oracle.com/docs/cd/B14117_01/server.101/b10822/concepts.htm#sthref14

    rajeysh wrote:
    refer the link:- hope this will help you.
    http://blogs.oracle.com/AlejandroVargas/gems/DataGuardBrokerandobserverst.pdf
    http://oracleinstance.blogspot.com/2010/01/configuration-of-10g-data-guard-broker.html
    http://gjilevski.wordpress.com/2010/03/06/configuring-10g-data-guard-broker-and-observer-for-failover-and-switchover/
    Good luck.
    SQL> show parameter broker
    NAME                                 TYPE        VALUE
    dg_broker_config_file1               string      /u03/KMC/db/tech_st/10.2.0/dbs
                                                     /dr1KMC_PROD.dat
    dg_broker_config_file2               string      /u03/KMC/db/tech_st/10.2.0/dbs
                                                     /dr2KMC_PROD.dat
    dg_broker_start                      boolean     FALSE
    SQL>so i need only:
    ALTER SYSTEM SET DG_BROKER_START=true scope=both;only to act in dgmgrl.
    please confirm me ......

  • Starting to get corrupted files

    Since I upgraded to Lightroom 4 last week, I've had two occasions where Windows 7 operating system at boot tells me I have corrupt files on the separate 2TB drive I use to store Lightroom catalog and photos on.  One difference between my LR3 vs LR4 settings was that I turned on the option to write XMP data to files per advice from Adobe evangelist that this is a better backup strategy in case LR catalog gets corrupt.  Wondering whether the LR 4 background process to write out XMP is causing the problem. 
    It might be a self inflicted wound, as last night, I was importing iPad screenshot PNG files into Bridge, batch renaming them and then exporting them to hard drive as JPG (when is Lightroom going to support PNG?) and synchronizing that folder in LR4 so that I can view in LR4. Maybe the fact that I have LR4 and Bridge open at the same time and doing some operations corrupted them?  LR4 got stuck at 1% progress in creating previews, so left the computer on overnight and when I come back in morning, black screen of death. When reboot, says I have to check that drive and finds lots of corrupt record segments. Never had this problem with LR3 and Bridge open at same time before LR4 and turning on the option to write XMP data to files.

    I am experiencing reports of corrupted files as well!!! First report of corrupted files came the day after I installed Lightroom 4. No problems while I was using Ligthroom 3. So far, it seems to only occur with JPG-files.
    I have about 10 000 photos stored on a Windows Home Server, both JPG and RAW files. About one day after I had installed and started using Lightroom 4, the WHS server began to complain about "file conflicts" (This is actually the first time I have experienced this spesific error on the server). I then found that the reason was that a lot of JPG-files had been locked and then never unlocked again. I am a developer myself, and many years ago I had some experience of this problem due to some programs that failed to close the files. Whatever the reason was this time, it was making it impossible for the WHS server to duplicate these files to a second hard drive (on WHS, duplication of files is done by a service. And if this service is unable to duplicate a file in 24 hours, it may report "file conflicts"). First strange thing about this was that it seemed to happen only with JGP files, and with files shot many years ago. It have been many years since I made any changes to those photos. To make the locks go away, I restarted the server. This seemed to resolve the problem with the locks. My first thought was that one of the disks on the server was about to fail, but after my next experiences I am beginning to think that’s not the problem…
    For a few days I did not use Lightroom, and in this period no problems was reported by the server. But then, after using Lightroom 4 again a few hours, the same problem occurs. I now started to do some more investigation. Using Event Viewer on the WHS, I found that WHS was reporting both file lock problems and some file corruptions, and pointed me to some specific JPG files. Checking the files, I found that the files had been changed the same day I installed and used Lightroom 4 for the first time. After some more checking I found some corrupt JPG files, as well. This was yesterday, and since then, I have not dared to use Lightroom 4.
    Actually I think all JPG files I have browsed using Lightroom 4, has been modified. But only some of them became "locked" or corrupted. Checking the RAW files, could not find that they have not been touched. I store a lot of data on my WHS server and many types of files. But corruption has only been a problem with the JGP files…
    If I used file explorer to preview the corrupted files, I still got a preview of some of them. And it was easy to see they were corrupted. Actually it looked like a number of photos have been merged together like a mosaic. Trying to open one of the corrupted files using Photoshop CS5, ended with a message saying it was impossible to read the file.
    For now I am not able to do more testing of this problem, but I am planning to copy all the photos to an external USB disk, and then play around with it using Lightroom 4, to see if problem shows up again.
    Some info about my computers:
    I am using Windows 7 x64 on a Dell M6400 laptop with Lightroom 4 x64. The catalog resides on this laptop.
    My WHS Server is of the first version released by Microsoft (not the 2011 version), but with all updates installed. All photos, both the JPG and the RAW files reside on a share on the WHS Server. I have been using this WHS server for many years now, and with both Lightroom 2 and Lightroom 3 before the upgrade to Lightroom 4. During this time I have experienced one disk crash, but thanks to the file duplication no data was lost. The server is currently equipped with three physical disks; one 1.5TB, one 650 GB and one 2 TB.
    Most of my JPG files are shot with a Canon IXUS 400 (many years ago). My RAW files are all shot with a Canon 5D Mk2, but those seem to be untouched.
    I will report back as soon I have more information.

  • Webi documents get corrupted

    Hi all,
    I'll try to explain the situation and hope anyone can help on it.
    I am at a customer with verson 3.1. Thery are using liveoffice and xcelsius and they call webi documents from xcelsius. The strange thing is that after a while the webi document get corrupted, the universe assigned to the document seems to be missing and all the documents give up working. If you copy the universe and reassing the universe to the document it works again.
    The errors we are getting are WIS 30270 processDPcommands and also with the API getblob. I have been looking but did not find any solution.
    Has anyone faced something like this?
    Thanks a lot

    Hi Jaun,
    Following information might help you to resolve the issue.
    1.Business Objects Enterprise provides thresholds to protect the Web Intelligence report server and the Web Application servers from processing large chunks of binary and character data and avoid crashing.
    Maximum Binary File Size: Maximum size of a binary file (for example: PDF, XLSu2026) that can be generated by the Report Server. If a binary file generated from a Web Intelligence document is greater than this limit, the generation is stopped to protect the server and an error is returned. Increase this limit if the server has to generate large binary files (for example, if Info View users view large documents in *.PDF format).
    Maximum Character File Size: Maximum size of a text stream (for example: HTML, XML) that will be transferred to the application server. If a text stream sent to the application server is greater than this limit, the generation is stopped to protect the server and an error is returned.
    In CMC, under Servers>Web Intelligence Report server, you can possibly set both the above values to 50MB, but you have to ensure that the application server can handle the increased load multiplied by the number of simultaneous connections. If not, it can crash and block all access to applications.
    2. Ensure that the Web Application servers have enough memory available to process incoming requests. Usually the -Xmx value for java process is set at 256Mb, which is recommended to be at least 1024Mb or more depending on your Export requirements and application server limitations.
    Regards,
    Sarbhjeet Kaur

  • Excel file crashes and then file is unable to save or gets corrupt

    Hi I have a PC running Windows 7 64bit and Office 2013 Home and Business (32bit).
    We have a number of Excel files being used and have recently noticed them freezing/crashing while working on them also sometimes they cannot be saved and or get corrupted. I had a look at the event viewer and saw the event below, can you please help in this
    matter to find the cause of the issue or help resolve the issue?
    Log Name:      Application
    Source:        Application Error
    Date:          10/12/2013 17:16:45
    Event ID:      1000
    Task Category: (100)
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      TOP-17
    Description:
    Faulting application name: EXCEL.EXE, version: 15.0.4551.1003, time stamp: 0x524a7d99
    Faulting module name: EXCEL.EXE, version: 15.0.4551.1003, time stamp: 0x524a7d99
    Exception code: 0xc0000005
    Fault offset: 0x0101b61e
    Faulting process id: 0x1bc8
    Faulting application start time: 0x01cef59dadaa4171
    Faulting application path: C:\Program Files\Microsoft Office 15\Root\Office15\EXCEL.EXE
    Faulting module path: C:\Program Files\Microsoft Office 15\Root\Office15\EXCEL.EXE
    Report Id: d800d93f-61be-11e3-8cf2-a41f727a4bc5
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Application Error" />
        <EventID Qualifiers="0">1000</EventID>
        <Level>2</Level>
        <Task>100</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2013-12-10T17:16:45.000000000Z" />
        <EventRecordID>56177</EventRecordID>
        <Channel>Application</Channel>
        <Computer>TOP-17</Computer>
        <Security />
      </System>
      <EventData>
        <Data>EXCEL.EXE</Data>
        <Data>15.0.4551.1003</Data>
        <Data>524a7d99</Data>
        <Data>EXCEL.EXE</Data>
        <Data>15.0.4551.1003</Data>
        <Data>524a7d99</Data>
        <Data>c0000005</Data>
        <Data>0101b61e</Data>
        <Data>1bc8</Data>
        <Data>01cef59dadaa4171</Data>
        <Data>C:\Program Files\Microsoft Office 15\Root\Office15\EXCEL.EXE</Data>
        <Data>C:\Program Files\Microsoft Office 15\Root\Office15\EXCEL.EXE</Data>
        <Data>d800d93f-61be-11e3-8cf2-a41f727a4bc5</Data>
      </EventData>
    </Event>
    Thank you. Chandu Kerai

    Sorry, it's my my fault. Please try to perform the basic throubleshooting steps for Excel which lists in the link below and check if the issue still persists.
    http://support.microsoft.com/kb/2758592/en-us
    Most of steps have been mentioned by
    Keith Ruck in the first reply but you may try the rest.
    Review the event log from your initial post and the error message is general. We need to use some tool like Process Monitor for further tracking that and analyze deeply.
    For the crash/hangs issue, use ADPlus.vbs to have a try.
    http://support.microsoft.com/kb/286350/en-us
    Cheers,
    Tony Chen
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please contact
    [email protected]

  • Data file got corrupted

    <b>If the datafile get corrupted while creating, what should I do?</b>

    Hi
    During creation of datafile, if the datafile got corrupted then you can delete the data file and recreate it again. The condition is that the particular data file has not been used after creation.
    But if the datafile is created snd used, then you have to restore the datafile from the backup (use the Brtools to restore the datafile)
    Please use Brtools utliity for the same.
    Thanks

Maybe you are looking for

  • How to set attributes in new connection url request

    Hi, I'm an italian programer and I'm sorry for my english. Using the follow java code, I include an jsp page in to other jsp page. I use struts framework too. The problem is that the page includes do not has on the request object the same attributes

  • Anyone having problems editing text on wiki pages in Workspace?

    I have had some serious issues when editing text on new wiki pages in my new Beehive workspace. First when I tried creating bulleted lists (with several or more items), after publishing the lists the text would all get tossed to the bottom of the pag

  • Document object link information

    Hi Experts, We are working with documents linked to WBS elements and networks. Now, we need to know which objects have links to a certain type of document without using development. We have explored several solutions: Using Object Link tab on CV04N -

  • HT6312 How do I back up files on my IMac?

    How do I back up files, photos, etc. on my iMac? The info on the Mac only says OS X 10.9.5, not OS X Mavericks...not sure about this discrepancy.

  • Is this only a one-way sync?

    It doesn't seem like the edits I make in either Illustrator or Indesign gets sent back to the app?  That would really be ideal.  Maybe I'm not saving correctly?  Anyway, looks very promising! J.