Hi Andi,

On Thu, Aug 4, 2011 at 18:37, Andi Vajda <va...@apache.org> wrote:
> I took another look at this and it seems that the problem could stem from
> another issue: jcc is generating wrappers for methods declared on interfaces
> that are declared as implemented by a class regardless of whether the method
> is, in fact, implemented by the class.

You're right! I applied your patch to JCC trunk and it worked without
problems. Thank you! So, gentyref is unnecessary after all.

By the way, I discovered some other issues while using JCC in my project:

1) In __init__.py of generated code, you set a CLASSPATH variable, but
then you don't use it anywhere. When I added gentyref.jar to the
classpath, I was getting ClassDefNotFound errors. Somehow, your
"classes" dir is found anyway without it. My solution: import
CLASSPATH from jcc and use env._addClassPath(CLASSPATH) after
initialising Java VM. I'm not certain that this is the perfect
solution, but it worked for me.

2) I needed to use one class from Tika that was not public. I know
that I could just modify Tika to make the class public, but I think
sometimes you don't have access to library source code and want to use
it anyway. I made a small modification so that if you explicitly enter
the class name (not the jar containing it) as one of JCC arguments, it
is exposed even if it's not public.

3) you're mixing tabs and spaces in several places in Python code.

I've attached a patch file with these changes. If you feel that any of
them might improve JCC, please add them.

Thanks again for your help!
-- 
Łukasz Jancewicz

Reply via email to