Canvas Problem:  "Display Unavailable"

I am getting a "Display Unavailable" message when I bring clips to the timeline, even on cips that are just video, not psd files. The canvas is red like it is when media is offline, but instead it reads: Display Unavailable. Close and reopen to restore.
When I close and restore, it says the same thing. There are no differeces in files between the sequences that are displayed correctly, and the one that is not displayed at all.
When I scrubbed a clip, it showed in the canvas and froze; even after I kept scrubbing. I closed FCP5 and reopened it and scrubbed again; it did not display the clip again at all.
What can I do to fix this?

This happens sometimes when you import a CMYK psd file. Make sure all your graphics are RGB.
Patrick

Similar Messages

  • Canvas problem on a s60 device

    Hi i am having a problem displaying a canvas on top of the previous canvas that was displayed. basicly i have tow canvas, one is a full screen canvas and the otehr is simply a rectangle box witha txt inside...
    on the default colour phone emulator i can display both canvas on screen at the same time but on the s60 device it just displays the 2nd canvas with a white background?
    here is the code for the 2nd canvas under the paintFrame method
    public void paint(Graphics g)
            try
    //             g.drawImage(bg,0,0,Graphics.TOP|Graphics.LEFT);
    //             g.drawImage(load[counter],midx,midy,Graphics.VCENTER|Graphics.HCENTER);
                int midy = getHeight() / 2;
                g.setColor(49,65,143);
                g.fillRect(5,midy+15,230, 36);
                g.setColor(255,255,255);
                g.drawString("Connecting to the server. Please wait.", 40,midy+8+15,Graphics.TOP | Graphics.LEFT);
                g.drawImage(load[counter],18,midy+8+19,Graphics.VCENTER|Graphics.HCENTER);
            catch(Exception e)
                    e.printStackTrace();
                    Alert alert = new Alert("error");
                    alert.setString("counter is " + counter);
                    alert.setTimeout(alert.FOREVER);
                    Display.getDisplay(root).setCurrent(alert);
        }All the canvas's are in Threads. i simply call display object to set this canvas has the corrent display.
    I hope someone can help has lately this forum has not been so generous recently to peoples problems. i see alot of threads with absoluetly no response so hope someone here can take 5min of there time to help a fellow j2me developer. Thanks guys

    Ok is it possible to create a thread within a Thread class?i am trying to create a loading screen. At first, i displayed the loadings creen on full screen mode, but the idea was changed by the designer so now i have to display a small loading screen animation whilst the user can still see the previous screen. Similar to a Alert screen.
    i have two sultions:
    as explained above, create another thread from within this thread class.
    Or create an alert screen(Tried this with a gauge and diddnt work properly)
    Which solutution is better or can you find a better solution? cheers

  • Loading an image to a Canvas problem.

    I have constructed a simple GUI, with a menu and a Canvas for displaying images(jpg,gif).
    In the menu I have a Load button(menuItem), which is coupled with an ActionPerformed so that the image will be loaded when I choose Load in the menu.
    Here is the problem: When I choose Load, nothing happens the first time. When i hit Load again, the picture is loaded and displayed. Why?
    Code:
    private void LoadActionPerformed(java.awt.event.ActionEvent evt) {
    // Add your handling code here:
    // Loads the image to memory
    Image img=Toolkit.getDefaultToolkit().getImage("c:/radiohit.jpeg");
    //Shows the Canvas Picture
    pictureCanvas.getGraphics().drawImage(img,0,0,pictureCanvas);

    The problem is that the image hasent finished loading when you try painting it.
    make img a member of your class.
    public void LoadActionPerformed(ActionEvent evt) {
    myCanvas.img=Toolkit.getDefaultToolkit().getImage("c:/radiohit.jpeg");
    myCanvas.repaint();
    }and in the canvas class:
    public void paint(Graphics g)
    g.drawImage(img,0,0,this);
    }The call to repaint will not cause the image to get painted, however, the "this" argument in drawImage will cause "this" (the canvas) to get repainted again when the image is fully loaded -and then the image will get painted. You should have your painting code in paint anyway, because if not a system call to paint would cause your image to disappear even though it was allready there. You could also look at the MediaTracker class and the waitForAll method, if you want to know how to wait for an image to be fully loaded.
    Ragnvald Barth
    Software engineer

  • Operation Not Allowed, Out of Memory, Display Unavailable, and PS nightmare

    Having all of the above titled issues on a project in FCP HD5. Everything was going fine until I started doing some light compositing. I have a regular DV sequence which is fine and then I have some .psd files imported. The .psd files are all only 1 layer with certain areas transparent to reveal whatever is in the video track below. No alpha channels or anything like that.
    Originally the .psds had superfluous layers and when I had this problem I turned them all into 1 layer and cut down the file size. No difference. I trashed the prefs and repaired permissions as discussed in Shane's tips. I also made the sequence offline and then re-linked all my media which does work. But then eventually when manipulating the .psd media I get the "display unavailable error" again. It seemingly happens any time I try to dissolve between two .psds or even the media in the tracks below.
    Fortunately I can keep getting back in and getting to a good point (I'd go berserk if the file corrupted, even if I do have it backed up), but I can't move forward. Is there a solution for this? Maybe there is something I am neglecting to do in prepping the .psds that's causing them not to play nice. Any help is welcome and appreciated, thanks.

    Thanks for replying Jim. Indeed everything is in RGB mode, and they are all 720x540, D1/DV NTSC pixel aspect ratio.
    What I have tried now is saving them all as TIFFs with transparency. This seems to have done the job of allowing me to transition and not get the above errors, though one of my TIFFs didn't preserve the transparency. Weird.
    FCP also rescales them from 720x540 to 810x540 on import. The doesn't take up all of action safe to fill the entire frame. Why is that? Its easy enough to scale it once in FCP, but I'm sure I am doing something wrong in PS. Any further help you can give from here is great! TIA!

  • Problem displaying CLOB in text file

    Hello All,
    I have a problem displaying the content from the database in notepad. When I click on a link on my jsf screen, I retrieve the data and display it in notepad.
    I have my text content stored in the database with CLOB datatype. When I look in the database the data looks in the following format:
    ---------STARTS FROM NEXT LINE-------------
    The firm, known for its keen oversight of products, has been the subject of complaints from firms who have had apps blocked from the store. Some developers have complained that the company's rules seem inconsistent.
    Some have found apps blocked after seemingly minor updates, or for having content deemed inappropriate by them. In light of this, and after careful consideration, I believe it is unnecessary to sign this measure at this time.
    Sincerely,
    ABC
    ----------ENDS IN THE PREVIOUS LINE------------
    Now when I display this content onto the notepad, all the spaces and new line characters are lost, and the entire display looks awkward. This is how it looks:
    The firm, known for its keen oversight of products, has been the subject of complaints from firms who have had apps blocked from the store. Some developers have complained that the company's rules seem inconsistent.[]Some have found apps blocked after seemingly minor updates, or for having content deemed inappropriate by them. In light of this, and after careful consideration, I believe it is unnecessary to sign this measure at this time.[]Sincerely,[]ABC
    All the new line characters are lost and it just puts some junk character in place of a new line.
    When I copy the same text onto textpad, everything is alright and it displays exactly the way it is present in the database. I am also open to display the content in html, but in HTML it doesn't even display me the junk character in place of new line. It is just one single string without any line separators.
    I am using the following code to put the content into the text.
    public String writeMessage(){
       OutputStream outStream = null;
       HttpServletResponse response = getServletResponseFromFacesContext();
       Reader data = null;
       Writer writer = null;
       try{
          response.reset();
          response.setContentType("text/plain; charset=UTF-8");
          response.setHeader("Content-Disposition","attachment; filename="+id+"_Message.txt");
          outStream = response.getOutputStream();
          QueryRemote remote = serviceLocator.getQueriessEJB();
          data = remote.retrieveGovernorsVetoMessage(billId);
          writer = new BufferedWriter(new OutputStreamWriter( outStream, "UTF-8" ) );
          int charsRead;
          char[] cbuf = new char[1024];
          while ((charsRead = data.read(cbuf)) != -1) {
             System.out.println(charsRead);
          writer.write(cbuf, 0, charsRead);
          writer.flush();
       }catch(Exception ex){
          ex.printStackTrace();
       }finally{
          //Close outStream, data, writer
          facesContext.responseComplete();
       return null;
    }Any help or hints on resolving this issue would be highly appreciated.
    Thanks.

    The data is imported from a third party application to my database. It doesn't display any newline characters when I view the data.
    But when I do a regular expression search on text pad, I could see that my clob contains \n as the new line character. Is there a way to replace \n with \n\r while writing the data.
    Thanks.

  • Problem displaying picture stored in mySQL

    Hi, i just have got problem displaying picture stored in database as BLOB and presented on JSP over servlet. Below is my code i am using to upload file into database, than download it and display again. The result is the picture can not draw inself and there is always only empty picture space on the web page i am displaying. Please help me to find why it is not working, thanx.
    servlet uploading picture to database
                   boolean isMultipart = FileUpload.isMultipartContent(req);
                   DiskFileUpload upload = new DiskFileUpload();
                   List items = upload.parseRequest(req);
                   Hashtable textFields = new Hashtable();
                   byte[] data = new byte[4096];
                   if(isMultipart)
                        Iterator iter = items.iterator();
                        while(iter.hasNext())
                             FileItem item = (FileItem)iter.next();
                             if(item.isFormField())
                                  textFields.put(item.getFieldName(), item.getString());
                             }else{
                                  data = item.get();
                   String sqlStatement = "INSERT INTO cds VALUES('" textFields.get("id")"'," +
                                            "'" textFields.get("album") "','" textFields.get("interpreter") "'," +
                                                      "'" textFields.get("gr1") "','" textFields.get("gr2") "','" textFields.get("price") "')";
                   String sqlStatement2 = "INSERT INTO pics VALUES('" textFields.get("id") "','" data "')";
    servlet to download picture
    String SQL =
         "SELECT Picture " +
         "FROM pics " +
         "WHERE id = '" + request.getParameter("id") + "'";
         ResultSet rs = stmt.executeQuery(SQL);
         rs.next();
         Blob blob = null;
         blob = rs.getBlob(1);
         response.setContentType("image/jpg");
         request.setAttribute("blob", blob);
         System.out.println("just above OutputStream");
         InputStream in = blob.getBinaryStream();
         ServletOutputStream sout = response.getOutputStream();
         int b;
         while ((b = in.read()) != -1) {
         sout.write(b);
         in.close();
         sout.flush();
         sout.close();
    img tag in JSP
    <img src="LoadImageServlet?id=some id>
    plus i am using
    Tomcat 5.0
    mySQL 4.0
    debuging in eclipse
    thanx for help once more, Libor.

    1:
    are there any exceptions throws by the jdbc code
    2:
    is the code in a doGet
    3:
    you should do a if(result.next())
    4:
    Is your mapping code working

  • Problems displaying in IE

    While I love iWeb's ease of use, it seems to have serious problems displaying on IE. There is really no point blaming IE, since it is the dominant browser and most people who will see our sites will use it. The point of iWeb should be to allow people to communicate broadly and effectively, not just to Mac & Safari users.
    Lists do not work well. The indents do not display properly. Text in boxes shift alignment and location. Bullets show up with different sizes. I have had to hand indent and line space all the lists in the sites I make, which is a mess and not scaleable.
    See fieldsforkidsmamk.org.
    Are there any workarounds or fixes?
    The other obvious issues with iWeb are worth noting:
    * inconsistent display in browsers -- pages look different in Safari and Firefox, even on the Mac (let alone IE)
    * difficulty adding html code
    * page names must be identical to nav names, so pages with multiple words (Get Involved) display urls as /Get%20Involved (can't be corrected unless you have Get_Involved as a header.)
    * need to publish whole site for any change
    * need to publish all sites for each change to any site
    * can't change color, display, location, function etc for Nav
    I assume everyone is aware of these problems. The question is, what to do? Grin and bear it? Any help, tips or ideas would be appreciated.
    Thanks!
    MacBook Mac OS X (10.4.8)
    MacBook Mac OS X (10.4.8)
    MacBook Mac OS X (10.4.8)
    MacBook   Mac OS X (10.4.8)  

    * page names must be identical to nav names, so pages
    with multiple words (Get Involved) display urls as
    /Get%20Involved (can't be corrected unless you have
    Get_Involved as a header.)
    You can fix this the same way you add html code, by post processing.
    * need to publish all sites for each change to any
    site
    You can fix this by separating your sites into different Domain files so you only publish one at a time.
    Contrary to the other response, "encoding" is not connected to the points you made. There is never any need to add a UTF-8 "tag" to an iWeb page. If you see question marks or Â's when your page is displayed on any browser, Mac or PC, then you may need to fix your ftp or server settings.

  • On-Canvas Info Display

    I can no longer see the on-canvas info display when working in InDesign CS6. How can I change this? Thank in advance!

    Steve,
      I already had Smart Guides enabled, but in my frustration I deleted all guides, and it brought the info display back. Thanks so much for getting me started down the right path!

  • Problems displaying rtf memo fields

    Post Author: Davidm
    CA Forum: General
    We use Crystal Reports X to run reports on an Access database with a significant number of rtf memo fields. We use Total Access Memo to allow extended use of rtf within Access as our users require the additional formatting capabilities that this offers.
    However, there are considerable problems displaying items like bullet points, tables and hyperlinks in the Crystal Viewer with tables in particular coming out in a real mess with all entries in the table being displayed in a list with a small square marking each cell at the end of each line.
    Curiously, if you preview the report in the full version of Crystal X, it appears a bit better with the hyperlinks still underlined (bullet points still vanish) and rows in rtf tables are at least presented as a row even if the columns are not ordered and mixed (with no bounding cells visible).
    Firstly, is this disparity of end result between full Crystal X Print Preview and the Crystal X Viewer fixable?
    Secondly, is the limited handling of rtf tags likely to be solved in the next release of Crystal?

    Hi Mathias,
    If I caught you correctly, you want to display data in Adobe forms in form of tabel, right?
    So, follow the steps:
    1. Insert one sub form on your adobe form.
    2. Set its type as "flow content" in object->subform property.
    3. Set flow direction as "Table".
    4. Insert another subform inside this subform.
    5. set its type as "flow content" and flow direction as "Table row".
    6. Now, choose binding tab, and there check "repeat subform for each Data item check box" and specify min. count for your rows.
    7. Now, insert your column fields inside this sub form once.
    8. Format its look and feel as you want.
    When you run this application, it will show you multiple data as table on Adobe form.
    Regards,
    Bhavik

  • Problem displaying php page in dreamweaver

    I am having problems displaying php scripting on dreamweaver.
    Need your advice.
    Installed dreamweaver 8, Coldfusion 7, mysql, php5.2 (using
    windows installer).
    Created file test.php ror testing containing
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Untitled Document</title>
    </head>
    <body>
    date is:<b><?php echo Hello ?></b>
    </body>
    </html>

    ulises_arsi wrote:
    > I am having problems displaying php scripting on
    dreamweaver.
    Tell us what the problems are.
    > Installed dreamweaver 8, Coldfusion 7, mysql, php5.2
    (using windows installer).
    PHP needs to be configured with a web server, such as Apache
    or IIS.
    ColdFusion is also a webserver, but as far as I know, it
    cannot be
    configured to serve PHP pages.
    > date is:
    <?php echo Hello ?>
    The only thing that would display is an error message. Hello
    needs to be
    enclosed in quotes:
    <?php echo 'Hello'; ?>
    David Powers
    Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    http://foundationphp.com/

  • 've recently upgraded to FireFox v22.0. Originally, a legacy XBAP I use always opened correctly in FireFox and had no problems displaying or running. As of v22.

    I've recently upgraded to FireFox 22. Originally, a legacy XBAP I use always opened correctly in FireFox and had no problems displaying or running. As of 22, it won't even attempt to download the application, let alone try and display it.
    I have the windows Presentation Foundation 3.5.30729.1 installed, which is the same version I have been using in older versions.
    Can anyone shed some light on any changes that would have effected this?

    Hi, I have a similar problem. I did attempt the *.rdf fix on a test system, but it didn't work (em:maxVersion was already 22).
    We got about inflow of phone calls from our clients experiencing the problem mentioned above from the 2nd of July onwards... and more are phoning in.
    All the complaints come from clients (+- 10 so far and rising in number) using Firefox v22 (we have checked), and all of them have said that it was working previously.
    We downgraded one of the clients to an older version of Firefox, and it worked again. So far we are telling our clients to downgrade until a fix comes out, or use Internet Explorer (*blush*)

  • Problem Displaying data from oracle in JTable

    Please can any one help me? I have a problem displaying the data fetched from oracle database(ResultSet) in JTables. Can any one provide me with any possible way out(and any alternative).

    User,
    As suggested in the other post - Google/Books/find a mentor is the best option.

  • Can I disable the PS CS6 "On-Canvas Info Display"?

    Is it possible to disable Photoshop CS6's "On-Canvas Info Display," the "small information pop-ups [that] are displayed near the cursor when using a variety of tools"? (circled in red below).  I know it's a cool thing but it sometimes gets in the way. Any help will be appreciated. I'm running PS CS6 extended on 64 Bit Windows 7. Thanks! Jeff C.

    Yes.
    In Preferences - Interface, set the Show Transformation Values field to Never.
    -Noel

  • Problems displaying itab with 'REUSE_ALV_GRID_DISPLAY'

    Hi experts!
    I have a problem displaying the internal table itab_test. Itab_uload is a TYPE TABLE of a complex and nested structure I defined in the DDIC. I am able to pass the entries, which are not conform with the specifications, to itab_test, but when I execute the program I get a short dump.
    Error message is:" It was tried to pass the internal table IT_FIELDCAT to the formal parameter IT_FIELDCAT. In doing so, a ^type conflict occured between the formal and the actual parameter."
    Can anybody please advise on the code-sample below. What did I wrong and what can I do to correct it?
    Thanks a lot for your help!
    Johann
    P.S.:Points will be rewarded for helpful answers!
    *&          DECLARATIONS
    TYPES: BEGIN OF error_test,
           oz TYPE c,
           bez TYPE c,
           END OF error_test.
    DATA: itab_test TYPE TABLE OF error_test WITH HEADER LINE,
          itab_upload TYPE TABLE OF zstr_gaeb WITH HEADER LINE.
    DATA: wa_upload TYPE zstr_gaeb,
          wa_lvbereich TYPE zstr_lvbereich,
          wa_bereichdeslv TYPE zstr_bereichdeslv,
          wa_beschreibung TYPE zstr_lvbeschreibung,
          wa_position TYPE zstr_position.
    DATA :      it_fieldcat TYPE lvc_t_fcat,
              wa_fieldcat LIKE LINE OF it_fieldcat,
              wrk_pos TYPE i.      
    *&           START OF SELECTION
    START-OF-SELECTION.
    LOOP AT itab_upload INTO wa_upload.
        LOOP AT wa_upload-vergabe-lv-lvbereich INTO wa_lvbereich.
          oz_len = STRLEN( wa_lvbereich-oz ).
          IF oz_len <> 3.
            MOVE wa_lvbereich-oz TO itab_test-oz.
            MOVE wa_lvbereich-bez TO itab_test-bez.
          ENDIF.
        ENDLOOP.
      ENDLOOP.
      CLEAR wa_fieldcat.
      wrk_pos = wrk_pos + 1.
      wa_fieldcat-col_pos = wrk_pos.
      wa_fieldcat-tabname = 'ITAB_TEST'.
      wa_fieldcat-fieldname = 'oz'.
      wa_fieldcat-seltext = 'Ordnungszahl'.
      wa_fieldcat-emphasize = ''.
      wa_fieldcat-hotspot = 'X'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      wrk_pos = wrk_pos + 1.
      wa_fieldcat-col_pos = wrk_pos.
      wa_fieldcat-tabname = 'ITAB_TEST'.
      wa_fieldcat-fieldname = 'bez'.
      wa_fieldcat-seltext = 'Bezeichnung'.
      wa_fieldcat-emphasize = ''.
      wa_fieldcat-hotspot = ''.
      APPEND wa_fieldcat TO it_fieldcat.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
      I_CALLBACK_PROGRAM                = ' '
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
         it_fieldcat                       = it_fieldcat
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          t_outtab                          = itab_test
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.

    Hello,
    Make the change like this
      DATA: L_R_REPID LIKE SY-REPID.
      L_R_REPID = SY-REPID.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = L_R_REPID " CHeck here
    * I_INTERFACE_CHECK = ' '
    * I_BYPASSING_BUFFER = ' '
    * I_BUFFER_ACTIVE = ' '
    * I_CALLBACK_PROGRAM = ' '
    * I_CALLBACK_PF_STATUS_SET = ' '
    * I_CALLBACK_USER_COMMAND = ' '
    * I_CALLBACK_TOP_OF_PAGE = ' '
    * I_CALLBACK_HTML_TOP_OF_PAGE = ' '
    * I_CALLBACK_HTML_END_OF_LIST = ' '
    * I_STRUCTURE_NAME =
    * I_BACKGROUND_ID = ' '
    * I_GRID_TITLE =
    * I_GRID_SETTINGS =
    * IS_LAYOUT =
    it_fieldcat = it_fieldcat
    * IT_EXCLUDING =
    * IT_SPECIAL_GROUPS =
    * IT_SORT =
    * IT_FILTER =
    * IS_SEL_HIDE =
    * I_DEFAULT = 'X'
    * I_SAVE = ' '
    * IS_VARIANT =
    * IT_EVENTS =
    * IT_EVENT_EXIT =
    * IS_PRINT =
    * IS_REPREP_ID =
    * I_SCREEN_START_COLUMN = 0
    * I_SCREEN_START_LINE = 0
    * I_SCREEN_END_COLUMN = 0
    * I_SCREEN_END_LINE = 0
    * I_HTML_HEIGHT_TOP = 0
    * I_HTML_HEIGHT_END = 0
    * IT_ALV_GRAPHICS =
    * IT_HYPERLINK =
    * IT_ADD_FIELDCAT =
    * IT_EXCEPT_QINFO =
    * IR_SALV_FULLSCREEN_ADAPTER =
    * IMPORTING
    * E_EXIT_CAUSED_BY_CALLER =
    * ES_EXIT_CAUSED_BY_USER =
    TABLES
    t_outtab = itab_test
    * EXCEPTIONS
    * PROGRAM_ERROR = 1
    * OTHERS = 2
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    VAsanth

  • Problem displaying Word 2002 RTF files in JEditorPane

    Hi all,
    I am having a problem displaying RTF files created in Word 2002/Office XP in a JEditorPane.
    Our code, which does the usual stuff:
    JEditorPane uiViewNarrativeEda = new JEditorPane();
    uiViewNarrativeEda.setContentType(new RTFEditorKit().getContentType());
    FileInputStream inDocument = new FileInputStream("c:/temp/testing.rtf"); uiViewNarrativeEda.read(inDocument, "");
    inDocument.close();
    works just FINE with RTF files created in Word 97, WordPad etc, but it seems that Word 2002 adds some tags to the RTF file that the RTFReader cannot handle.
    For example, I believe the following exception is due to the new \stylesheet section that Word 2002 adds to the RTF file:
    java.lang.NullPointerException:
         at javax.swing.text.rtf.RTFReader$StylesheetDestination$StyleDefiningDestination.close(RTFReader.java:924)
         at javax.swing.text.rtf.RTFReader.setRTFDestination(RTFReader.java:254)
         at javax.swing.text.rtf.RTFReader.handleKeyword(RTFReader.java:484)
         at javax.swing.text.rtf.RTFParser.write(RTFParser.java, Compiled Code)
         at javax.swing.text.rtf.AbstractFilter.readFromReader(AbstractFilter.java:111)
         at javax.swing.text.rtf.RTFEditorKit.read(RTFEditorKit.java:129)
         at javax.swing.text.JTextComponent.read(JTextComponent.java:1326)
         at javax.swing.JEditorPane.read(JEditorPane.java:387)
    Does anyone have similar problems or knows how I could get around this?
    I thought about writing a parser that replaces the \stylesheet section with one that works but that seems a lot of work and it does not always work (I tried that by copying and pasting...).
    Maybe I could replace the RTF converter that Word 2002 is using with another one - but how?

    Hello again,
    I found out that the 2002 version of MS Word writes a lot more of data into the file than e.g. Wordpad does.
    There is one section that causes the problem, its called "\stylesheet".
    My workaround (working in my case) is to wrap the input stream of the RTF document and remove this section (only in memory).
    See example implementation:
    <<<<<<<<<<<<<<<<<<<<<<< SOURCE CODE<<<<<<<<<<<<<
    * Copyright 2004 DaimlerChrysler TSS.
    * All Rights Reserved.
    * Last Change $Author: wiedenmann $
    * At $Date: 2004/03/31 11:08:54CEST $.
    package com.dcx.tss.swing;
    import java.io.*;
    * This class provides a workaround for parse errors in the
    * {@link javax.swing.text.rtf.RTFEditorKit}. These errors are caused
    * by new format specification for RichTextFormat (RTF V1.7).<br>
    * <br>
    * The workaround is to filter out a section of the RFT document
    * which causes an exception during parsing it. This section has no
    * impact on the display of the document, it just contains some
    * meta information used by MS Word 2002.<br>
    * The whole document will be loaded into memory and then the section
    * will be deleted in memory, there is no affect to the document
    * directly (on file system).<br>
    * <br>
    * <i>This workaround is provided without any warranty of completely solving
    * the problem.</i>
    * @version $Revision: 1.1 $
    * @author Wiedenmann
    public class RtfInputStream extends FilterReader {
    /** Search string for start of the section. */
    private static final String SEC_START = "{\\stylesheet";
    /** Search string for end of the section. */
    private static final String SEC_END = "}}";
    /** Locale store for the document data. */
    private final StringBuffer strBuf = new StringBuffer();
    * Wrapper for the input stream used by the RTF parser.<br>
    * Here the complete document will be loaded into a string buffer
    * and the section causes the problems will be deleted.<br>
    * <br>
    * @param in Stream reader for the document (e.g. {@link FileReader}).
    * @throws IOException in case of I/O errors during document loading.
    public RtfInputStream( final Reader in ) throws IOException {
    super( in );
    int numchars;
    final char[] tmpbuf = new char[2048];
    // read the whole document into StringBuffer
    do {
    numchars = in.read( tmpbuf, 0, tmpbuf.length );
    if ( numchars != -1 ) {
    strBuf.append( tmpbuf, 0, numchars );
    } while ( numchars != -1 );
    // finally delete the problem making section
    deleteStylesheet();
    * Deletion of the prblematic section.
    private void deleteStylesheet() {
    // find start of the section
    final int start = strBuf.indexOf( SEC_START );
    if ( start == -1 ) {
    // section not contained, so just return ...
    return;
    // find end of section
    final int end = strBuf.indexOf( SEC_END, start );
    // delete section
    strBuf.delete( start, end + 2 );
    * Read characters into a portion of an array.<br>
    * The data given back will be provided from local StringBuffer
    * which contains the whole document.
    * @param buf Destination buffer.
    * @param off Offset at which to start storing characters -
    * <srong>NOT RECOGNIZED HERE.</strong>.
    * @param len Maximum number of characters to read.
    * @return The number of characters read, or -1 if the end of the
    * stream has been reached
    * @exception IOException If an I/O error occurs
    public int read( final char[] buf, final int off, final int len ) throws IOException {
    if ( strBuf.length() == 0 ) {
    // if buffer is empty end of document is reached
    return -1;
    // fill destination array
    int byteCount = 0;
    for (; byteCount < len; byteCount++) {
    if ( byteCount == strBuf.length() ) {
    // end reached, stop filling
    break;
    // copy data to destination array
    buf[byteCount] = strBuf.charAt( byteCount );
    // delete to copied data from local store
    strBuf.delete( 0, byteCount + 1 );
    return byteCount;
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Integration of the warpper looks like:
    RtfInputStream inDocument = new RtfInputStream( new FileReader("test.rtf"));
    Document doc = rtf.createDefaultDocument();
    rtf.read(inDocument, doc, 0 );
    Hope this helps - for me it did :-)
    Timo Wiedenmann
    DaimlerChrysler TSS, Germany

Maybe you are looking for

  • How to print one (or more) page only from multipages report?

    Citations from Report Builder Help: To print a report from the Runtime Previewer: 1. In the Runtime Previewer, click <Page Setup> in the toolbar to verify your printer setup. 2. Click <Print> in the toolbar. 3. In the dialog box, type the number of p

  • Just today, I cannot open a new tab - by clicking on the new tab button, or pressing CTRL+T. Help!

    I always use this feature and love it! I've gone thru the trouble-shooting guide, checked my plug-ins, cleared my cache and cookies, restarted my computer - and still no new tabs! The only way I can get a new tab is to click on HELP, FIREFOX HELP, an

  • Nwapi-Payload missing

    Hi Guys, I have configured nwapi. When i monitor the messages on the integration engine, i dont see the payload for the asynchronus messages. we are on PI 7.1 EHP1 SP3 anybody having the same problem? any help would be appreciated. Thanks, Reddy

  • Nokia

    First of all, i want to say i like nokia phone i am using lumia925 no doubt in window phone have less apps ,games,features compare to android phones but nokia phone have good camera,quality inner features i suggest from nokia there should be exchange

  • CR2008 SP3 Full Build - Another version already installed?

    I'm switching to a brand new workstation so I'm trying to install CR 2008 SP3 Full Build. I've already installed the base software from our original license purchase (which is 10.0.0.683).  I downloaded SP3 full build so I can update that fresh insta