Skip to content

Jetty/Artifactory on Vista

I have been using Artifactory on Windows XP for a while and tried to install it as a service on my Vista PC at home. Artifactory does take a lot of the pain out of dealing with Maven repo’s and I highly recommend using it.

On XP I use the Jetty service wrapper (based on http://wrapper.tanukisoftware.org/) and it all worked perfectly. However on Vista I had a range of odd problems

Firstly Jetty can’t find its temp working folders and then secondly Artifactory complains it can’t open its content repo.

INFO | jvm 1 | 2007/07/14 08:49:05 | Caused by: org.apache.jackrabbit.core.fs.FileSystemException: failed to open output stream to file: /meta/rep.properties
INFO | jvm 1 | 2007/07/14 08:49:05 | at org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.getOutputStream(DatabaseFileSystem.java:780)
INFO | jvm 1 | 2007/07/14 08:49:05 | at org.apache.jackrabbit.core.fs.BasedFileSystem.getOutputStream(BasedFileSystem.java:135)
INFO | jvm 1 | 2007/07/14 08:49:05 | at org.apache.jackrabbit.core.fs.FileSystemResource.getOutputStream(FileSystemResource.java:179)
INFO | jvm 1 | 2007/07/14 08:49:05 | at org.apache.jackrabbit.core.RepositoryImpl.storeRepProps(RepositoryImpl.java:1146)
INFO | jvm 1 | 2007/07/14 08:49:05 | ... 40 more
INFO | jvm 1 | 2007/07/14 08:49:05 | Caused by: java.io.IOException: The system cannot find the path specified
INFO | jvm 1 | 2007/07/14 08:49:05 | at java.io.WinNTFileSystem.createFileExclusively(Native Method)
INFO | jvm 1 | 2007/07/14 08:49:05 | at java.io.File.checkAndCreate(Unknown Source)
INFO | jvm 1 | 2007/07/14 08:49:05 | at java.io.File.createTempFile(Unknown Source)
INFO | jvm 1 | 2007/07/14 08:49:05 | at org.apache.jackrabbit.util.TransientFileFactory.createTransientFile(TransientFileFactory.java:124)
INFO | jvm 1 | 2007/07/14 08:49:05 | at org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.getOutputStream(DatabaseFileSystem.java:729)
INFO | jvm 1 | 2007/07/14 08:49:05 | ... 43 more

This is caused by file permissions on the Artifactory service. On vista services run under the Local Service account which does have file permissions by default and Jetty doesn’t seem to be able to find a temp dir. So if you create a new account and let jetty run under that it all works.

Post a Comment

You must be logged in to post a comment.