Categories
Computing Java

Running the Apache James Mail Server as a Windows Service

To make the Apache James mail server into a service on your Windows machine, follow these instructions (shamelessly copied from here)

From a command prompt change directory to the bin folder located under the James installation directory. From the bin folder enter the following command

Wrapper.exe -i ..\conf\wrapper.conf

This will install the James NT service. You can then control this like another service from the Windows Services screen.

To remove the James service use this command

Wrapper.exe -r ..\conf\wrapper.conf

Share
Categories
General

Playing with the James e-mail server

I love e-mail.
E-mail probably loves me back.
Anyhu, James wants to be your e-mail server. I will report more on how it works and how much fun it is (maybe this helps) but you might encounter the following, arcane error:

Error building configuration from file:/C:/Documents and Settings/yzukerman/My D
ocuments/downloads/java/James/james-2.2.0/apps/james/SAR-INF/config.xml.

It appears James really hates having spaces in the directory structure in which it is located.
This examines this is a bug report.

Share
Categories
Java SQL Server

Sending null values as parameters into a SQLServer stored procedure using JDBC

When calling a SQL Server stored procedure using JDBC’s CallableStatement object one uses its setXXX methods to set input parameters. XXX is the name of the type the input parameter is assumed to be of.
SQL Server does not support the setNull() method, throwing this exception:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC] The specified SQL type is not supported by this driver.

One way we went around this unpleasantry was to instead set the null value to be a different type, so instead of
setNull(position, variable)

There is an entry in the SQL Server JDBC newsgroup about this issue.
we create a new null String object and then call:
setString(position, nullString)

Share
Share