This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Build: NetBeans IDE 6.5 RC2 (Build 200810270001) VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33 OS: Linux, 2.6.27-7-generic, i386 User comments: STACKTRACE: (first 10 lines) java.lang.IllegalArgumentException: Called DataObject.find on null at org.openide.loaders.DataObject.find(DataObject.java:477) at org.netbeans.modules.db.sql.history.SQLHistoryPersistenceManager$AtomicFileAction.run(SQLHistoryPersistenceManager.java:216) at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:120) at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:502) at org.netbeans.modules.db.sql.history.SQLHistoryPersistenceManager.retrieve(SQLHistoryPersistenceManager.java:138) at org.netbeans.modules.db.sql.history.SQLHistoryPersistenceManager.updateSQLSaved(SQLHistoryPersistenceManager.java:166) at org.netbeans.modules.db.sql.execute.ui.SQLHistoryPanel.updateSaveLimitUponReset(SQLHistoryPanel.java:425) at org.netbeans.modules.db.sql.execute.ui.SQLHistoryPanel.verifySQLLimit(SQLHistoryPanel.java:388) at org.netbeans.modules.db.sql.execute.ui.SQLHistoryPanel.sqlLimitButtonActionPerformed(SQLHistoryPanel.java:357) at org.netbeans.modules.db.sql.execute.ui.SQLHistoryPanel.access$900(SQLHistoryPanel.java:102)
I executed several SQL during the day but now, end of the day, when I was search for history, no history was found and this execption was thrown. What kind of details you need? I can't reproduce it now again, but trying.
*** Issue 152341 has been marked as a duplicate of this issue. ***
*** Issue 152343 has been marked as a duplicate of this issue. ***
From the stack trace, it looks like first you changed or deleted your userdir then tried to change the save limit value in the dialog. SQLHistoryPersistenceManager.updateSQLSaved(SQLHistoryPersistenceManager.java:166) uses the path of the history file which is located in the userdir. However, this path was null so the history file could not be found. Did you remove or change the location of the NetBeans userdir ?
NO, I didn't change my userdir. I really have no idea what cause this problem, but if I am not wrong, it was the first time I open the SQL history since I installed the RC2.
Hi, now I can reproduce it. 1-Open the RC2 and import settings from 6.1 (my 6.1 settings, in the truth is a renamed RC1 userdir) :) 2-Open the SQL history, and press Apply button. A message the history was cleaned is shown. 3-Press Apply again and you can see the exception in the IDE corner I sent my history file to John privately and hope it could help. Regards.
BTW, there is any chance to fix it for FCS?
Thank you Michel for the steps to reproduce. I have a question about the first step > 1-Open the RC2 and import settings from 6.1 (my 6.1 settings, in the truth is a renamed RC1 userdir) :) This means that RC2 is using the RC1 userdir?
Sorry, RC2 is in the process of being "hardened" for FCS. We could only check in serious showstoppers at this point (maybe not even that). Assuming we can identify the issue, we will get it into the first patch release.
If RC2 imports actual 6.1 settings then I can't reproduce. Also, I tried the following (which is really not a valid use case): 1) Install RC1 2) Start RC1, import 6.1 settings 3) Execute a bunch of SQL statements 4) Install RC2 5) Copy RC1 userdir from 6.5rc1 to 6.5rc2 6) Start RC2 7) Open SQL History Result - many statements are missing Michel, is this the same thing you did? If so, then this doesn't look like a bug to me since the userdir is copied from an earlier build not through the import facility. As a result, other features may not work as expected either.
correction: Even for the invalid use case previously mentioned, there weren't any missing statements.
No, I did: 1) Install RC1 2) Start RC1, import 6.1 settings 3) Execute a bunch of SQL statements 4) Copy .netbeans/rc1 to .netbeans/6.1 4) Install RC2 6) Start RC2, import "6.1" settings 7) Open SQL History 8) Click Apply and a message that history was cleaned up is shown 9) Click Apply again and the exception is thrown. It was I did. I understand this could be a patch, since just some users will import settings like that and 6.1 don't have SQL history. I used this approach during all the NetCAT program, to don't lose so much time reconfiguring the IDE time after time, and this is the first time I had this kind of problem. Just to be clear, all the settings are imported correctly, maybe the file I sent to John privately has some problem, I really don't know. Just let me know if you need more details. If necessary, I can send to you my rc1 userdir to reproduce the issue. Regards
I think I see what the problem is. Nothing to do with importing previous version, etc. It looks like the date executed is not parsed to a java.util.Date
I think this bug can only occur if the user changes locales, but will test to confirm. I have tested in ja locale and haven't seen this error.
I don't change my locale for this, but I updated my Ubuntu from 8.04 to 8.10 and change encoding from UTF-8 to ISO-8859-1. In the truth, I am always using ISO encoding, but after update, I needed to change the Ubuntu settings again for some reason. Do you think that something like that could 'broke' the history file? BTW, the update was done without run IDE, so, theoretically IDE was always executed with the same environment. Regards
Hi, I just remember something that could help you. I always used my IDE without --locale parameter, but after RC@ where pt_BR version is included, I switch to english using --locale en:US un netbeans.conf file. So, the original file was created with pt_BR locale and now I tried to use it in en_US. What do you think?
Yes, I think the problem is changing the locale. The DateFormat class expects the same locale. Still, I should try to fix this for patch 1 Can you try running NetBeans with the pt_BR locale (the same locale used when executing the SQL) and see if History opens correctly. Thank you
I have a fix that changes the date format. Since this will go into the patch I need to make sure History is forward-compatible
Steps to reproduce: 1) Run NetBeans in some locale 2) Execute some SQL statements 3) Exit NetBeans, change locale, restart NetBeans 4) Try to open SQL History dialog opens empty If the Apply button is clicked to set the limit, then the IllegalArgumentException occurs (but this is kind of a red herring)
I'm going to create a new issue for SQL History not supporting the executing of SQL when NetBeans is running in another locale. This can be fixed for 7.0 Basically what happens in 6.5 is if there is any error parsing the sql_history.xml file then this file is removed automatically. The exception mentioned in this issue occurs when clicking the Apply button. I'll fix this issue, but it's not that serious.
To reproduce this exception: 1) create directory under userdir : config/Databases/SQLHISTORY and copy attached file sql_history.xml to this directory 2) Start NB and open the SQL Editor and SQL History 3) Click the Apply button a couple of times The IllegalArgumentException occurs
Created attachment 73349 [details] sql history file
acc0fb74a193
I forgot to mention to run NB in the en locale Note, that due to the locale issues mentioned, the sql_history.xml file won't parse and SQL History will open blank and after clicking Apply the sql_history.xml file is removed. Message in the dialog says the sql_history file is reset. I'll file a separate issue for the locale problem when running NB in multiple locales.
I don't agree with P3. In the truth, it is P1 since cause data loss, but since happens just in special circumstances we can use P2, but not P3. As I said in a similar issue on local history, if we can't trust in a feature, this feature is totally unnecessary. BTW, any change to fix it for a patch1? Regards.
Integrated into 'main-golden', will be available in build *200811061401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/acc0fb74a193 User: John Baker <jbaker@netbeans.org> Log: #152342 fix