You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by agrabil <gr...@bt.com> on 2015/07/31 20:59:57 UTC

ACTIVEMQ_CLASSPATH

Hello,
ActiveMQ 5.8.0 has been running in our environment (RHEL 5.0) for many
years.  We have a wrapper script that sets up some environment variables
before launching ActiveMQ, including setting ACTIVEMQ_CLASSPATH to allow our
SSL classes to find and load our keystores.  Although we are running on
Linux, I found that I needed to set the ACTIVEMQ_CLASSPATH using
Windows-style class pathSeparator.  That is:

ACTIVEMQ_CLASSPATH="$MYHOME;$MYHOME/classes;$MYHOME/classes/mycompany.jar";
export ACTIVEMQ_CLASSPATH

Instead of:
ACTIVEMQ_CLASSPATH="$MYHOME:$MYHOME/classes:$MYHOME/classes/mycompany.jar";
export ACTIVEMQ_CLASSPATH

If I used the Unix-style pathSeparator, then ActiveMQ would fail to start
because it could not find my classes in mycompany.jar file, but with the
Windows-style pathSeparator, it works, even though it is running on Linux!

Flash forward to today when I am experimenting with ActiveMQ 5.11.1 upgrade. 
Suddenly the broker won't start because it can't find my properties files
that are in the classpath.  I traced it back to this change in the
'bin/activemq' script in the distribution.

ActiveMQ 5.8.0 implementation (in fact this is true thru 5.10.2):
ACTIVEMQ_CLASSPATH="${ACTIVEMQ_CONF};${ACTIVEMQ_CLASSPATH}"

Notice the Windows-style pathSeparator.  This works perfectly.

However, beginning with ActiveMQ 5.11.0, the above line looks like:

ACTIVEMQ_CLASSPATH="${ACTIVEMQ_CONF}:${ACTIVEMQ_CLASSPATH}"

Here it has been "fixed" to use the Unix-style separator, but this actually
breaks it!  If I change this one thing back to ";", then all is well again.

Has anyone else seen this problem?  Why does ActiveMQ want Windows style
pathSeparator on Linux?  Should I file a bug?

Thanks,
Greg Rabil



--
View this message in context: http://activemq.2283324.n4.nabble.com/ACTIVEMQ-CLASSPATH-tp4700210.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ACTIVEMQ_CLASSPATH

Posted by Tim Bain <tb...@alumni.duke.edu>.
Yes, file a bug requesting that Unix-style separators be the only one
accepted in Unix-like OSes.  Java classpath are supposed to use the local
OS separator; if we're not doing that, we're doing it wrong (and the result
is broken behavior when someone tries to follow the standard convention and
we don't respect it, as you found).

Tim
On Jul 31, 2015 5:28 PM, "agrabil" <gr...@bt.com> wrote:

> Hello,
> ActiveMQ 5.8.0 has been running in our environment (RHEL 5.0) for many
> years.  We have a wrapper script that sets up some environment variables
> before launching ActiveMQ, including setting ACTIVEMQ_CLASSPATH to allow
> our
> SSL classes to find and load our keystores.  Although we are running on
> Linux, I found that I needed to set the ACTIVEMQ_CLASSPATH using
> Windows-style class pathSeparator.  That is:
>
> ACTIVEMQ_CLASSPATH="$MYHOME;$MYHOME/classes;$MYHOME/classes/mycompany.jar";
> export ACTIVEMQ_CLASSPATH
>
> Instead of:
> ACTIVEMQ_CLASSPATH="$MYHOME:$MYHOME/classes:$MYHOME/classes/mycompany.jar";
> export ACTIVEMQ_CLASSPATH
>
> If I used the Unix-style pathSeparator, then ActiveMQ would fail to start
> because it could not find my classes in mycompany.jar file, but with the
> Windows-style pathSeparator, it works, even though it is running on Linux!
>
> Flash forward to today when I am experimenting with ActiveMQ 5.11.1
> upgrade.
> Suddenly the broker won't start because it can't find my properties files
> that are in the classpath.  I traced it back to this change in the
> 'bin/activemq' script in the distribution.
>
> ActiveMQ 5.8.0 implementation (in fact this is true thru 5.10.2):
> ACTIVEMQ_CLASSPATH="${ACTIVEMQ_CONF};${ACTIVEMQ_CLASSPATH}"
>
> Notice the Windows-style pathSeparator.  This works perfectly.
>
> However, beginning with ActiveMQ 5.11.0, the above line looks like:
>
> ACTIVEMQ_CLASSPATH="${ACTIVEMQ_CONF}:${ACTIVEMQ_CLASSPATH}"
>
> Here it has been "fixed" to use the Unix-style separator, but this actually
> breaks it!  If I change this one thing back to ";", then all is well again.
>
> Has anyone else seen this problem?  Why does ActiveMQ want Windows style
> pathSeparator on Linux?  Should I file a bug?
>
> Thanks,
> Greg Rabil
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ACTIVEMQ-CLASSPATH-tp4700210.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: ACTIVEMQ_CLASSPATH

Posted by agrabil <gr...@bt.com>.
Thank you.  I've created AMQ-5913 for this issue.

Regards,
Greg



--
View this message in context: http://activemq.2283324.n4.nabble.com/ACTIVEMQ-CLASSPATH-tp4700210p4700343.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.