How to overcome issues while Installing/upgrading Artifactory in Windows with namespacing.

How to overcome issues while Installing/upgrading Artifactory in Windows with namespacing.

AuthorFullName__c
Janardhana JL
articleNumber
000004858
ft:sourceType
Salesforce
FirstPublishedDate
2020-08-27T13:19:22Z
lastModifiedDate
2024-03-10T07:45:23Z
VersionNumber
6

Scenarios and Solutions for Overcoming Windows Namespacing Issues During Artifactory Installation/Upgrade

Scenario 1:

Artifactory is installed in the D:Program Files folder. While running an Artifactory.bat file, you encounter the Could not find or load main class Files\artifactory\bin\.. error.
User-added image

Solution:

By default, when creating folders, Windows offers a shortname (aka shortpath) feature. Therefore, make sure there are no spaces in the names you give to folders in an environment variable. If there is a space with an environment variable, it will cause a failure while running an artifactory.bat during a fresh installation or while using a migrate.bat script during an Artifactory upgrade. Therefore, when configuring ARTIFACTORY_HOME and JFROG_HOME variables, you should always be sure to use Windows the shortname feature.

For example:

For a Windows 64-bit system, configure the environment variable as follows:

Progra~3 = 'Program Files'
Progra~4 = 'Program Files(x86)'

The screenshot below shows you where the environment variable should be configured. Note: In the illustration, Windows shortname has been employed to execute the referenced change.

User-added image
User-added image

Click OK and Apply Changes as prompted.

Note: Any command windows that were open while you were making changes to environment variables will need to be closed and reopened before your changes can take effect. After doing so, if the changes haven't taken effect, try restarting your Windows machine.

Once a shortname has been configured for a folder or a directory, you'll be able to run an artifactory.bat script successfully.

User-added image
Scenario 2:

You may be unable to use Windows' shortname feature because it has been disabled. Accordingly, you might receive the error message: The system cannot find the path specified.

User-added image

Solution:

Manually create a shortname for your folder/directory using the following commands, all of which should be run in administrative mode.

1. Run:
fsutil 8dot3name query

If you receive this response: Registry state is 0, then the shortname feature has been enabled. If you receive this response: Registry state is 1, then the shortname feature has been disabled. If it has been disabled, then you'll need to enable it before you can create a shortname.

2. To enable the shortname feature, use the following command:
fsutil behavior set disable8dot3 0
3. Thereafter, to create a shortname for a folder, you'll need to use the following command:
fsutil file setshortname <Path> <Shortname>

For example:

fsutil file setshortname “D:\Program Files” Progra~3
4. Create a listing using dir /x. Thereafter, you’ll see the shortname of your folder.

5. Once your shortname has been set, you may return the shortname feature to its prior, disabled status by using the following command:
fsutil behavior set disable8dot3 1
User-added image

6. Per the shortname you've created, configure your environment variable and close the command prompt and reopen it.

7. Any command windows that were open while you were making changes to environment variables will need to be closed and reopened before your changes can take effect. After doing so, if the changes haven't taken effect, try restarting your Windows machine.

8. Run the artifactiory.bat script.