diff --git a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis index 9d4aeba6e7..7816bf83eb 100755 --- a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis +++ b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis @@ -57,6 +57,16 @@ if [ -z "$ARTEMIS_PROFILE" ] ; then fi fi +if ! test -f "$ARTEMIS_INSTANCE_ETC/${ARTEMIS_PROFILE}"; then + echo "********************************************************************************" + echo Error: "$ARTEMIS_INSTANCE_ETC/${ARTEMIS_PROFILE}" does not exist. + echo + echo "This file should have been created as part of you upgrading from a previous version" + echo "Please use 'artemis upgrade' or make sure you create the file." + echo "********************************************************************************" + exit 1 +fi + . "$ARTEMIS_INSTANCE_ETC/${ARTEMIS_PROFILE}" diff --git a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis.cmd b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis.cmd index e9163a041d..cb10d5a4f6 100644 --- a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis.cmd +++ b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis.cmd @@ -52,6 +52,17 @@ set ARTEMIS_PROFILE=artemis-utility.profile.cmd if "%1"=="run" set ARTEMIS_PROFILE=artemis.profile.cmd :LOAD_ARTEMIS_PROFILE + +IF NOT EXIST %ARTEMIS_INSTANCE_ETC%\%ARTEMIS_PROFILE% ( + echo ******************************************************************************** + echo Error: %ARTEMIS_INSTANCE_ETC%\%ARTEMIS_PROFILE% does not exist. + echo. + echo This file should have been created as part of you upgrading from a previous version + echo Please use 'artemis upgrade' or make sure you create the file. + echo ******************************************************************************** + exit /b 1 +) + call %ARTEMIS_INSTANCE_ETC%\%ARTEMIS_PROFILE% %* if not exist %ARTEMIS_OOME_DUMP% goto NO_ARTEMIS_OOME_DUMP