Issue1404

classification
Title: IllegalAccessException with Jython 2.2.1 and IBM JDK 6
Type: crash Severity: urgent
Components: Core Versions: 2.2.2
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: fwierzbicki Nosy List: fwierzbicki, kargu2, zyasoft
Priority: urgent Keywords:

Created on 2009-07-17.08:02:03 by kargu2, last changed 2010-09-20.19:47:11 by zyasoft.

Messages
msg4915 (view) Author: Karl Gustafsson (kargu2) Date: 2009-07-17.08:02:02
Calling iterator.hasNext() when iterating over a HashSet results in an
IllegalAccessError when running Jython 2.2.1 on IBM JDK 6 SR5 (32 bit
and 64 bit) on Linux. A short program to trigger the bug is pasted in below.

The same program is verified to work with Jython 2.2.1 on Sun JDK
1.6.0_14 and on IBM JDK 5 SR9-SSU.

The same program is verified to work with Jython 2.5.0 on all JDK:s above.

I.e: the bug seems only to affect Jython 2.2.1 and IBM JDK 6 SR5 (32 and
64 bit) on Linux.

Stack trace:
---
Traceback (innermost last):
  File "bug.py", line 8, in ?
	at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:77)
	at java.lang.reflect.Method.invoke(Method.java:590)

java.lang.IllegalAccessException: java.lang.IllegalAccessException:
Class org.python.core.PyReflectedFunction can not access a member of
class java.util.HashMap$AbstractMapIterator with modifiers "public"
---

Program to trigger the bug:
---
from java.lang import System
print System.getProperty("java.vendor")
from java.util import HashSet
s = HashSet()
s.add("a")
itr = s.iterator()
# Next line fails
itr.hasNext()
---
msg4918 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2009-07-19.14:11:53
Hi kargu2,

Does the same error occur on Jython 2.5.0? If it does it would be a
helpful data point (and would greatly increase the priority of this bug)
msg4921 (view) Author: Karl Gustafsson (kargu2) Date: 2009-07-19.16:12:44
Hi,

No, it does not occur on Jython 2.5.0. I tested the same program on the
same JDK:s, and it worked.
msg4922 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2009-07-19.16:30:26
Thanks for the update re: 2.5.0 -- I'm going to put together a 2.2.2 in
the relatively near future -- this sounds like a blocker issue for that
release.  Do you happen to know anyone at IBM that is involved with
Jython?  I understand that WebSphere's admin scripting language is
Jython, and I had heard it was on Jython 2.2 -- maybe they have a fix?
msg4923 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2009-07-19.16:32:05
I've marked this issue as urgent -- though it is not a problem for 2.5.
 It is urgent for the upcoming 2.2.2 release.
msg4924 (view) Author: Karl Gustafsson (kargu2) Date: 2009-07-19.16:35:45
No, unfortunately not. I don't know anyone at IBM.
msg6080 (view) Author: Jim Baker (zyasoft) Date: 2010-09-20.19:37:45
2.2.x is no longer under active development. Please switch to 2.5.x.
msg6082 (view) Author: Jim Baker (zyasoft) Date: 2010-09-20.19:47:11
Please see my recent blog post, which describes dev plans:
http://zyasoft.com/pythoneering/2010/09/jython-2.5.2-beta-2-is-released/
History
Date User Action Args
2010-09-20 19:47:11zyasoftsetmessages: + msg6082
2010-09-20 19:37:45zyasoftsetstatus: open -> closed
resolution: accepted -> wont fix
messages: + msg6080
nosy: + zyasoft
2009-07-19 16:35:45kargu2setmessages: + msg4924
2009-07-19 16:32:05fwierzbickisetpriority: urgent
assignee: fwierzbicki
messages: + msg4923
resolution: accepted
severity: normal -> urgent
2009-07-19 16:30:26fwierzbickisetmessages: + msg4922
2009-07-19 16:12:44kargu2setmessages: + msg4921
2009-07-19 14:11:54fwierzbickisetmessages: + msg4918
2009-07-19 14:09:40fwierzbickisetnosy: + fwierzbicki
2009-07-17 08:02:03kargu2create