[pylucene-dev] jcc with HBase ExceptionInInitializerError

Andi Vajda vajda at osafoundation.org
Fri Jan 23 17:42:31 PST 2009

Wesley Chow said:

> I'm playing with jcc, and I've been able to generate C++ interfaces
> for some trivial Java sources. When I try my hand at generating
> interfaces for HBase, though, I get some errors. My knowledge of Java
> is as good as the last time I developed in it, which was circa version
> 1.2, ie basically worthless.
> My output:
> python -m jcc --jar hbase-0.18.1.jar --include lib/hadoop-0.18.1-
> core.jar --include lib/commons-logging-1.0.4.jar
> finding class org.apache.hadoop.hbase.client.ScannerCallable
> finding class org.apache.hadoop.hbase.ipc.HMasterRegionInterface
> finding class org.apache.hadoop.hbase.regionserver.HStoreFile$Range
> finding class org.apache.hadoop.hbase.mapred.IndexConfiguration
> Traceback (most recent call last):
>    File "/usr/lib/python2.5/runpy.py", line 95, in run_module
>      filename, loader, alter_sys)
>    File "/usr/lib/python2.5/runpy.py", line 52, in _run_module_code
>      mod_name, mod_fname, mod_loader)
>    File "/usr/lib/python2.5/runpy.py", line 32, in _run_code
>      exec code in run_globals
>    File "/usr/local/home/wesc/hbase/hbase-0.18.1/jcc/__init__.py",
> line 29, in <module>
>      import jcc.__main__
>    File "jcc/__main__.py", line 5, in <module>
>      cpp.jcc(sys.argv)
>    File "jcc/cpp.py", line 360, in jcc
>      cls = findClass(className.replace('.', '/'))
> jcc.cpp.JavaError: java.lang.ExceptionInInitializerError
> I've added a print line in jcc so I can see which class it failed on.
> Is there anyway for me to get the Java stack traceback when it threw
> the ExceptionInInitializerError?

Yes, you can uncomment the call to vm_env->ExceptionDescribe()
in JCCEnv.cpp. In the latest sources, available from PyLucene's new home under 
http://lucene.apache.org/pylucene, I fixed this to be uncommented and report
only errors that are not going to be caught.

Please move your subscription to pylucene-dev at lucene.apache.org :)


More information about the pylucene-dev mailing list