Hi,

I'm in the processing of testing JCC to wrap third party library jar.

When I run JCC 3.7 I got the following error

Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File 
"/home/cheeyong.teh/venv/simm/lib/python3.6/site-packages/jcc/__main__.py", 
line 107, in <module>
    cpp.jcc(sys.argv)
  File "/home/cheeyong.teh/venv/simm/lib/python3.6/site-packages/jcc/cpp.py", 
line 711, in jcc
    _dll_export)
  File "/home/cheeyong.teh/venv/simm/lib/python3.6/site-packages/jcc/cpp.py", 
line 937, in header
    namespace = namespace.setdefault(declareName, {})
AttributeError: 'bool' object has no attribute 'setdefault'

This line "namespace = namespace.setdefault(declareName, {})" assume 
namespace.setdefault(declareName, {}) will return {} but somehow it returns 
True. So namespace has True value and it errors in next iteration in the loop. 
Not sure it's a bug or the jar is too complicated to parse/convert due to a 
directory/structure. I can send over the library if you need to debug/reproduce 
the error on your machine

The commandline I use

python -m jcc \
--use_full_names \
--no-generics \
--jar lib/smart-swapclear-public-release_daru.12.jar \
--include lib/colt-1.2.0.jar \
--include lib/commons-math3-3.6.1.jar \
--include lib/jna-5.2.0.jar \
--include lib/log4j-1.2.16.jar \
--include lib/protobuf-java-3.5.1.jar \
--include lib/slf4j-api-1.6.1.jar \
--include lib/slf4j-log4j12-1.6.1.jar \
--python lch_smart --build -install

Another question,  --jar option seem to wrap all the public classes found 
inside the jar. Is there an option that only wrap certain public classes under 
package com.lchclearnet.* inside a jar? There is an option called exclude for 
classes but it will be nightmare to workout all the classes I don't want to 
wrap inside the jar.

Thanks,

Kinds regards,

Chee Yong

Chee Yong Teh 
27 Bush Lane, London, EC4R 0AN  |  +44 203 929 3138 
OTC Infrastructure Service of the Year & ​Global Compression Service of the Year

Disclaimer

The information contained in this communication from the sender is 
confidential. It is intended solely for use by the recipient and others 
authorized to receive it. If you are not the recipient, you are hereby notified 
that any disclosure, copying, distribution or taking action in relation of the 
contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been 
automatically archived by Mimecast Ltd, an innovator in Software as a Service 
(SaaS) for business. Providing a safer and more useful place for your human 
generated data. Specializing in; Security, archiving and compliance. To find 
out more visit the Mimecast website.

Reply via email to