Posted in Java on October 15, 2009 | Leave a Comment »
It seems to me that the JavaMail Mock library has dodgy handling of BCC fields. Sending a message with BCC fields makes it possible to read the fields again when receiving the email (!) This is against the definition of BCC, isn’t it?
Session session = Session.getDefaultInstance(mMailProperties, null);
MimeMessage [...]
Read Full Post »
Posted in Java, Tomcat on July 22, 2009 | Leave a Comment »
Solr is a great piece of software but its logging is bloody annoying. Defaultwise on my Tomcat, it will write all its log messages to the system out log, which is a pain in the but to say the least.
To make it log to its own log file, this is what I did to tomcat/conf/logging.properties
# [...]
Read Full Post »
Posted in Java on February 23, 2009 | 1 Comment »
You wouldn’t think the difference between these two code snippets were anything to blog about, right?
String selectString = “select * from mytable”;
List result = getHibernateTemplate().find(selectString);
and this one, and no, you woun’t get any points for pointing out that this is a better, non-deprectaed way of executing a query in Hibernate
String selectString = “select [...]
Read Full Post »
Posted in Java on January 30, 2009 | Leave a Comment »
I’m sure it’s doable, but it’s definitely not easy to do.
Hibernate has added a complex, sorry “rich”, API on top of JDBC to construct queries and the like (in addition to OR mapping and I’m sure a host of other tings). Now, most tutorials out there are mere Micky Mouse examples and not that useful [...]
Read Full Post »
Posted in Java on February 16, 2008 | 3 Comments »
I’m amazed of the wonders thread dumps can do for you when debugging “why on earth is this taking so long?”. Given that your Java application is running on a Unix or Linux system, you can simply ask the JVM to dump the current threads active by sending it a QUIT signal. This is totally [...]
Read Full Post »
Posted in Emacs, Java, Uncategorized on November 9, 2007 | 1 Comment »
Thanks to the blog post at www.credmp.org, I’ve got Java flymake support working in Emacs. It works surprisingly well (and fast) using the Eclipse compiler.
When setting it up, be sure to get the ecj.jar off the Eclipse website, I tried first with the ecj.jar supplied with the Debian package and that didn’t suffice.
Currently, [...]
Read Full Post »
Posted in Apache, Java, Tomcat on October 26, 2007 | Leave a Comment »
I love Tomcat, but it really gives me the creeps sometimes. Using the latest 6.0.14 release, I’ve been linking my log4j configuration from $CATALINA_HOME/lib/trace.properties to whereever it actually resides.
The symlinking of both JAR libraries and trace.properties has always been fine. Now, all of a sudden, my logging config didn’t work anymore. I had been [...]
Read Full Post »
Posted in Apache, Java, Tomcat on October 8, 2007 | 2 Comments »
Tomcat kept throwing annoying NoClassDefFoundErrors at me although the class was in a jar that resided in webapp classpath (a jar in mywebapp/WEB-INF/lib). Also, it didn’t happen all the time, just “often”. Restarting the server sometimes helped, sometimes not. Testing the same webapp on the Resin app server gave no such errors.
To my (so far) [...]
Read Full Post »