Issue1055

classification
Title: Java 1.06 update 6 Doesn't stor __file__ in jar packages
Type: Severity: normal
Components: Core Versions: Jython 2.2
Milestone:
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: fwierzbicki, pzack, zyasoft
Priority: normal Keywords:

Created on 2008-06-13.19:21:05 by pzack, last changed 2014-06-19.05:02:45 by zyasoft.

Messages
msg3280 (view) Author: Zack Thunemann (pzack) Date: 2008-06-13.19:21:04
I'm running Windows XP
Jython version 2.2.2 
When I use Java 6.0 update 5 everything is fine
When I use Java 6.0 update 6, I get this error:

error importing site
Traceback (innermost last):
  File "C:\home\dev\lib\Lib\site.py", line 73, in ?
  File "C:\home\dev\lib\Lib\site.py", line 63, in makepath
  File "C:\home\dev\lib\Lib\javapath.py", line 110, in join
  File "C:\home\dev\lib\Lib\javapath.py", line 27, in _tostr
TypeError: join() argument must be a str or unicode object, not
'NoneType' object




This appears to be a failure of Jar files to keep track of their own
__file__ names (They are set to null).  

I was able to find a fix by modifying PyJavaPackage.java

Here is the original Java code (Note the comment in the code! Did this
change in update 6?):

            // this code is ok here, because this is not needed for
            // a top level package
            if (jarfile == null || !jarfile.equals(p.__file__))
        	p.__file__ = null;


Here is my work around:
            // this code is ok here, because this is not needed for
            // a top level package
            if (jarfile == null || !jarfile.equals(p.__file__))
        	p.__file__ = jarfile;

Has anyone else used update 6?  Is there an easy work around?
msg7826 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2013-02-27.00:36:05
Hey Zach, I'm going through older bugs, sorry that yours was missed. Is this still a problem for you?
msg8707 (view) Author: Jim Baker (zyasoft) Date: 2014-06-19.05:02:45
I don't think we can support Java 6 (or Windows XP) at this time, so closing this out.
History
Date User Action Args
2014-06-19 05:02:45zyasoftsetstatus: open -> closed
resolution: out of date
messages: + msg8707
nosy: + zyasoft
2013-02-27 00:36:06fwierzbickisetmessages: + msg7826
2013-02-19 18:26:00fwierzbickisetnosy: + fwierzbicki
versions: + Jython 2.2, - 2.2.2
2008-12-17 19:51:13fwierzbickisetpriority: normal
2008-06-13 19:21:05pzackcreate