Quantcast

Deploying on JBoss 5+

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Deploying on JBoss 5+

Eric Lentz
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
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deploying on JBoss 5+

Sergiu Dumitriu-2
On 08/09/2010 08:34 PM, Eric Lentz wrote:

> 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.

Thank you very much for digging into the problem and for letting us know
about it.

--
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deploying on JBoss 5+

Thomas Mortagne
Administrator
In reply to this post by Eric Lentz
Great you found this !

On Mon, Aug 9, 2010 at 20:34, Eric Lentz <[hidden email]> wrote:

> 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
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs
>



--
Thomas Mortagne
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Loading...