Cool - thanks for the feedback!
On 11/2/07, Balaji Srinivasan <balajione@...> wrote:
> Thanks a lot Oti. That really worked. I updated to 2.2.1 and removed
> the hack below and it seems to work now.
> On Oct 30, 2007, at 1:22 PM, Oti wrote:
> > Balaji,
> > I assume you are using Jython 2.1 with Java 1.5.
> > The fix you mentioned is really a workaround, and I suspect there are
> > other unresolved problems when using the above combination.
> > I'd suggest to upgrade to Jython 2.2., or even 2.2.1
> > Best wishes,
> > Oti.
> > On 10/30/07, Balaji Srinivasan <balajione@...> wrote:
> >> Hi There
> >> We are using Jython in a JBoss appserver. When we ported over to Java
> >> 1.5 we started getting errors liek:
> >>> Traceback (innermost last):
> >>> File "<console>", line 1, in ?
> >>> java.lang.IllegalAccessException: Class
> >>> org.python.core.PyReflectedFunction can not access a member of class
> >>> java.lang.AbstractStringBuilder with modifiers "public"
> >> The following URL
> >> http://aspn.activestate.com/ASPN/Mail/Message/Jython-users/2191110
> >> gave the following fix:
> >> import java
> >> import org.python.core
> >> import java.lang.StringBuffer as SB
> >> for n,f in java.lang.AbstractStringBuilder.__dict__.items():
> >> x = org.python.core.PyReflectedFunction(n)
> >> for a in f.argslist:
> >> if a is None: continue
> >> m = SB.getMethod(n,a.args)
> >> x.addMethod(m)
> >> SB.__dict__[n] = x
> >> Now I evaluate this code every time I create a new interpreter.
> >> Unfortunately now occassionally I am getting errors like:
> >> java.lang.NoSuchMethodException:
> >> java.lang.StringBuffer.deleteCharAt(int, int)
> >> at java.lang.Class.getMethod(Class.java:1581)
> >> at sun.reflect.GeneratedMethodAccessor345.invoke(Unknown
> >> Source)
> >> at
> >> sun
> >> .reflect
> >> .DelegatingMethodAccessorImpl
> >> .invoke(DelegatingMethodAccessorImpl.java:25)
> >> at java.lang.reflect.Method.invoke(Method.java:585)
> >> at
> >> org
> >> .python.core.PyReflectedFunction.__call__(PyReflectedFunction.java)
> >> at org.python.core.PyMethod.__call__(PyMethod.java)
> >> at org.python.core.PyObject.__call__(PyObject.java)
> >> This happens on the getMethod line in the script fragment above.
> >> Surprisingly it doesnt happen every time. Just very infrequently.
> >> Any ideas why this might be happening? Please let me know if you need
> >> more details.
> >> Any help would be appreciated.
> >> Balaji
> >> -------------------------------------------------------------------------
> >> This SF.net email is sponsored by: Splunk Inc.
> >> Still grepping through log files to find problems? Stop.
> >> Now Search log events and configuration files using AJAX and a
> >> browser.
> >> Download your FREE copy of Splunk now >> http://get.splunk.com/
> >> _______________________________________________
> >> Jython-users mailing list
> >> Jython-users@...
> >> https://lists.sourceforge.net/lists/listinfo/jython-users