You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by JJ <uk...@yahoo.com> on 2003/11/06 22:57:17 UTC

Problems with james.jar and mail_1_3.jar and custom mailets

Dear all,

I have just installed Apache James on a Windows 2000
Professional machine and am having problems running
with a custom mailet installed. My problem can be
summarized as:

I write a custom mailet (MyTestMailet) by extending
GenericMailet, compile it, and place it in a jar file
which I then place in the JAMES_HOME/lib directory as
described in the documentation.

I include the following entries in the
JAMES_HOME/apps/james/SAR_INF/config.xml file:

<mailetpackages>
 ...
 <mailetpackage>nz.co.aboutit.mailets</mailetpackage>
</mailetpackages>

the following entry i place as the first child element
in the transport processor element:

<mailet match="All" class="MyTestMailet"/>

All of this appears to be fine. However, when I place
the james.jar and mail_1_3.jar JAR files (extracted
from james.sar) into the JAMES_HOME/lib directory and
attempt to start james using run.bat the console
window shows a load of exception windows before
closing.

The phoenix log file is as follows:

INFO    2003-11-07 10:52:02.171 [Phoenix ] (): Logger
started
WARN    2003-11-07 10:52:02.261 [Phoenix ] (): Phoenix
was not started by the daemon thus it will not be
possible to restart the JVM via the Management
interface.
INFO    2003-11-07 10:52:02.491 [Phoenix.] ():
Installing Sar located at
file:/C:/james-2.1.3/apps/james.sar.
WARN    2003-11-07 10:52:02.671 [Phoenix.] (): The
file SAR-INF/lib/mm.mysql.LICENCE can not be extracted
from the Sar "file:/C:/james-2.1.3/apps/james.sar"
into directory
C:\james-2.1.3\apps\james\SAR-INF\lib\mm.mysql.LICENCE
because there is a file in the way.
WARN    2003-11-07 10:52:02.671 [Phoenix.] (): The
file conf/sqlResources.xml can not be extracted from
the Sar "file:/C:/james-2.1.3/apps/james.sar" into
directory
C:\james-2.1.3\apps\james\conf\sqlResources.xml
because there is a file in the way.
WARN    2003-11-07 10:52:02.671 [Phoenix.] (): The
file SAR-INF/config.xml can not be extracted from the
Sar "file:/C:/james-2.1.3/apps/james.sar" into
directory C:\james-2.1.3\apps\james\SAR-INF\config.xml
because there is a file in the way.
WARN    2003-11-07 10:52:02.681 [Phoenix.] (): The
file SAR-INF/assembly.xml can not be extracted from
the Sar "file:/C:/james-2.1.3/apps/james.sar" into
directory
C:\james-2.1.3\apps\james\SAR-INF\assembly.xml because
there is a file in the way.
WARN    2003-11-07 10:52:02.681 [Phoenix.] (): The
file SAR-INF/environment.xml can not be extracted from
the Sar "file:/C:/james-2.1.3/apps/james.sar" into
directory
C:\james-2.1.3\apps\james\SAR-INF\environment.xml
because there is a file in the way.
INFO    2003-11-07 10:52:02.882 [Phoenix.] (): No
policy specified in server.xml, giving full
permissions to ServerApplication.
INFO    2003-11-07 10:52:03.503 [Phoenix.] ():
Verifying that the name specified for Blocks and
BlockListeners are valid.
INFO    2003-11-07 10:52:03.503 [Phoenix.] ():
Verifying that the name specified for Blocks and
BlockListeners are unique.
INFO    2003-11-07 10:52:03.513 [Phoenix.] ():
Verifying that the specified Dependencies are valid
according to BlockInfo.
INFO    2003-11-07 10:52:03.513 [Phoenix.] ():
Verifying that the dependencies of Blocks are valid
with respect to other Blocks.
INFO    2003-11-07 10:52:03.513 [Phoenix.] ():
Verifying that there are no circular dependencies
between Blocks.
INFO    2003-11-07 10:52:03.513 [Phoenix.] ():
Verifying that the specified Blocks have valid types.
WARN    2003-11-07 10:52:03.553 [Phoenix.] (): Error
deleting Work Directory
"C:\james-2.1.3\work\james-1068155522491". (Reason:
File
C:\james-2.1.3\work\james-1068155522491\SAR-INF\lib\mm.mysql-2.0.14.jar
unable to be deleted.)
java.io.IOException: File
C:\james-2.1.3\work\james-1068155522491\SAR-INF\lib\mm.mysql-2.0.14.jar
unable to be deleted.
	at
