Archive for the ‘Programming’ Category

Spring 3 und MyBatis 3.0.4 / 3.0.6

I was trying to use Spring 3.0.5.RELEASE together with MyBatis in a Maven environment. I added the mybatis-spring dependency. This turned out not to work due to a MalformedParameterizedTypeException (a detailed stacktrace is included below). There are quite some posts concerning this iusse, yet most of them refer to the problem as being caused by Continue reading →

Eclips, Maven, WTP: AJDT Integration

It seems there is a configurator needed to make AJDT work with Maven in Eclipse as hinted by this article: http://wiki.eclipse.org/M2E_plugin_execution_not_covered Plugins, namely m2eclipse-ajdt exist or are being developed: https://github.com/sonatype/m2eclipse-ajdt https://github.com/ilx/m2eclipse-ajdt But then again, I have no idea what I am actually talking about. I will try to get by without worrying about this until Continue reading →

Maven WAR Context Root (m2e-wtp)

I was wondering how Maven determines the name of the context root when deploying directly from Eclipse using m2e-wtp (and probably also when deploying the *.war later). It turns out that the finalName tag in the pom.xml does the trick: ... <build> <finalName>root context name</finalName> ... </build>

Eclipse: Maven Integration and WTP

The Maven integration for Eclipse project (m2e or m2eclipse) by Sonartype (http://m2eclipse.sonatype.org/) has been moved to Eclipse. The version number was raised to 1.x. Since then the update sites by Sonartype are outdated and extras cannot be installed by accessing the usual update site (http://m2eclipse.sonatype.org/sites/m2e-extras) anymore as the provided extras are not compatible. Thus the Continue reading →

Java: Singleton Syntax

So today I learned, that it seems to be possible to specify a single variable without a type and any modifyer in a Java class. This seems to implement a singleton desgin pattern? I will have to investigate further.   package de.vogella.jersey.todo.dao;   import java.util.HashMap; import java.util.Map;   import de.vogella.jersey.todo.model.Todo;   public enum TodoDao { Continue reading →

Eclipse - WTP - Dynamic Web Project - Deployment Assemly

When using Eclipse WTP to develop dynamic web projects, it is often necessary to deploy resources to the WebContent folder. Keeping resources in the WebContent folder is ugly and manually copying them is tedious. The propject property "Deployment Assembly" allows to specify which folders are deployed to the WebContent folder upon calling "Run As > Continue reading →

Linux: SED and GREP and RegEx

Just a little note. When using real regular expressions with grep and sed, meaning some expression using i.e. ? or +, one needs be aware to use the right options: GREP egrep SED sed -r There are other switches and options, but those are enough for me at the moment

JUnit 4 - Test suites using annotations

JUnit 4 provides annotation for testing. I had trouble finding how to bundle several test cases together in a test suite using that method. Finally, this article helped: http://radio.javaranch.com/lasse/2006/07/27/1154024535662.html It seems that not that many developers migrating to JUnit 4 are aware of the replacement for the old way of building suites--using the static suite() Continue reading →

Eclipse Editor Block Mode

There is a block or column mode in Eclipse toggled by Alt+Shift+a. So nice to know! see: http://tkilla.ch/column_mode

Hadoop - Keys and Values

So Keys as well as Values in Hadoop seem a little tricky. Values need to implement the Writable interface Keys need to implement the ComparableWritable not just the Writable interface, otherwise a ClassCastException is thrown Each Key needs to specify the Comparable.compare(...) method carefully, as this is used by Hadoop to group Key-Value-Pairs for the Continue reading →

Return top
 

Warning: array_filter() [function.array-filter]: The first argument should be an array in /var/www/web41/html/hp_fstyle/wordpress/wp-content/plugins/wordpress-tweaks/tweaks.php on line 650