lucene-pylucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ludovico Cavedon <>
Subject Re: JCC on HtmlUnit
Date Thu, 18 Jun 2009 23:55:05 GMT
Andi Vajda wrote:
> On Wed, 17 Jun 2009, Ludovico Cavedon wrote:
>> * If I get an error
>> jcc.cpp.JavaError: java.lang.ExceptionInInitializerError
>> I actually added a "print className" to understand which class was
>> causing the error

In JCCEnv.cpp I had to decomment the
	if (!env->handlers)
in order to execute
and see the java backtrace. I think it would be useful to print it by

It would also be usefult to print the class name in case of exception,
see attached patch.

>> * org.mozilla.javascript.SecureCaller and
>> cause a
>> jcc.cpp.JavaError: java.lang.ExceptionInInitializerError
>> If I use --exclude it does not work either, because findClass() is
>> called anyway and it will trigger the exception
>> My workaround was by skipping the classes in the code. I could
>> not understand why the though that exception...
> It could be that the class could not be loaded because of some native
> code required by the class in a shared library that was not found. This
> would need to be fixed by adding yet another command line flag that adds
> to the initVM() call in a java.lib.path to use with the VM.

For the com.jacob.activeX.ActiveXComponent you were right, it is failing
because of a  java.lang.ClassNotFoundException.

About the net.sourceforge.htmlunit.corejs.javascript.SecureCaller class
something more weird is going on; I am posting the exception here, in
case someone has a clue of what is going on :)
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.lang.NullPointerException
	at Method)

>> * org.mozilla.javascript.ScriptableObject defined constants like:
>> static int READONLY
>> However the file /usr/include/python2.6/structmember.h contains:
>> #define READONLY        1
> You can add that word as a reserved word using the --reserved flag. Or,
> you can edit the RESERVED list in and add that word to it for good.

Ah, I missed that RESERED list (and --resevred was also on the help  :(
Worked thanks!

There is a bunch of #define coming from


I think it would useful to add them to the RESERVED list by default.
I am getting conflicts with READONLY and all T_* at least

I have another problem I forgot to mention; i get this gcc error:
/var/lib/python-support/python2.6/jcc/sources/functions.h: In function
‘PyObject* get_iterator_next(T*) [with T = java::util::t_Iterator, U =
:t_HtmlTableCell, V =
build/_htmlunit/__wrap__.cpp:112089:   instantiated from here
/var/lib/python-support/python2.6/jcc/sources/functions.h:116: error: no
match for ‘operator=’ in ‘next = java::util::Iterator::next() const()’
note: candidates are:

where build/_htmlunit/__wrap__.cpp:112089:
DECLARE_TYPE(HtmlTableRow$CellIterator, t_HtmlTableRow$CellIterator,
java::lang::Object, HtmlTableRow$CellIterator,
t_HtmlTableRow$CellIterator_init_, PyObject_SelfIter, ((PyObject
*(*)(java::util::t_Iterator *))
0, 0, 0);

Looks like it is doing wrong with HtmlTableRow.CellIterator:

Thank you for your help,

View raw message