org.apache.avalon.excalibur.io.FileUtil.forceDelete(FileUtil.java:638)
	at
org.apache.avalon.excalibur.io.FileUtil.cleanDirectory(FileUtil.java:806)
	at
org.apache.avalon.excalibur.io.FileUtil.deleteDirectory(FileUtil.java:762)
	at
org.apache.avalon.excalibur.io.FileUtil.forceDelete(FileUtil.java:630)
	at
org.apache.avalon.excalibur.io.FileUtil.cleanDirectory(FileUtil.java:806)
	at
org.apache.avalon.excalibur.io.FileUtil.deleteDirectory(FileUtil.java:762)
	at
org.apache.avalon.excalibur.io.FileUtil.forceDelete(FileUtil.java:630)

No doubt I am overlooking something simple but I've
followed the documentation to the letter and still
have the same problem. From my experience with Tomcat
and web applications I am a little confused as to why
I'm not put my jar files into the
JAMES_HOME/apps/james/lib directory. Why do I need to
put the james.jar and mail_1_3.jar files into the
container lib directory. How are a the standard
mailets which must also require these libraries
working?

Any help with this would be extremely welcome.

Many thanks in advance

Jonathan Wright

Customer Informaetion Technologies, Auckland, N.Z.

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


RE: Problems with james.jar and mail_1_3.jar and custom mailets

Posted by "Noel J. Bergman" <no...@devtech.com>.
> I write a custom mailet (MyTestMailet) by extending
> GenericMailet

If you are just getting started, you'll be far better off with a v2.2 test
build than the 2.1.3 Release Build, since v2.2 has much better classloader
support for custom packages.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


RE: Problems with james.jar and mail_1_3.jar and custom mailets

Posted by Lindsay Smith <li...@wapdat.com>.
Do you have dos window open on C:\james-2.1.3\work\james-1068155522491 that
stops windows being able to delete the directory?

I would start by figuring out why the work directory
(C:\james-2.1.3\work\james-1068155522491)  cant be deleted.

cheers
linds

-----Original Message-----
From: JJ [mailto:ukjjw@yahoo.com]
Sent: 06 November 2003 21:57
To: server-user@james.apache.org
Subject: Problems with james.jar and mail_1_3.jar and custom mailets


Dear all,

I have just installed Apache James on a Windows 2000
Professional machine and am having problems running
with a custom mailet installed. My problem can be
summarized as:

I write a custom mailet (MyTestMailet) by extending
GenericMailet, compile it, and place it in a jar file
which I then place in the JAMES_HOME/lib directory as
described in the documentation.

I include the following entries in the
JAMES_HOME/apps/james/SAR_INF/config.xml file:

<mailetpackages>
 ...
 <mailetpackage>nz.co.aboutit.mailets</mailetpackage>
</mailetpackages>

the following entry i place as the first child element
in the transport processor element:

<mailet match="All" class="MyTestMailet"/>

All of this appears to be fine. However, when I place
the james.jar and mail_1_3.jar JAR files (extracted
from james.sar) into the JAMES_HOME/lib directory and
attempt to start james using run.bat the console
window shows a load of exception windows before
closing.

The phoenix log file is as follows:

