Forums
| Avoid “*sys-package-mgr*: can’t create package cache dir” errors in WLST |
|
|
|
| Written by Schelstraete Bart | |||||
| Friday, 13 November 2009 21:28 | |||||
|
While starting WLST, you might have seen this annoying error message,
When Jython initializes it scans all the jar files it can find at startup to build the package and class structure available to the JVM. This information is written to files in a directory named ‘cachedir’, WLST chooses your ‘java.io.tmpdir’ to store these files. There is a problem with this approach especially on Unix machines. Problem: Most Unix machines are shared across a number of users. Say “user1″ first logs into the machine and fired up ‘java weblogic.WLST’, Jython will create the ‘cachedir’ under ‘/var/tmp/’ and this directory will be owned by ‘user1′. This user will have no problems using WLST. Now ‘user2′ logs in and fires up WLST, this process will try to write to the same directory, ‘/var/tmp/cachedir’ which is now owned by ‘user1′ and hence fails with the above error message. Solution: There is a pretty simple and straight forward solution to this problem. Jython supports a System property (python.cachedir) that you can set which will determine the directory where this ‘cachedir’ is created. So in our case to start WLST you will use, This will create the cachedir under /tmp/$USER, and this way all users can have their own cachedir’s without running into each other.
Only registered users can write comments!
!joomlacomment 4.0 Copyright (C) 2009 Compojoom.com . All rights reserved." |


