Message5946
Symptom:
Deploying a web app in JBoss 5.x (and later, I think), the classpath is ['__classpath__', '__pyclasspath__/'] but it should also contain $JBOSS_HOME/{DEPLOYMENT}/WEB-INF/lib/Lib and $JBOSS_HOME/{DEPLOYMENT}/WEB-INF/lib/jython.jar/Lib. Therefore, one is unable to import any libraries and one receives the error: "ImportError: No module named ..."
Reason for the error:
JBoss 5.x introduces the vfszip protocol for jar files. org.python.core.PySystemState uses the jar:file protocol name in an attempt to parse a string that contains the jar filename out of a string that looks like "jar:file:/some/path/jython.jar!/org/python/core/PySystemState.class" in other containers. JBoss returns "vfszip:/some/path/jython.jar/org/python/core/PySystemState.class". Note the missing "!" and the protocol name is different.
The fix:
The fix is to also test for the vfszip: string and parse the resulting string in a way that extracts the jar filename. A patch for 2.5.2b1 is attached.
Additional Note:
It looks like JBoss is staying with vfszip, so this issue is not likely confined to version 5. The issue was originally spotted in Jython version 2.5.1, so that is a confirmed affected version as well. |
|
Date |
User |
Action |
Args |
2010-08-09 14:14:40 | elentz | set | recipients:
+ elentz |
2010-08-09 14:14:40 | elentz | set | messageid: <1281363280.11.0.608675612498.issue1639@psf.upfronthosting.co.za> |
2010-08-09 14:14:39 | elentz | link | issue1639 messages |
2010-08-09 14:14:38 | elentz | create | |
|