Categories
Bugzilla for Java Java

Short notice

I am sorry that the desperately awaited version of B4J is still not available. B4J is supposed to add XML-RPC session support which I couldn’t follow up for a long time. However, you can use the current Snapshot version available via Sonatype to benefit from the UTF-8 encoding fix, the Jira session support and integration with CSV/Excel Utility. The Maven coordinates are:

<dependency>
  <groupId>eu.ralph-schuster</groupId>
  <artifactId>b4j</artifactId>
  <version>1.5.0-SNAPSHOT</version>
</dependency>
Categories
CSV Java

CSV/Excel Utility Package V2.6.1 released

The new version 2.6.1 adds some improvements as of character encoding and bean reading and writing. A complete change log is available through the Maven Site.

You can download the new version here or visit the Homepage of the utility where you will find some examples on how to use it.

The Maven coordinates are:

   <dependency>
      <groupid>eu.ralph-schuster</groupid>
      <artifactid>csv</artifactid>
      <version>2.6.1</version>
</dependency>

PS: Version 2.6.0 has been released just two days ago but was already replaced by V2.6.1 because the V2.6.0 TableReader interface had a superfluous method defined.

Categories
Java RS Library

RS Library V1.1.0 released

I had to do some rework for the RS Library. The most important changes are:

  • RSLIB-19 – Improved DAO registration in abstract DaoFactory implementation
  • RSLIB-20 – Upgrade to Hibernate 4
  • RSLIB-22 – Provide modules as OSGI packages
  • RSLIB-23 – Cache Control for DAOs

A complete documentation can be found either through Javadocs or the appropriate module homepages:

The Maven coordinates are:

   <dependency>
      <groupid>eu.ralph-schuster</groupid>
      <artifactid>baselib</artifactid>
      <version>1.1.0</version>
   </dependency>
 
   <dependency>
      <groupid>eu.ralph-schuster</groupid>
      <artifactid>data</artifactid>
      <version>1.1.0</version>
   </dependency>
 
   <dependency>
      <groupid>eu.ralph-schuster</groupid>
      <artifactid>data-hibernate</artifactid>
      <version>1.1.0</version>
   </dependency>
Categories
Java RS Library

Apache ServiceMix, Camel and XSL Transformation

This topic cost me a few hours. It is basically how to achieve XML transformation when your original XML file contains a DTD reference that cannot be resolved from your system.

My DTD reference looked like this:

<!DOCTYPE root-element SYSTEM "../dtd/core.dtd">

and the route was simply:

	<camelContext xmlns="http://camel.apache.org/schema/spring">
		<route>
			<from uri="file:data/inbox"/>
			<to uri="xslt://xslt/transformation.xsl"/>
			<to uri="file:data/outbox"/>
		</route>
	</camelContext>

The Camel transformation was always complaining about the missing DTD because it was looking for it in the filesystem instead of the bundle.

There exist many hints on the net but none of them really helped (e.g. using a CatalogResolver). So I decided to tamper my Camel route and adding a bean inbetween:

	<bean id="dtdTransformer" class="de.example.xslt.DtdTransformer"/>
 
	<camelContext xmlns="http://camel.apache.org/schema/spring">
		<route>
			<from uri="file:data/inbox"/>
			<bean ref="dtdTransformer"/>
			<to uri="xslt://xslt/bundesliga.xsl"/>
			<to uri="file:data/outbox"/>
		</route>
	</camelContext>

This DtdTransformer is a simple class having one method, transform():

	public static final String DOCTYPE_LINE = "<!DOCTYPE root PUBLIC \"-//PRIVATE//RS//EN\" \"###URI###\">";
 
	public String transform(String body) throws Exception {
		URL url = FileFinder.find(getClass(), "dtd/core.dtd");
		if (url != null) {
			body = body.replaceAll("<!DOCTYPE[^>]*>", DOCTYPE_LINE).replaceAll("###URI###", url.toURI().toString());
		}
		return body;
	}

The URI will be replaced by looking up the DTD file at runtime, here by using my FileFinder class. Then it continues with replacing the special marker ###URI### by the real URI from the file found.

Although the solution sounds so simple, it took me quite a while to find out that the DOCTYPE references needs to be a URI and not a file or URL reference.

Categories
CSV Java

CSV/Excel Utility Package 2.5.0 released

The new version 2.5.0 delivers the package for usage in OSGI containers and improves handling of blank lines and calculated cells in an Excel sheet (this code was contributed by Andrej Czapszys). A complete change log is available through the new Maven Site

You can download the new version here or visit the Homepage of the utility where you will find some examples on how to use it.

The Maven coordinates are:

   <dependency>
      <groupid>eu.ralph-schuster</groupid>
      <artifactid>csv</artifactid>
      <version>2.5.0</version>
   </dependency>
Categories
Java RS Library

RS Library 1.0.0 released

Finally it’s done. I decided to release the first version of all those classes that I implemented and collected throughout the last years, the RS Library. A complete documentation can be found either through Javadocs or the appropriate module homepages:

The Maven coordinates are:

   <dependency>
      <groupid>eu.ralph-schuster</groupid>
      <artifactid>$module</artifactid>
      <version>1.0.0</version>
   </dependency>
Categories
Bugzilla for Java

Bugzilla for Java 1.4.0 released

V1.4.0 of the B4J project has been released. It contains several bugfixes and migrates Issue Management to JIRA.

You can download the new version here.

The Maven coordinates are:

<dependency>
  <groupid>eu.ralph-schuster</groupid>
  <artifactid>b4j</artifactid>
  <version>1.4.0</version>
</dependency>
Categories
CSV

CSV/Excel Utility Package 2.4.0 released

The new version 2.4.0 adds character encoding support to the table readers and writers. It also migrates the issue management to JIRA.

You can download the new version here or visit the Homepage of the utility where you will find some examples on how to use it.

The Maven coordinates are:

<dependency>
  <groupid>eu.ralph-schuster</groupid>
  <artifactid>csv</artifactid>
  <version>2.4.0</version>
</dependency>
Categories
Bugzilla for Java CSV IceScrum Stylesheets Projects Templating

Migration to JIRA

Hi folks,

all projects have migrated to JIRA after Bugzilla issues were transferred  to it. Please do not report into Bugzilla anymore (Links were removed from page but remain in old released versions). The new JIRA instance can be found at jira.ralph-schuster.eu.

Categories
Bugzilla for Java

Bugzilla for Java V1.3 released

V1.3 of the B4J project has been released. It contains two major bugfixes related to timestamp parsing and attachments. It also adds the capability to retrieve the content of an attachment.

You can download the new version here.

The Maven coordinates are:

  <groupid>eu.ralph-schuster</groupid>
  <artifactid>b4j</artifactid>
  <version>1.3</version>