I mostly post comments about stuff I spend a bit of time finding on the internet or figured out myself, in a hope that myself and others can find it easier the next time (so I blog a lot about stacktraces!).
From time to time I will also post some personal experiences I'd like to share.
Out of the blue my DHCP client started to refuse to obtain an address over openvpn :(
$ sudo dhclient -v -r -w tap0
Internet Systems Consortium DHCP Client 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Can't allocate interface tap0lease {
interface .
After somegoogling I finally figured out how to fix it.
I had to delete the "tap0lease" line from /var/lib/dhcp/dhclient.leases :
(previously titled: Bye Eclipse the preventor of development, hello Netbeans...)
As always this is mainly for my future self as reference, as I don't seemed to have learned from the same experience that I had previously:(
Don't try to manually add dependencies to the tomcat classpath.
I lost the battle against eclipse + tomcat/tomee + maven
The fact that it works to add your main war dependency to the classpath with the maven library this time, does not mean it will work if you add more. I found that eclipse get's completely confused and this causes problems for things that insist that you may only have one copy of any class in your classpath, eg. slf4j, openejb's faces implementation etc.
Until now I didn't really want to switch to netbeans because it doesn't support my favourite version control system (bazaar) and limited lombok support and I didn't really want to re-learn things/qwirks I spent years learning in eclipse like keyboard shortcuts, configuration, classpath settings etc.
Anyways eclipse makes me so mad sometimes and I think the camel's back has finally been broken. I tried to switch previously but had trouble getting my stuff to work quickly, I think I'm more patient/desperate this time..
Some stuff I've figured out with Netbeans so far - i.e a cryptic Netbeans guide for ex-Eclipse-users (please vote on the bugs I link to!):
you can use a use the eclipse keyboard shortcut profile, so for now I don't have to re-learn shortcuts and keep some productivity.
maven multi module support works beautifully
mvn install happens when you do a netbeans build!
Reload POM, seems to be needed sometimes like the "Maven -> update project"
adding a tomee server is simple http://tomee.apache.org/tomee-and-netbeans.html
Committing with Git works better in Netbeans, because it allows you to modify the files while you are typing your commit message (eg. for fixing typos). I would have like to not manually click to see every file, maybe a open all button would help. I still love the qbazaar/bazaar-explorer's commit gui which give you the whole list of changes in one huge scrollable panel - saves a lot of clicks and navigations. For now I just look at the colordiff in the commandline to approximate that behaviour :(
It would also have been nice to get some floating/fading notification if the commit/push went well. If you don't watch the statusbar and spot the progressbar disappear you have no indication if it worked..
Console scrolling works more intuitively and seemlessly: if you scrolled to the bottom it will keep on scrolling as more output comes out, but if you scroll up it stops auto-scrolling. In eclipse you have to click a checkbox to make the choice between auto-scrolling and not.
Running more than one instance. I figured out you have to specify a --userdir for the second one and that it can't be the same as your main user dir. I tried to symlink it but that didn't work, so I made a little script that copies it:
Things I miss so far (maybe I'm missing something):
Control clicking on a maven artifact reference in a pom file would jump to the relevant pom file.
File manager doesn't remember recent locations :( so every time I look for my tomee server, or projects I need to navigate from home :( It would have been better to use the nativelinux file chooser. My current workaround is the Quick File Chooser - plugin : "file chooser optimized for keyboard-only users. Performs GNU Readline-style filename completion when you press Tab. Shows available completions in a list for quick reference, similar to Emacs. Also includes a persistent list of recently used directories for extra speed." (it works in Netbeans8 if you download v7.4manually and install it)
After installing some plugins and making some configurations it refused start up again. Then I accidentally purged ~/.netbeans :( and it worked again. This happend again so I logged a bug and figured out what triggers it. Back to work now finally, damnit!
Searching in the output console is a bit frustrating but CTRL+F and the CTRL+N seems to work ok now.
There is no auto-closing of editors. In eclipse you can tell it to close old editors after you have a certain amount open. It gets messy if netbeans keeps like every single file you clicked open - I go through hundreds. I found sort of a workaround in Window->Documents where you can order by last used, then select the bottom bunch and then close them in one go..
mylyn is also missed - it helps you focus by hiding some of the project clutter a bit from you while you are working.. Project groups seem to be the closest workable alternative.
I like eclipse's run infrastructure better. eg. you can easily run whatever you ran previously (but there are some run shortcuts, so I may get used to it) Found it : ALT+r p
Junit test compare in eclipse you can show you a nice diff when assertEquals(String,String) fails..
In eclipse you can click on stack trace elements in the console and it would open the file, in netbeans it seems to be a manual proccess :(
Test Runner chops off exceptions :(
Java Stack Trace console (where you can past any stacktrace and get links)
Efficient dependency hierarchy to figure out maven dependency hell
http://www.wikivs.com/wiki/Eclipse_vs_Netbeans
I've been with eclipse since at least 2006.
Living with eclipse is like living with an abusive husband, sure you get a black eye from time to time, but you are so dependant that you end up staying. It caused me numerous sleepless nights and missed deadlines :( not to mention it literally driving me insane. t(-.-)
Back to Eclipse!
After that whole laborious move the development cycle in netbeans was just insanely long for my project setup (a couple of layers of war dependenices/overlays which each need to be built for deploying every small change). I bit the bullet and figured out how to do proper OpenEJB and TomEE embedding so I don't need WTP anymore with its' nasty classpath idiosyncrasies.
I dist-upgraded to Ubuntu 14.04 Trusty Tahr today, and at the end it said something went wrong and didn't install correctly and my system may not be stable state or something. Anyways before I rebooted I wanted to check if all the packages were installed properly. With a little googling I found the following gem on the ubuntuforums that I had to share (hello future self!).
Re: verify integrity of installed packages
Install debsums
Code:
sudo apt-get install debsums
Debsums will verify the files on your system against the files in the package repositories (and tell you if they differ)
Most packages include the neccessary info to verify them against the repositories, but some don't, so first up, run
Code:
sudo debsums_init
This will generate file hashes for any packages that lack them (note, this involves downloading the package from the repositories)
Then you can run the verification
Code:
sudo debsums -c
Lucky for me all were fine and I'm typing this after rebooting \o/ .