Solution to JTable SessionStorage warning while program is running

I have a Netbeans developed Desktop Application showing the following warning:
WARNING: No saved state for javax.swing.JTable ...There is a now locked forum thread on this topic: [http://forums.sun.com/thread.jspa?threadID=5265745]
I think this happens if you are using a JTable with no resizable columns. This is what I found digging in the org.jdesktop.application.SessionStorage source code:
When the SessionStorage.save() method is called to save the application state ( the class org.jdesktop.application.SingleFrameApplication calls it during application shutdown),
for each JTable object in the application, the org.jdesktop.application.SessionStorage.TableProperty.getSessionState() method is called to get a org.jdesktop.application.SessionStorage.TableState
object that is supposed to contain the target JTable state information to be saved.
Unfortunately if the target JTable has no resizable columns the getSessionState() method returns null (this is IMHO a bug !) and this produces an inconsistent saved state that when the application is restarted, causes a null to be retrieved as the JTable state to restore, giving the warning message.
The solution is simple: each JTable object with no resizable columns must have no name, i.e.:
myTable.setName(null)If a component has a null name the save state method ignores it and the warning disappears.
Surprisingly enough, this solution is exactly the opposite of the solution proposed in the previous thread.

the table.setName(null) worked for me but my tables also have table.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
I still don't know what's going on but I appreciate the tip. The warnings are now gone.
Joe

Similar Messages

  • SessionStorage warning while program is running

    Hi,
    I have a desktop application that I developed in NetBeans. Everything compiles and runs, but whenever I open a specific window, I get the following warning:
    Feb 18, 2008 2:47:12 PM org.jdesktop.application.SessionStorage restoreTree
    +WARNING: No saved state for javax.swing.JTabbedPane[prefsTabs,10,11,408x228,layout=javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=201326944,maximumSize=,minimumSize=,preferredSize=,haveRegistered=false,tabPlacement=TOP]+
    The application has several windows, and only one gives such a warning. The entire GUI layout was done with the NetBeans Swing GUI builder. I have looked around online, and I have not been able to find any documentation that will help with this problem. Does anyone have any ideas as to what could be causing this, and/or how it can be remedied?
    Thanks,
    Peter

    I get the same Warning when i open a window that contains a JTable. No idea what I should do to make it go away.
    Apr 11, 2008 6:24:33 PM org.jdesktop.application.SessionStorage restoreTree
    WARNING: No saved state for javax.swing.JTable[jTable,0,0,461x1200,alignmentX=0.0,alignmentY=0.0,border=,flags=251658568,maximumSize=,minimumSize=,preferredSize=,autoCreateColumnsFromModel=true,autoResizeMode=AUTO_RESIZE_SUBSEQUENT_COLUMNS,cellSelectionEnabled=false,editingColumn=-1,editingRow=-1,gridColor=javax.swing.plaf.ColorUIResource[r=128,g=128,b=128],preferredViewportSize=java.awt.Dimension[width=450,height=400],rowHeight=16,rowMargin=1,rowSelectionAllowed=true,selectionBackground=javax.swing.plaf.ColorUIResource[r=51,g=153,b=255],selectionForeground=javax.swing.plaf.ColorUIResource[r=255,g=255,b=255],showHorizontalLines=true,showVerticalLines=true]

  • How can I read the EXCEL file while Program is running in background.

    Hi all Expert,
    How can I read the EXCEL file while Program is running in background.
    Thanks

    you need to place ur excel file on application server and follow this thread: Reading an Excel file from the application server?
    loots of information if you can search forum.. thanks

  • How to open log file while program is running?

    Hi,
    I am using log4j to generate a log file. The application connects to a remote server and does some updates on a database. Is it possible to view the log file while the program is running? When I click on the log file to open it, I get a message "the document is in use by another application and cannot be accessed".
    Looking for ideas to get around this problem.
    Thanks and Regards,
    Harsha Hegde

    tail.exe -f
    Tail is a Unix program but if you search google you can find a port for Windows. It will show the contents of the file in a cmd prompt and will update as new lines are being added to the file so you can see the most up-to-date version as log4j is writing to it.

  • Open .lvm file while program is running

    How do I open a .lvm file within my program? I've tried using the Open/Create/Replace File dialog with File Dialog specifying the path and I can get to the point to select the path, and it doesn't open the file.
    Solved!
    Go to Solution.

    Can you please post your code so we can see what you are doing.
    Cory K

  • ML Sleeps While Programs are Running

    Twice now, my iMac running Mountain Lion has fallen asleep while a program is actively running.  (Ex. Encoding a movie in Handbrake and burning a BD disc with Toast.)  Does anyone know why this is happening?  I have never had issues with my Mac sleeping during such processes before. I actually count on this because I very often walk away as these longer processin tasks run and/or start them when I toddle off to bed.  I hope this is something I can resolve and not a bug.

    According to Ars Technica:
    "In Mountain Lion, OS X no longer pays attention to disk activity when deciding if it's OK to put the system to sleep. Instead, Apple recommends that applications make what Apple calls "power assertions" as a way to tell the OS when they're doing some useful work that the system should stay awake for. This policy allows the OS to put the system to sleep the moment there are no applications still holding power assertions to prevent the action."
    Apparently the "caffeinate" terminal command can be used in conjunction with specific processs to keep your machine awake until the process completes but it also seems that apps will have to be updated to comply with this new power management protocol. I've noticed the problem with Retrospect 9, HandBrake and RipIt so far...
    I have not figured out the terminal commands for using caffeinate with these apps—if anyone has some pointers I would be grateful.
    Thx

  • Update Audio Devices while program is running

    Hi
    I want to connect an audio device while a labview VI is running. When I do so, the audio device doesn't appear in the audio device list. Is there any activeX node or other possibility to refresh the audio devices in labview while a VI is running?
    I'm using Windows XP and LabVIEW 2010, but I think an upgrade to 2011 wouldn't solve my problem.
    Solved!
    Go to Solution.

    Hi Kolja,
    just talked to a colleague about the issue and we solved it now. The solution are VI references and reference calls.
    Take a look in the example in the attachment. Using this piece of code the "Get Num Devices" function (as an example for every other function you wish to use) is reloaded everytime it is called, resulting in updated device counts at runtime.
    Good luck using it and best regards,
    Benjamin
    Attachments:
    Audio Dynamic LV2010.zip ‏10 KB

  • Warning while trying to run an agent obiee 11g

    Hello all,
    I have an analysis and i have applied an agent on that analysis so that i receive an email with the report attached.
    I have configured the mail settings in the em tool and i have  run it successfully in the past with other agents/analyses.
    Currently when i'm running the agent, the operation ends with the following message:
    "The Agent, agent-test MP, has completed with warnings."
    I'm trying to see through the logs in "C:\oracle\middleware\instances\instance1\diagnostics\logs\OracleBISchedulerComponent\coreapplication_obisch1\nqscheduler.log"
    what went wrong but i see nothing helpful there.
    Note that the obiee version is 11.1.1.6
    Does anybody have an idea how i can look further into this problem? Maybe there are logs available in another folder etc.
    Thanks in advance,
    Konstantina

    Hello Konstantina,
    Login to BIP
    Open---Report Jobs History ----Status
    Double Click Status you can get the error/warning message .
    Paste  the warning message here.
    Thanks,
    Sasi Nagireddy..

  • Creating labels while program is running

    hey guys,
    im working on a program that will shoot jlabels as bullets, but am having trouble creating the jlabels in program...
    heres my code
    private javax.swing.JLabel[] shot = new javax.swing.JLabel[10000];
    public void fire()
         if(direction==0)
         shot[shots] = new javax.swing.JLabel();
         shot[shots].setLocation(100,100);
         shot[shots].setText("TESTING");
         shot[shots].setVisible(true);
    its weird, the label is created because i tested by doing...
    otherlabel.setLocation(shot[shots].getX(),shot[shots].getY());
    and the otherlabel will move to a location
    any ideas?

    Did you read the link to the add() documentation?
    If you intend to add it to the frame you would say:
    shot[shots] = new javax.swing.JLabel("TESTING");
    shot[shots].setLocation(100,100);
        // not needed
    //shot[shots].setText("TESTING");
    //shot[shots].setVisible(true);
    shooterForm.add(shot[shots])Note that since you are setting the position of the label the frame (or rather its content pane) should have a null layout.

  • Change control while statemechi​ne running

    Hi
    In my simple carwash program i need some solution.
    when we press deluxe button program should run all the 5 steps.
    for economy program should run 2,3,4 steps.
    while running in steps if Out Position switch is on, program should check the timeout condition.
    when timeout condition satisfied program should exit.
    here some functions working fine.
    we have problem is that while executing the steps i need to change the position of the Out position switch.
    it doesnt work till all the steps to complete.
    how to solve any solution please.
    Regards,
    hari
    Attachments:
    carwash.vi ‏125 KB

    Hi Hari,
    The reason the switch is changing only after the loop is finished is because you've inserted a while loop inside the event structure.
    If you've already done embebbed programming, the event structure is like an interruption, you are not supposed to make big actions as loops inside the structure.
    What you have to do is to take the statemachine outside the event structure. In fact, you don't even need two state machines, you can make only one and do the steps depending on the option you've selected (try to add a "WaitBegin" or something state in your machine and, depending on wich button is pressed, you start in bool1 or bool2 state. In bool4, you check based in which option you've selected if you want to go to step 5 or go back to Waitbegin state - Select function in comparison pallete will be useful for this).

  • The program closes without warning, while I am working in the program

    I just purchased the Acrobat DC software...
    The program closes without warning, while I am working in the program

    Hi Karen ,
    Could you please elaborate about the issue so that we get know important information about the issue and assist you accordingly ?
    How and when does the program closes?Is it during the launch of Acrobat or while working on any of the PDF'?
    What OS do you work on ?
    If there any error message associated along with it ,please share the screen shot of the same .
    If you are on windows ,please try repairing the software once and see if that fixes the issue .
    For repairing of Acrobat ,launch Acrobat>Navigate to help>Repair Installation
    If that does not work ,you could uninstall Acrobat and then try to re install and see how it goes .
    Make sure to disable all the third party software before the installation commence .
    Regards
    Sukrit Dhingra

  • Warning while opening a report

    Hi I am getting a warning while i try to execute a report.
    The warning says "warning following error for partial InfoCube = 0PCA_C01 in RSDRC_CUBE_DATA_GET_RF, Error SQL Error:1578"
    Can any one tell me what the issue is and the possible solution ?
    Regards
    Arjun

    Hi,
    If it is just a warning and if you are able to execute the report successfully, you can ignore this warning.
    Regards,
    Yogesh.

  • Things to keep in mind while programming to avoid heap and permgen errors?

    I some time get Java heap error and permgen error in my project which is having large code base i.e 2500 java lasses.
    I know about two jvm parameter which we can set to deal with for java heap we can -Xms 1024 -Xmx 1024 and for permgen we can set -Xmx:permgen 256m.
    That also sometime does not solve the problem. I am looking forward if we can do something proactively while programming the application so that we can descrease the probablity of facing such issues. here is my understanding
    Permgen error can occur either at serverstart up or at application run time. I can think two main reason for this:
    1) More the classes will be loaded more spaces will be eaten in permgen area.
    2) Too many reference of static variable in application (as they gets also stored in permgen area). Agreed it wont make much difference. Probably millions of variable can make difference.
    3)Too many string literals used in application.
    So while programming we can take care of points 2 and 3 if we can avoid them. Looking for some other solutions also which we can keep in mind while programming to avoid these situations(For both permgen and java heap out of memory issue). Could not come up if we can follow any proactive approach for not facing java heap out of memory issue?

    JavaFunda wrote:
    As per understanding app server should unload the classes as soon as we stop the server.Well, if you stop the server then it'll definitely unload the classes. Or unloading might not be an accurate term.
    Basically what we do is undeploy and deploy.That's not stopping the server. Unfortunately most of the app servers do require restarts, since they can't get rid of all the crud.
    Is your program doing significant dynamic class loading?Not sure how can i get information about thisRead up a bit on dynamic class loading and see if it looks like something your program is doing a lot (probably not).

  • ParticleFilter4 parameter error while program running

        I use CVI and VDM8.6, I had installed the VDM8.6 patch package, and there is no error while  program compile, but when run the program, there is error occured, the error message is as attached image showed;
        also I had another question: should I place ParticleFilter() before ParticleCount() or after ParticleCount?
    Thanks in advance,
    Solved!
    Go to Solution.
    Attachments:
    Particlefilter_runerror.JPG ‏63 KB

    Dear Guenter,
        Problem solved, Thank you very much!
        I made mistake on  the input  pointe parameter, when the pointer is used as output parameter then it no need to assign memory.
    Sam Liu

  • Error occurred in deployment step 'Add Solution': A timeout has occurred while invoking commands in SharePoint host process.

    Hi,
    I am deplyoing a  solution which has  custom web parts- vwp- appln pages, event receivers.
    It was working fine till last week. I was able to deploy the solution and able to see the web parts and func. was working.
    But now from the last 2 days onwards, when I tried to depoy this soution, I am getting the error
    "Error occurred in deployment step 'Add Solution': A timeout has occurred while invoking commands in SharePoint host process "
    may i know why am getting this error.
    note: my dev machine- Win Srvr 2012 - VS 2012- SP 2013 - SP D 2013 was having soem issues  with the space in C drive.
    once i have done the  index reset few months back and i started getting space in C:\ Drive is 0 bytes.
    so what my infra. team  has done is , increased the space in drive to 150 GB[ it was a  VM ].
    help is appreciated !

    What is current disk space on your drives
    Delete ULS logs and other log files from server id not needed
    could be related to ChannelOperationTimeout
    http://msdn.microsoft.com/en-us/library/ee471440(v=vs.100).aspx
    Also, don't forget to restart Visual Studio
    Goto the following regustry key: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\SharePointTools
    Add the following as a DWORD (wont be there by default)
    ChannelOperationTimeout
    REG_DWORD that specifies the time, in seconds, that Visual Studio waits for a SharePoint command to execute. If the command does not execute in time, a SharePointConnectionException is thrown.
    The default is 120 seconds.
    http://social.technet.microsoft.com/wiki/contents/articles/21052.como-resolver-o-erro-error-occurred-in-deployment-step-activate-features-a-timeout-has-occurred-while-invoking-commands-in-sharepoint-host-process-pt-br.aspx
    If this helped you resolve your issue, please mark it Answered

Maybe you are looking for

  • Function modules for selection ID of Demand planning

    Hello All, I need a function module which can return product / location combinations associated with a selection ID. OR, a function module which can return me 1) Planning book 2) data view and 3) Version associated with a selection ID. For the second

  • Isight

    Hi there. could anybody please tell me if the latest release for isight is 1.0.3 update, I have just purchased a new isight camera will this have the latest update in it. Denis

  • Please help ME..im not able to Access "F1 Keyword help"

    Hi all, This is my 1st question im posting in SAP community..I hope u wont dissappoint me.. The issue is, I had downloaded the "F1 help in HTML format" to the local system using the Standard Function Module Program "ABAP_DOCU_DOWNLOAD". I executed th

  • Agent Team Statistics summary display - CUIC

    Hi, We are using ICM8.x and trying to get the data that will display in Cisco Supervisor Desktop as Agent Team Statistics summary display and display them as a report in CUIC tool. Can some give me an idea of how to achieve that in report Definition.

  • RFC- Remote Logon

    Hi, I am trying to create an RFC destination to XI in SAP 4.7 I entered the host correctly and other logon details.But when I press Remote Logon system is not executing the RFC Destination.Can any one put some ideas why the system is not executing th