Dear Diego,

Sounds like a Linux permission issue ..

The easiest way to fix it is to add a write permission:  chmod a+w /usr/local/bin/jython2.5.1/cachedir/packages
Its where Jython use to de decompress the jar package files.


Regards,
Claude


Claude Falbriard
Certified IT Specialist L2 - Middleware
AMS Hortolāndia / SP - Brazil
phone:    +55 13 9760 0453
cell:         +55 13 8117 3316
e-mail:    claudef@br.ibm.com




From:        Diego Jesus <diego.a.r.jz@gmail.com>
To:        jython-users@lists.sourceforge.net
Date:        24/10/2011 14:01
Subject:        [Jython-users] Problem extending abstract method




Hi!

I'm having a bit of a trouble extending a java class with abstract
methods. Whenever I call them from jython I get a
java.lang.AbstractMethodError.

Here's my java code:

public abstract class CEInterface {


    public CEInterface() {

        System.out.println("CEInterface()");
    }

    public CEInterface(int port){

        System.out.println("CEInterface("+port+")");
    }

    public void run(){
        m();
    }

    abstract void m();
}

and here's my Jython code:

import sys

sys.path.append('../bin')
from diss.ceInterface import *

class CEInterfaceJython(CEInterface):

         def __init__(self):
                CEInterface.__init__(self)

         def m():
                 print("m")

 def main():
         interface = CEInterfaceJython()
         interface.run()

 if __name__ == '__main__':
         main()


if I run it like this:

jython CEInterfaceJython.py

I get:

*sys-package-mgr*: can't create package cache dir,
'/usr/local/bin/jython2.5.1/cachedir/packages'
CEInterface()
Traceback (most recent call last):
  File "CEInterfaceJython.py", line 20, in <module>
    main()
  File "CEInterfaceJython.py", line 17, in main
    interface.run()
    at diss.ceInterface.CEInterface.run(CEInterface.java:21)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)

java.lang.AbstractMethodError: java.lang.AbstractMethodError:
diss.ceInterface.CEInterface.m()V

What's wrong with my code?

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Jython-users mailing list
Jython-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users