Hardcore exception stacktrace related to long message in JDialog

Hi,
Here's the code for my showDialog method:
    void showDialog(String title, String messageContent) {
        String output = "<font face=\"Arial, sans-serif, Helvetica, Geneva\">" + messageContent;
        //output = output.substring(0, 254); Works with 254. 255+ creates the problem.
        //System.out.print(output); outputs correctly, even with very very long strings
        JPanel panel = new JPanel(new BorderLayout());
        JTextPane message = new JTextPane();
        message.setEditable(false);
        message.setContentType("text/html");
        message.setBackground(lightGray);
        message.setHighlighter(null);
        message.setPreferredSize(new Dimension(250, 150));
        message.setText(output);
        //System.out.println(message + "\n--------\n"); //not null
        panel.add(message, BorderLayout.CENTER);
        JDialog dialog = new JDialog(frame, title);
        //System.out.println(dialog + "\n--------\n"); //not null
        dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
        dialog.setSize(250, 200);
        dialog.setLocationRelativeTo(frame);
        dialog.setContentPane(panel);
        dialog.show();
    }It works as expected for relatively short Strings (messageContent). Once I try to display my dialogs with more content in it (Strings of length 255+), shit hits the fan:
java.lang.NullPointerException
        at javax.swing.text.GlyphView.paint(GlyphView.java:367)
        at javax.swing.text.BoxView.paintChild(BoxView.java:144)
        at javax.swing.text.BoxView.paint(BoxView.java:407)
        at javax.swing.text.BoxView.paintChild(BoxView.java:144)
        at javax.swing.text.BoxView.paint(BoxView.java:407)
        at javax.swing.text.ParagraphView.paint(ParagraphView.java:569)
        at javax.swing.text.html.ParagraphView.paint(ParagraphView.java:220)
        at javax.swing.text.BoxView.paintChild(BoxView.java:144)
        at javax.swing.text.BoxView.paint(BoxView.java:407)
        at javax.swing.text.html.BlockView.paint(BlockView.java:264)
        at javax.swing.text.BoxView.paintChild(BoxView.java:144)
        at javax.swing.text.BoxView.paint(BoxView.java:407)
        at javax.swing.text.html.BlockView.paint(BlockView.java:264)
        at javax.swing.plaf.basic.BasicTextUI$RootView.paint(BasicTextUI.java:1319)
        at javax.swing.plaf.basic.BasicTextUI.paintSafely(BasicTextUI.java:636)
        at javax.swing.plaf.basic.BasicTextUI.paint(BasicTextUI.java:770)
        at javax.swing.plaf.basic.BasicTextUI.update(BasicTextUI.java:749)
        at javax.swing.JComponent.paintComponent(JComponent.java:541)
        at javax.swing.JComponent.paint(JComponent.java:808)
        at javax.swing.JComponent.paintChildren(JComponent.java:647)
        at javax.swing.JComponent.paint(JComponent.java:817)
        at javax.swing.JComponent.paintChildren(JComponent.java:647)
        at javax.swing.JComponent.paint(JComponent.java:817)
        at javax.swing.JLayeredPane.paint(JLayeredPane.java:557)
        at javax.swing.JComponent.paintChildren(JComponent.java:647)
        at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4794)
        at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4740)
        at javax.swing.JComponent.paint(JComponent.java:798)
        at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
        at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
        at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
        at java.awt.Container.paint(Container.java:1312)
        at sun.awt.RepaintArea.paint(RepaintArea.java:177)
        at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:260)
        at java.awt.Component.dispatchEventImpl(Component.java:3678)
        at java.awt.Container.dispatchEventImpl(Container.java:1627)
        at java.awt.Window.dispatchEventImpl(Window.java:1606)
        at java.awt.Component.dispatchEvent(Component.java:3477)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)This error message isn't really helping me. :(
Might any of you gurus have a clue what the problem is, and what I can do about it?

Hi, the message is not with 255 characters limit I think. Is there a function called paint overridded in your class? Textpane takes around 65556 chars.

