Archive for the ‘Java’ Category

Some tips on porting Spring web applications to OC4J

As OC4J has some drawbacks, here are some tips on porting Spring Framework 2+ web applications.
1. Forget about XML Schema, use DTD’s
As I was about to touch the first base, after throwing my exploded WAR in j2ee applications, OC4J started complaining about XML issues. This is what I mean:

javax.xml.parsers.ParserConfigurationException: Unable to validate using XSD: […]

The importance of reliable, reproducible and independent build process

It’s a known fact: I like maven.
It improves some aspects of the development process but it also has a lot of drawbacks.
One of these drawbacks comes directly from maven’s online distributed repository architecture and can make your build process unbearable and worst of all non-reproducible.
The usage of maven assumes the presence of all required repositories […]

How to get java thread stack traces for a Windows service with jstack

When running in a console window, pressing CTRL+Break signals the JVM to print out all stack traces of currently running threads.
If your application runs as a service (or linux/unix dæmon) you can’t press CTRL+Break, so you have to signal the JVM yourself to produce the stack trace. You can do that on linux by signaling […]

Generating your model from a schema definition using Maven and JAXB

If your project requires quite a large data model and it so happens that you have a xml schema definition on hand, you can easily transform that XSD into Java classes using Maven 2, JAXB and some manual labor.
Things you might want to know:
* doesn’t work out of the box on JSE6. It actually needs […]

JiBX, Maven JiBX plugin, using collections with flexible settings

Before JiBX 1.1.5, names on collections were optional. That changed
Now, although the docs say that the name attribute is optional on collections, it’s actually required in the real world.
Some flexible setups, like mine, get really confused if the name attribute is specified, and, because it is required I can’t even bind it without […]