INFO    2003-11-07 10:52:02.171 [Phoenix ] (): Logger
started
WARN    2003-11-07 10:52:02.261 [Phoenix ] (): Phoenix
was not started by the daemon thus it will not be
possible to restart the JVM via the Management
interface.
INFO    2003-11-07 10:52:02.491 [Phoenix.] ():
Installing Sar located at
file:/C:/james-2.1.3/apps/james.sar.
WARN    2003-11-07 10:52:02.671 [Phoenix.] (): The
file SAR-INF/lib/mm.mysql.LICENCE can not be extracted
from the Sar "file:/C:/james-2.1.3/apps/james.sar"
into directory
C:\james-2.1.3\apps\james\SAR-INF\lib\mm.mysql.LICENCE
because there is a file in the way.
WARN    2003-11-07 10:52:02.671 [Phoenix.] (): The
file conf/sqlResources.xml can not be extracted from
the Sar "file:/C:/james-2.1.3/apps/james.sar" into
directory
C:\james-2.1.3\apps\james\conf\sqlResources.xml
because there is a file in the way.
WARN    2003-11-07 10:52:02.671 [Phoenix.] (): The
file SAR-INF/config.xml can not be extracted from the
Sar "file:/C:/james-2.1.3/apps/james.sar" into
directory C:\james-2.1.3\apps\james\SAR-INF\config.xml
because there is a file in the way.
WARN    2003-11-07 10:52:02.681 [Phoenix.] (): The
file SAR-INF/assembly.xml can not be extracted from
the Sar "file:/C:/james-2.1.3/apps/james.sar" into
directory
C:\james-2.1.3\apps\james\SAR-INF\assembly.xml because
there is a file in the way.
WARN    2003-11-07 10:52:02.681 [Phoenix.] (): The
file SAR-INF/environment.xml can not be extracted from
the Sar "file:/C:/james-2.1.3/apps/james.sar" into
directory
C:\james-2.1.3\apps\james\SAR-INF\environment.xml
because there is a file in the way.
INFO    2003-11-07 10:52:02.882 [Phoenix.] (): No
policy specified in server.xml, giving full
permissions to ServerApplication.
INFO    2003-11-07 10:52:03.503 [Phoenix.] ():
Verifying that the name specified for Blocks and
BlockListeners are valid.
INFO    2003-11-07 10:52:03.503 [Phoenix.] ():
Verifying that the name specified for Blocks and
BlockListeners are unique.
INFO    2003-11-07 10:52:03.513 [Phoenix.] ():
Verifying that the specified Dependencies are valid
according to BlockInfo.
INFO    2003-11-07 10:52:03.513 [Phoenix.] ():
Verifying that the dependencies of Blocks are valid
with respect to other Blocks.
INFO    2003-11-07 10:52:03.513 [Phoenix.] ():
Verifying that there are no circular dependencies
between Blocks.
INFO    2003-11-07 10:52:03.513 [Phoenix.] ():
Verifying that the specified Blocks have valid types.
WARN    2003-11-07 10:52:03.553 [Phoenix.] (): Error
deleting Work Directory
"C:\james-2.1.3\work\james-1068155522491". (Reason:
File
C:\james-2.1.3\work\james-1068155522491\SAR-INF\lib\mm.mysql-2.0.14.jar
unable to be deleted.)
java.io.IOException: File
C:\james-2.1.3\work\james-1068155522491\SAR-INF\lib\mm.mysql-2.0.14.jar
unable to be deleted.
	at
org.apache.avalon.excalibur.io.FileUtil.forceDelete(FileUtil.java:638)
	at
org.apache.avalon.excalibur.io.FileUtil.cleanDirectory(FileUtil.java:806)
	at
org.apache.avalon.excalibur.io.FileUtil.deleteDirectory(FileUtil.java:762)
	at
org.apache.avalon.excalibur.io.FileUtil.forceDelete(FileUtil.java:630)
	at
org.apache.avalon.excalibur.io.FileUtil.cleanDirectory(FileUtil.java:806)
	at
org.apache.avalon.excalibur.io.FileUtil.deleteDirectory(FileUtil.java:762)
	at
org.apache.avalon.excalibur.io.FileUtil.forceDelete(FileUtil.java:630)

No doubt I am overlooking something simple but I've
followed the documentation to the letter and still
have the same problem. From my experience with Tomcat
and web applications I am a little confused as to why
I'm not put my jar files into the
JAMES_HOME/apps/james/lib directory. Why do I need to
put the james.jar and mail_1_3.jar files into the
container lib directory. How are a the standard
mailets which must also require these libraries
working?

Any help with this would be extremely welcome.

Many thanks in advance

Jonathan Wright

Customer Informaetion Technologies, Auckland, N.Z.

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org