Similar Messages

  • Error: 28005, Severity: 16, State: 2...An exception occurred while enqueueing a message in the target queue. Error: 15517, State: 1. Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be impe

    I've seen some similar questions, but want to make sure I can get an answer quickly and how to fix.
    Thanks,
    Paul
    spid24s     Error: 28005, Severity: 16, State: 2
    spid24s     An exception occurred while enqueueing a message in the target queue. Error: 15517, State: 1. Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be impersonated,
    or you do not have permission.

    Hi Paul,
    I also had the same error on one of my servers, and it was because the user that created the database no longer worked for the company.
    So when his AD account got deleted, the database had NULL as owner
    Using the following query I asked for the owners of the databases:
    select name, suser_sname(sid) from master.dbo.sysdatabases
    So changing the owner of the databases that had a NULL owner solved the issue for me.
    use <databasesname>
    go
    exec sp_changedbowner 'sa'
    Thanks for triggering the solution.
    Peter

  • FCC error :java.lang.Exception: Column value '   ' too long

    Hi all,
    I am using FCC on receiving File adapter...
    While executing i am getting this error in CC monitor
    com.sap.aii.af.ra.ms.api.RecoverableException: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Column value '   ' too long (>1 for 2. column) - must stop',
    i searched in SDN but no luck till now..
    Plz help me out..
    Thanx in advance.

    Hi,
    Check ur FCC parameters,
    File content conversion sites
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    /people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
    /people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
    Regards,
    Phani.
    Reward points if Helpful

  • My drive crashed. Re-installed CS5. Works fine except that can no longer go from Bridge by clicking

    My drive crashed. Re-installed CS5. Works fine except that can no longer go from Bridge by clicking on small photo there. I found the place to change but CS5 is not an option. Tried to change prefernce in Windows 8 but not there either.

    Thanks.  Before my re-installation if I was in Bridge and found a photo I wanted to edit in CS5 I would just double click it and it would be brought in.  Now when I do this I am brought into a microsoft viewer. To edit a picture I found in Bridge I have to write down its name and directory, open up CS5 (if it is not) and navigate to the photo.  I found the place in Photshop and Bridge where you are supposed to be able to change the default program invoked when you double click on a photo in Bridge but there is no choice given other than the Microsoft viewer.  Any help you can give would be greatly appreciated.  At some point some web site I was reading suggested the problem being related to CS5 failing to make some change in the registry when it installed? This, or its solution is beyond my ken... Thanks, RobStl

  • Long Message

    Hi Guys/Dolls
    I'm tyring to display a long message with the following code but not sure how to do it as it's truncating the last bit that I have added.
    Can anybody assist?
    Many thanks in advance.
    Raj
    Currently
      MESSAGE i016(54) WITH
       'WARNING! ONLY RUN AFTER PENSION YEAR END PAYROLLS!'.
    Want
      MESSAGE i016(54) WITH
       'WARNING! ONLY RUN AFTER PENSION YEAR END PAYROLLS! - AUGUST PAYROLL
    PROCESSED'.

    Hi Raj,
    Instead of giving direct message call this FM.
    *AQ_INT_SHOW_MESSAGE_AS_POPUP *    
    Because we can't create a message having length more than 73 chars. So create ur message with text
    'WARNING! ONLY RUN AFTER PENSION YEAR END PAYROLLS!'.
    and create a text element with text
    - AUGUST PAYROLL PROCESSED and pass message number and text elements as shown in below example.
    eg:
    CALL FUNCTION 'AQ_INT_SHOW_MESSAGE_AS_POPUP'
      EXPORTING
    *   POPUP_POS_X                  = 5
    *   POPUP_POS_Y                  = 5
        message_class                = 'ZV'
        message_number               = '820'
        message_type                 = 'I'
       MESSAGE_VAR1                 = text-t01
    *   MESSAGE_VAR2                 =
    *   MESSAGE_VAR3                 =
    *   MESSAGE_VAR4                 =
    EXCEPTIONS
       INTERNAL_ERROR               = 1
       MESSAGE_DOES_NOT_EXIST       = 2
       OTHERS                       = 3
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Only MESSAGE_VAR1 will be enough in ur case.
    Thanks,
    Vinod.
    Edited by: Vinod Kumar Vemuru on May 22, 2008 4:10 PM

  • Sender Mail Adapter Error: exception caught during processing mail message;

    HI , I am configuring mail to file scenario. Need to read mail content (no need to capture From,TO or Subject details) and create a file with the content in the mail.
    Need to read mails from microsoft outlook. Exchange server has been configured for POP3 protocol.
    Following are the details provoding in sender mail adapter:
    URL: provided url in the format: pop://<server name>
    Authentication method: plain
    provided user credinetions to access mails.
    poll interval - 1min
    content encoding none.
    processing parameters : quality of service-exactly once
    Since there is no need to capture From,TO or Subject details, didn't select the option - use mail package.
    Verified for unread mails in the mail box and made sure that there are few unread mails.
    Also, created data types and other components in IR and completed mapping.
    But after starting sender mail communication channel, getting error "exception caught during processing mail message; java.lang.NullPointerException" in RWB-adapter-communication channel monitoring.
    please let me know what needs to be done to resolve this error.
    Thanks.

    HI Stefan, i tried, but still it is giving same error. Yes, i am able to access outlook mail with the user credentials given in the communication channel to access exchange server.
    I am using message protocol: xipayload . Also since i dont have to capture TO,from,subject details., created data type just with one element of type string, not in the standard format .Does this makes any difference.

  • I am unable to open Calendar on my iMac - this occurred after installing Security Update 2015-002.  I don't know if related.  A message pops up after several minutes saying Calendar quit unexpectedly (but it never really opens). How do get Calendar b

    I am unable to open Calendar on my iMac - this occurred after installing Security Update 2015-002.  I don't know if related.  A message pops up after several minutes saying Calendar quit unexpectedly (but it never really opens). How do get Calendar back?

    Hi Magsrobby,
    Welcome to the forum and thanks for posting. I'm really sorry to hear you've had so many problems. I can look into this for you if you wish. Drop me an email with the details. You'll find the "contact us" form in the about me section of my profile. Once I have the details we'll take it from there.
    Cheers
    David
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • Error while entering Long message in Email Template

    Hi All,
    While Creating Email template with 28 kb data as Long message field in OIM 11g R2 Im getting error like "Invalid size of inputs in en_US in Locale  " so unable to save and please provide the solution Is there any changes in property or something?
    Thanks
    Kowsalya

    Yes that is right what is mentioned above, first you give the company code and name then give the currency then select address (Shift+F5) and in that if you select country as IN then it will automatically come to master data.
    Edited by: venkata986 on Aug 31, 2010 12:31 PM

  • Exception caught during processing mail message

    I am getting the following error in CC monitoring for my sender mail adpater:
    exception caught during processing mail message; java.io.IOException: invalid IMAP status response; not finding * STATUS, but 001I NO The requested item could not be found.
    Please tell me how to resolve ?

    NOw when i changed the protocol from IMap to POP3 the error is
    exception caught during processing mail message[18]; com.sap.aii.af.mp.processor.ModuleProcessorException: Error during processing local bean: localejbs/AF_modules/MessageTransformBean caused by: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Path to object does not exist at AF_modules, the whole lookup name is localejbs/AF_modules/MessageTransformBean.

  • Error in Project Coding Mask "Edit screen is "1" too long" Message no. CJ62

    Hi Friend's
    In sandbox already i have Define Special Characters for Projects is as "2"  (Length of key for coding)
    Now when i go for defining Project Coding Mask by making following new entry in the spro
    example "PR     .0000000000.00.00.00.00     Dairy Process Project
    after entering above details system gives following error
    Edit screen is "1" too long
    Message no. CJ627
    How i can resolve this issue.
    Thanks & Regards,
    Sandeep

    Your coding mask is exceeding the limit of 24 characters(including special characters). Reduce some characters to make it 24 or less then 24.
    Edited by: Kuldeep Bidalia on Sep 9, 2010 4:42 PM
    Edited by: Kuldeep Bidalia on Sep 9, 2010 4:43 PM

  • Long messages problem

    Hi all,
    When I send a short message (2 to 4 lines) on my iPhone 4S and I press the stand-by button while the message is still being sent, I hear the 'woosh' sound a few seconds later. So no problems for that. But when I send a longer message (10 lines or more) and I do the same (pressing the stand-by button while sending) I don't get to hear the 'woosh' sound, even when I wait a few minutes. I only get to hear the 'woosh' sound if I reactivate my phone by pressing on the home button or stand-by button, and this can be a few hours after I had sent the message (for example when I'm at my work or so). So my question is: is this normal and does your phone need to be activated while it's sending a message or is this not normal and what for solution do you guys propose... It's not a big deal but I'm just wondering. I have my phone now for 4 months but I haven't really been noticing it since then, just the last couple of days it appeared to me. Thanks in advance guys

    For an SMS/MMS that exceeds 160 characters which is the limit with carriers in the U.S., I would wait until you hear the sent alert sound before selecting the sleep/wake button if the message is not sent otherwise. Not sure why the message is not being sent after selecting the sleep/wake button, but it not you need to wait to ensure the message is sent before doing so.

  • Var xhr = new XMLHttpRequest(); xhr.open("POST", url,false); working in chrome but not in mozilla 5.0 i am get error "[Exception... " no message " nsresult"

    while uploading a file i am getting below error
    [Exception... "<no message>" nsresult: "0x805e0006 (<unknown>)" location: "JS frame :<TOP_LEVEL> :: line 80" data: no]
    but the same works in chrome
    here is the java script code
    var xhr = new XMLHttpRequest();
    xhr.open("POST", url,false);

    HI johibkhan.
    I think you have to update Firefox the call you are using needs 12 or higher:
    "Gecko 12.0 (Firefox 12.0 / Thunderbird 12.0 / SeaMonkey 2.9) and later support using XMLHttpRequest to read from data: URLs."
    [https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest]
    But also keep in mind we have developers dedicated to answering questions like this in the Firefox section of stackoverflow.com as well :-) You might get a faster/more accurate response.

  • Sent long message 4s now message program will not open. Tries to load but returns to the home screen after a while

    Sent long message 4s now message program will not open. Tries to load but returns to the home screen after a while. How can I open my messages?

    close all backgrounded apps, and then try,if it crashes again then do a reset all settings

  • IOS 5.1.1 messaging app broken after long message.

    So I sent my dad a long message of just "ugh..." with about 50 "h"'s. Now his messaging app is broken, and when you try to open the app it's just a blank screen. And sometimes you can't leave the app without resetting the phone. I've already tried killin gall of his apps, and doing a reboot. He is dead set on not updating to the latest ios (he's not very tech savvy, and doesn't like change). Is there a way I can fix phone with out updating to ios 7?

    if you have nothing useful to add, why bother? I'm trying to find a solution to a problem that I KNOW many, many other people are experiencing...
    I don't really care much if Apple reads this, I'm just trying to find a solution. Geez.
    If you genuinely were just looking for other users help to fix a problem, and weren't expecting Apple to read or respond you wouldn't have titleled this thread as you did.  You wouldn't have said: "I can't imagine this hasn't been noticed by Apple, but the lack of updates and some sort of status to their customers is incredibly irritating. When will this be fixed?" It is YOU who are trolling by deliberately posting inflamatory and misleading statements.
    The probolem is clearly in YOUR DEVICE.  Maybe there is a a hardware issue.  However, the other 99.999+% don't have the issue - and we're not bilind, oblivious idiots either.

  • Data Quality vendor-specific error: An error occurred when calling function 'sdq_init_connector ()' in connector ": "(-8) Exception!." Detailed error message: Exception thrown by Java: java.lang.UnsatisfiedLinkError: nio (Not found in com.ibm.oti.vm.boots

    When attempting to create a new Account in siebel integrated with OEDQ the following error occurs.
    ERROR
    Data Quality vendor-specific error: An error occurred when calling function 'sdq_init_connector ()' in connector ": "(-8) Exception!." Detailed error message: Exception thrown by Java: java.lang.UnsatisfiedLinkError: nio (Not found in com.ibm.oti.vm.bootstrap.library.path)(SBL-APS-00118)
    STEPS
    The issue can be reproduced at will with the following steps:
    1) from EDQ director we have imported the EDQ_CDS,EDQ-REFERENCE DATA & EDQ_HISTORICAl DATA packages sucessfully.
    2) Created dnd.param file in SIebel server SDQCOnnector folder.
    3) Copied the libdnd.so file to siebsrvr lib directory(32 bit)
    3) In dnd.param file we have mentioned the javalib file and instllation directory path(<Siebsrvr roo>/dnd/install)
    4) Unzipped the EDQ-Siebel Connector files in dnd/install folder
    5) Copied the dnd.properties file in dnd/install directory and modified it accordingly to point to installed EDQ instance.
    6) Configured the Siebel components for EDQ integration.
    7) Realtime EDQ jobs are running.
    8) Create a new Account
    Env details are
    On : 8.2.2.14 [IP2014] version, Client Functionality
    EDQ 11.1.1.7.4
    IBM JDK 1.7 32 bit
    Using Open UI
    Any Champ have faced this issue and overcame it please let me know the resolution steps. your help is
    Regards
    Monoj Dey
    9007554589

    Hi Monoj,
    A few questions:
    - What OS is Siebel running on?
    - What version of the Siebel connector are you using?
    - Which libdnd.so file are you using?
    - What's the contents of your dnd.parms file?
    thanks,
    Nick

Maybe you are looking for

  • Re-generate and/or re-activate

    If I add a new field to the end of a custom data base table (Z table) and there are programs that already use the Z table but will not care about the new field added to the end of the Data Base definition, do I have to re-generate and/or re-activate

  • Error Message While Installing Printer

    After having a new hard drive installed in my iMac, I tried to reinstall my Samsung ML-2510 printer.  I received the following error messages:  Error creating file: 1008:5,-5000 Access denied error You do not have enough access privileges for this in

  • InDesign Object Libraries and DPS

    Hello, I'm familiar with InDesign object libraries' capability to make easily reusable objects and elements. What I'm wondering: if I create objects and elements in a Library to be reused across various pages and across multiple articles in my portfo

  • Problem while exporting a artwork as JPG

    Hi, I have just started using Illustrator. I have drawn a logo in illustrator. I am using a page of 350px X 280px. But when I am exporting the finished logo it sized 351px X 277px . I dont understand what is the problem. But previously I have success

  • Cc desktop won't load

    Windows 7 64bit I've run out of Ideas am so sick of seeing that stupid blue wheel could puke. I have shut down my firewall, run the cc clean program numerous times , hunted down and deleted files and registry entries that cc clean logged as not being