Message4760

Author amylin
Recipients amylin
Date 2009-05-29.20:19:53
SpamBayes Score 2.0095037e-14
Marked as misclassified No
Message-id <1243628395.21.0.692155261756.issue1360@psf.upfronthosting.co.za>
In-reply-to
Content
Does jython require the write permission on jython.jar and library 
modules?

We are using Jython 2.1 in WebSphere Application Server version 6.1.  
The jython.jar is located in 
WebSphere/AppServer/optionalLibraries/jython directory.  The user is 
not able to run jython script (import sys) using WebSphere wsadmin 
tool when the permission is set R/O (readonly) 
on /optionalLibraries/jython folder and subfolders.  

The user got the error from BSFManager: unable to load language: 
jython 

WASX7022E: Problem running command "import sys" -- exception 
   information: com.ibm.bsf.BSFException: unable to load language: 
jython 

It works fine after changed the permission from R/O to RW.

The WebSphere is installed on z/Linux in a shared-binary environment 
and all the binaries common to WebSphere including jython.jar (and 
other open source binaries such as jacl.jar) are mounted on a separate 
disk in a read only fashion.  They are not able to run jython command 
(Jacl is fine) until they change the jython.jar folder to RW.

We know that jython 2.1 needs to create the cachedir (write *pkc files 
for each jar it loads) in python.home during initialization.  We have 
redirected python.cachedir to a writable /temp directory, so cachedir 
will not be created on /optionalLibraries/jython folder.  However, it 
doesn't help and user is still seeing the same error with R/O 
permission.  We wonder that jython needs write access to jython.jar in 
addition to create cachedir (*pkc files) in python.home.

Another example: 

We import a jython library module such as javaos (jython library 
modules are located in python.home/Lib directory) and execute os 
function in wsadmin tool.  We see javaos$py.class is created from 
python compilation at the same location of javaos.py 
on /optionalLibraries/jython/Lib.  If we like to set jython library 
module folder to RX only, is there any way (option or fix) that we can 
redirect the compiled class file to be generated in other writable 
location?  

We like to change all WebSphere binaries to RX instead of RWX to avoid 
any exposure and we like to know if jython code requires to write 
something on jython.jar and if this is a bug in Jython 2.1.
History
Date User Action Args
2009-05-29 20:19:55amylinsetrecipients: + amylin
2009-05-29 20:19:55amylinsetmessageid: <1243628395.21.0.692155261756.issue1360@psf.upfronthosting.co.za>
2009-05-29 20:19:55amylinlinkissue1360 messages
2009-05-29 20:19:53amylincreate