User 26d9368720
01-08-2013 14:10:43
Hi,
With version 6.0.3 we have problem when use export with custom sql. Simplified test case below:
ConnectionHandler jchem_con = new ConnectionHandler();
jchem_con.setConnection(c);
jchem_con.setPropertyTable("jchemprops");
Exporter exp = new Exporter();
exp.setFormat(Transfer.SDFILE);
exp.setConnectionHandler(jchem_con);
exp.setSelectStatement("select 'CCCC' as CD_STRUCTURE, 0 as CD_ID from dual");
ByteArrayOutputStream out = new ByteArrayOutputStream();
exp.setOutputStream(out );
Integer molNumber = exp.writeAll();
Last instruction writeAll throws chemaxon.jchem.db.TransferException: Unexpected error during DB export init: null, cause NullPointerException.
We variated with setSelectStatement: used selection from registered structure table like
select * from jsmiles_bb limit 1 or select CD_STRUCTURE, CD_ID from jsmiles_bb limit 1
result the same..
When instead of setSelectStatement use setTableName('jsmiles_bb ') the above code works.
We did nod find in docs any special hints except CD_STRUCTURE must be first in field list. So what's wrong?