From: dman <ds...@ri...> - 2001-11-02 19:53:41
|
On Fri, Nov 02, 2001 at 03:50:12PM +0000, Finn Bock wrote: | [dman] | > // This line prints out | > // org.python.proxies.PMS.Folder$Folder$2 | > System.out.println( folder.getClass() ) ; | | The strange classname comes from the dynamic proxy generation. Verify if jythonc | created a java class for the Folder class. You check that in the stdout from | jythonc where there should be a line like: I have now identified the source of the problem and I think it is a bug in jython/jythonc. Kevin tried out the code I had posted, and showed me that it worked for him. I then tried it in a separate directory with just the 3 python and 1 java class, and it worked for me. He suggested that maybe the wrong "Folder" class was being found, and it seemed probable. I renamed the class, and even cut down the app to just the 3 python classes (with all implementation commented out) and a new java class containing only a bare minimum main(). Nothing would work. I then took the minimal sample that did work and put 2 of the python classes (the parent and child class) into a python package. It failed the same way my project has been failing. My conclusion is that jython does not correctly convert to a native java object an instance of a class that is in a python package. I'm wondering if telling jythonc to put all the classes into a java package would make any difference, but I'll just remove the python package for now. -D |