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 Lucas Gonze <lu...@gonze.com> on 2002/01/26 17:47:22 UTC
bug: run.sh not supported under cygwin
bin/run.sh doesn't work in a bash shell under cygwin. The error is that James
jars are not being loaded properly. The cause is that run.sh always uses colon
for the classpath separator, while Windows JVMs use semicolon for the classpath
separator rather than colon. The following is a corrected run.sh to detect
running under cygwin and use a new var CLASSPATHSEP to handle the condition.
Tested under cygwin but no Unixen.
=======
#!/bin/sh
echo
echo "Avalon runner"
echo
if [ "$JAVA_HOME" = "" ] ; then
echo "ERROR: JAVA_HOME not found in your environment."
echo
echo "Please, set the JAVA_HOME variable in your environment to match the"
echo "location of the Java Virtual Machine you want to use."
exit 1
fi
if [ ! -f Loader.jar ] ; then
echo "ERROR: Loader.jar not found."
echo
echo "Please execute this 'run.sh' script from within the bin directory"
echo "by moving to the 'bin' directory and executing './run.sh'."
echo "If you obtained the source from CVS, build with the 'dist' target"
echo "then copy the JAMES zip or tar file to a working directory and unbundle
it."
exit 1
fi
if [ "$OSTYPE" = "cygwin32" ] ; then
CLASSPATHSEP=";"
else
CLASSPATHSEP=":"
fi
LOCAL_CLASSPATH="Loader.jar${CLASSPATHSEP}../lib/AvalonAware.jar${CLASSPATHSEP}.
./lib/xerces.jar${CLASSPATHSEP}../lib/mail_1_2.jar${CLASSPATHSEP}../lib/activati
on.jar"
$JAVA_HOME/bin/java -cp $CLASSPATH${CLASSPATHSEP}$LOCAL_CLASSPATH
org.apache.avalon.loader.Main $*
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: run.sh not supported under cygwin
Posted by Danny Angus <da...@thought.co.uk>.
thanks for the heads up, run.sh works fine on "real" *nix, but I will patch
it if your version tests ok there too.
d.
> -----Original Message-----
> From: Lucas Gonze [mailto:lucas@gonze.com]
> Sent: Saturday, January 26, 2002 4:47 PM
> To: James Users List
> Subject: bug: run.sh not supported under cygwin
>
>
> bin/run.sh doesn't work in a bash shell under cygwin. The error
> is that James
> jars are not being loaded properly. The cause is that run.sh
> always uses colon
> for the classpath separator, while Windows JVMs use semicolon for
> the classpath
> separator rather than colon. The following is a corrected run.sh
> to detect
> running under cygwin and use a new var CLASSPATHSEP to handle the
> condition.
> Tested under cygwin but no Unixen.
>
> =======
>
> #!/bin/sh
> echo
> echo "Avalon runner"
> echo
>
> if [ "$JAVA_HOME" = "" ] ; then
> echo "ERROR: JAVA_HOME not found in your environment."
> echo
> echo "Please, set the JAVA_HOME variable in your environment to
> match the"
> echo "location of the Java Virtual Machine you want to use."
> exit 1
> fi
>
> if [ ! -f Loader.jar ] ; then
> echo "ERROR: Loader.jar not found."
> echo
> echo "Please execute this 'run.sh' script from within the bin directory"
> echo "by moving to the 'bin' directory and executing './run.sh'."
> echo "If you obtained the source from CVS, build with the 'dist' target"
> echo "then copy the JAMES zip or tar file to a working
> directory and unbundle
> it."
> exit 1
> fi
>
> if [ "$OSTYPE" = "cygwin32" ] ; then
> CLASSPATHSEP=";"
> else
> CLASSPATHSEP=":"
> fi
>
> LOCAL_CLASSPATH="Loader.jar${CLASSPATHSEP}../lib/AvalonAware.jar${
> CLASSPATHSEP}.
> ./lib/xerces.jar${CLASSPATHSEP}../lib/mail_1_2.jar${CLASSPATHSEP}.
> ./lib/activati
> on.jar"
>
> $JAVA_HOME/bin/java -cp $CLASSPATH${CLASSPATHSEP}$LOCAL_CLASSPATH
> org.apache.avalon.loader.Main $*
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: resend doesn't work
Posted by Danny Angus <da...@thought.co.uk>.
We know that there is a problem if the error messages can't get sent 'cos
they too are pointed to non-local addresses, I'm not sure how this affects
your situation though.
d.
> -----Original Message-----
> From: Lucas Gonze [mailto:lucas@gonze.com]
> Sent: Saturday, January 26, 2002 5:39 PM
> To: James Users List
> Subject: bug: resend doesn't work
>
>
> [N.B.: As you can see from the recent flurry of messages, I just
> spent a few
> minutes writing a better bug report for the "takes forever" bug.
> The root cause
> was a user error on my part. However, there is a real James bug,
> as follows.]
>
> Bug summary:
> If the initial send of a message fails, the resend will never happen.
>
> Steps to reproduce:
> 1) Ensure that forwarding won't work. One way is to unset the DNS server
> setting in james.conf.xml.
> 2) Compose a user message and send it out via a James user
> account. The message
> forward will fail and the message will be left in the James
> outbound queue.
> 3) Fix forwarding. One way is to correct the DNS server setting in
> james.conf.xml and restart James.
> 4) The unsent message left in the outbound spool will not get sent.
>
> Comments:
> This bug might also be triggered if the machine hosting James had
> a temporary
> service disruption, such as a reboot or connectivity outage.
>
>
>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
bug: resend doesn't work
Posted by Lucas Gonze <lu...@gonze.com>.
[N.B.: As you can see from the recent flurry of messages, I just spent a few
minutes writing a better bug report for the "takes forever" bug. The root cause
was a user error on my part. However, there is a real James bug, as follows.]
Bug summary:
If the initial send of a message fails, the resend will never happen.
Steps to reproduce:
1) Ensure that forwarding won't work. One way is to unset the DNS server
setting in james.conf.xml.
2) Compose a user message and send it out via a James user account. The message
forward will fail and the message will be left in the James outbound queue.
3) Fix forwarding. One way is to correct the DNS server setting in
james.conf.xml and restart James.
4) The unsent message left in the outbound spool will not get sent.
Comments:
This bug might also be triggered if the machine hosting James had a temporary
service disruption, such as a reboot or connectivity outage.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>