Be advised that deploying on JBoss 5 has an issue in using jython scripts. 
I created a patch to fix the problem and submitted it to jython 
development to be implemented. That issue can be viewed at 
http://bugs.jython.org/issue1639.

In short, the problem is that JBoss 5 introduced the vfszip protocol for 
jar files which prefixes "SomeJarFileClass.class.getName()"  with 
"vfszip:" versus "jar:file:" (which happens in containers like Tomcat) and 
jython uses the latter string to obtain the jar filename in order to 
produce a classpath for jython. That classpath would point to the jar file 
for python modules, like re.py. When using a macro, like the code macro, 
you get the error, "ImportError: No module named re".

I made a personal fix by applying the patch to jython 2.5.1 source (the 
patch provided to jython maintainers is for version 2.5.2b1, but might 
work) and performed a build up to the point where the class 
PySystemState.class was created. I then did jar -uvf jython... 
org/python/core/PySystemState.class to update that one class. As a side 
effect of that command (I guess) I then also had to include jna-posix.jar 
from the extlibs directory of the jython distro. in xwiki's lib directory.

Let me know if you have questions by e-mailing directly (if that's an 
option). I may not be monitoring this list much longer. I just wanted to 
let people know about this.
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to