Hibernate, spring, and different jars

The situation is this. I had a working application which used Hibernate annotated classes, and JTA for data bindings, within a spring framework. Then I moved the annotated classes into a Jar file, and the application stopped working. Hibernate knew nothing about the classes because the PersistenceAnnotationBeanPostProcessor does not traverse into the JARS on the classpath. Further neither the entity manager or HibernateJpaVendorAdapter have options to specify the explicit paths to the classes....

November 25, 2007 · Nigel Sim

Spring 2.0.6 and ACEGI

Because ACEGI depends on spring 1.2.6, we need to override a few dependencies if we want to use spring 2.0.6. To do this, we use the following exclusions:

October 1, 2007 · Nigel Sim

Setting up Tomcat behind Apache 2.2 in a hierarchical path

The situation I want to deal with is this: Public Web Root |-plone \-portals |-portal1 (server A) \-portal2 (server B) In apache 2.2 they (the writers of the Apache docs) seem to prefer the use of mod_proxy_ajp, which is an AJP/1.3 driver for mod_proxy. At the apache end we just install mod_proxy_ajp and add a line such as the following to the proxy_ajp.conf file: ProxyPass /portals/portal1 ajp://nigel-dev:8009/portals/portal1 Note that the paths on the proxy host and the application server are the same....

September 28, 2007 · Nigel Sim

Maven-Ant hybrid

Some brief background. Ant is the stock standard Java build system, much as Make is for C/C++. Maven is a newer Java build system which tried to, amongst other things, solver the Jar dependency hell problem, as well as make a standard project directory layout. From the Maven guide: <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.9</version> </dependency> Now when you go to compile with maven it goes and gets all the dependencies, puts them in your local repository (~/....

July 20, 2007 · Nigel Sim

Four things which would make my Linux wonderful

1. Presentation controller for my bluetooth phone In fact this already exists, in many forms apparently. The trick for me was to get it working. If I was to derive it from scratch I would have made a simple, mappable Java app for the phone, and would have written a Python app for the server. In fact this already exists in Xbtrc. The trick for me however, was to get the phone to find the computer....

January 18, 2007 · Nigel Sim

Java HTML Table parser

I put together this class for scraping HTML tables. It supports nested tables. At some stage I’ll put this up in SVN along with it’s test cases. import java.io.IOException; import java.io.Reader; import java.util.ArrayList; import java.util.Stack; import javax.swing.text.MutableAttributeSet; import javax.swing.text.html.HTML; import javax.swing.text.html.HTMLEditorKit; import javax.swing.text.html.HTML.Tag; import javax.swing.text.html.parser.ParserDelegator; import org.apache.log4j.Logger; public class TableParser extends ArrayList { static Logger logger = Logger.getLogger(TableParser.class); Stack s = new Stack(); /** * Process this reader. * @param f * @throws IOException */ public void parse(Reader f) throws IOException { this....

September 28, 2006 · Nigel Sim