Issue425015

classification
Title: Jythonc duplicate entry error with --all
Type: Severity: normal
Components: Jythonc compiler Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: pedronis Nosy List: pedronis, tlau
Priority: normal Keywords: test failure causes

Created on 2001-05-17.23:45:52 by tlau, last changed 2001-06-27.13:52:42 by pedronis.

Messages
msg306 (view) Author: Tessa Lau (tlau) Date: 2001-05-17.23:45:52
I'm compiling a test program that uses eval() to 
dynamically look up a class method.  I'm using Jython
2.0 on Linux with Sun JDK 1.3.0_01.  Here's the code:

<pre>
class Tlau(JApplet):
        def init(self):
                b = JButton('press me',
actionPerformed=self.foo)
                self.contentPane.add(b)

        def foo(self, event):
                print 'Foo!'
                barmethod = eval('self.bar')
                barmethod(event)

        def bar(self, event):
                print 'Bar!'
</pre>

If I then compile this with "jythonc --core --deep
--jar tlau.jar Tlau.py", and run the resulting jar file
with "java -jar tlau.jar", I get the error:

java.lang.NoClassDefFoundError: org/python/core/parser
        at org.python.core.Py.compile(Py.java:1422)
        at
org.python.core.__builtin__.compile(__builtin__.java:203)
        at
org.python.core.__builtin__.eval(__builtin__.java:252)
        at
org.python.core.__builtin__.eval(__builtin__.java:266)
        at java.lang.reflect.Method.invoke(Native
Method)
(etc.)

So I believe that to include the parser class I need to
use the --all flag to jythonc.  I try the same command,
adding --all, and jythonc bombs with this error:

Tracking java dependencies:
Traceback (innermost last):
  File
"/scratch/tlau/jython-2.0/Tools/jythonc/jythonc.py",
line 5, in ?
  File
"/scratch/tlau/jython-2.0/Tools/jythonc/main.py", line
301, in main
  File
"/scratch/tlau/jython-2.0/Tools/jythonc/main.py", line
294, in writeResults
  File "/scratch/tlau/jython-2.0/Tools/jythonc/jar.py",
line 98, in dump
  File "/scratch/tlau/jython-2.0/Tools/jythonc/jar.py",
line 92, in dumpFiles
  File "/scratch/tlau/jython-2.0/Tools/jythonc/jar.py",
line 111, in addPackage
java.util.zip.ZipException: duplicate entry:
org/python/core/StderrWrapper.class
msg307 (view) Author: Samuele Pedroni (pedronis) Date: 2001-06-27.13:52:13
Logged In: YES 
user_id=61408

Problem was triggered when both --all and --core
were specified.
msg308 (view) Author: Samuele Pedroni (pedronis) Date: 2001-06-27.13:52:42
Logged In: YES 
user_id=61408

& close.
History
Date User Action Args
2001-05-17 23:45:52tlaucreate