NetBeans troubleshooting. More verbose logs.
My NetBeans which was installed as part Java CAPS 6 started acting a little weird. I want to troubleshoot it.
Setting FINE log level high up in the hierarchy makes NetBeans slow. To find specific classes you are interested, this FINE level log may help. Or , there may be such a list already. __OR__ one can create such a list somehow, like Michael did for Java CAPS 5.
- First thing I did is to look in log file. In Java CAPS case, it's ${CAPS6}/.netbeans/caps/var/log/messages.log. There were not many lines in there. I need to increase log level.
- I thought increase log level only for NetBeans stuff should be fine. So, I gave this extra option on start.
$ netbeans -J-Dorg.netbeans.level=FINEST
- Well, it failed to start. This is from the tail of messages.log
FINER [org.netbeans.core.startup.NbInstaller]: Delegating resource java/util/logging/ from null for org.netbeans.core java.lang.ClassCircularityError: java/util/logging/LogRecord SEVERE [org.openide.util.RequestProcessor] java.lang.ClassCircularityError: java/util/logging/LogRecord at org.netbeans.core.NbErrorManager.publish(NbErrorManager.java:74) at org.netbeans.core.startup.TopLogging$LookupDel.publish(TopLogging.java:750) at java.util.logging.Logger.log(Logger.java:472) at java.util.logging.Logger.doLog(Logger.java:494) at java.util.logging.Logger.log(Logger.java:517) at org.netbeans.core.startup.TopLogging$LgStream.run(TopLogging.java:730) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986) - So, I added another option.
$ netbeans -J-Dorg.netbeans.level=FINEST -J-Dorg.netbeans.core.startup.NbInstaller.level=FINE
- I went a little fanatic and added 3 options. This failed with a different error spitted out to stdout/stderr. Looks like I need extra tweaking to enable this many logs.
$ netbeans -J-Dorg.level=FINEST -J-Dcom.level=FINEST -J-Djavax.level=FINEST -J-Djava.level=FINEST -J-Dorg.netbeans.core.startup.NbInstaller.level=FINE java.lang.StackOverflowError at java.util.ResourceBundle.findBundleInCache(ResourceBundle.java:1540) at java.util.ResourceBundle.findBundle(ResourceBundle.java:1313) at java.util.ResourceBundle.findBundle(ResourceBundle.java:1292) at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1234) at java.util.ResourceBundle.getBundle(ResourceBundle.java:715) at java.util.logging.Level.getLocalizedName(Level.java:223) at org.netbeans.core.startup.TopLogging$NbFormatter.print(TopLogging.java:527)
- I excluded org.netbeans and this time, it started OK.
$ netbeans -J-Dorg.level=CONFIG -J-Dcom.level=FINEST -J-Djavax.level=FINEST -J-Djava.level=FINEST
Setting FINE log level high up in the hierarchy makes NetBeans slow. To find specific classes you are interested, this FINE level log may help. Or , there may be such a list already. __OR__ one can create such a list somehow, like Michael did for Java CAPS 5.