Feeds:
Posts
Comments

Archive for the ‘Java’ Category

JavaMail Mocking and BCC fields

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 »

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 »

DBUnit and Hibernate

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 »

Complex queries in Hibernate

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 »

I’d like to thank everyone involved in walking the last mile of creating a true free distriubution of the Java 6 platform.
It was fantastic that Sun open sourced 95% of Java and it’s great that RedHat and GNU Classpath has made the last steps to give us a truly free open source distribution of [...]

Read Full Post »

Thread dumps saving the day

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 »

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 »

Tomat is creepy

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 »

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 »

RPM support in Maven2

I was positively suprised to find a rather good RPM plugin for Maven2. It has a neat way of specify both mapping and package scripts. I haven’t looked at package dependencies yet, but it looks good!
Now, if only the DEB plugin for Maven2 would be usable, we would be in package heaven once again! [...]

Read Full Post »

Older Posts »