Cannot read empty molecule file

User 4140faeba5

18-07-2005 12:57:56

Hi.


I have a standrard Jchem table (except that the cd_structure is type BLOB).


This is populated with approx 11000 standard molecules.





I have inserted and converted to blob, the attached molecule.


The table I use to temporary store the molecule looks like this.


SQL> desc temp_mol;


Name Null? Type


----------------------------------------- -------- ----------------------------


PKEY NUMBER(38)


MOLFILE BLOB





SQL>





To store the molecule, I executed the following procedure


CREATE OR REPLACE PROCEDURE store_query_bmolfile(v_pkey NUMBER,v_structure CLOB) AS


v_size BINARY_INTEGER :=0;


buffer VARCHAR2(32000);


buffer2 RAW(32000);


BEGIN


v_size := dbms_lob.getlength(v_structure);


dbms_lob.READ(v_structure,v_size,1,buffer);


buffer2 := utl_raw.cast_to_raw(buffer);


EXECUTE IMMEDIATE 'insert into temp_mol(pkey,molfile) values(' || v_pkey || ',:x)' USING buffer2;


END;


/





I have verified that the molecule is stored as it is drawn in the BLOB, by selecting out that blob.





Here is my strucutre query.


SELECT


COUNT(CD_ID)


FROM JCHEMTEST.BVTCIMS


WHERE


jc_containsb(JCHEMTEST.BVTCIMS.cd_structure,(SELECT molfile FROM TEMP_MOL WHERE pkey = 76))=1;





The error I get is the following.


ORA-29902: error in executing ODCIIndexStart() routine


ORA-29532: Java call terminated by uncaught Java exception: java.lang.Exception: The following exception has been thrown by the servlet:


Exception: java.io.IOException: Cannot read empty molecule file


ORA-06512: at "JCHEM.JCHEM_BLOB_PKG", line 0


ORA-06512: at "JCHEM.JC_IDXTYPE_IM", line 449





What is is that I'm doing wrong ?


Regards,


Mikael

User 4140faeba5

18-07-2005 13:06:20

The smiley in the code is for "colon x" used as a bind variable to handle strucutres larger that 4000 characters.





PS. I cannot disable smileys, how do I do that ?

ChemAxon b124dd5f17

18-07-2005 13:33:45

HI Mikael,





I have disabled the smilees so your code is now looking better ;)

ChemAxon aa7c50abf8

18-07-2005 13:43:01

May be, if the text is formated as "Code" (
Code:
...
), these special character sequencies are not interpreted as smilees.

User 4140faeba5

18-07-2005 13:45:33

Fine.


How about my search problem ?

ChemAxon aa7c50abf8

18-07-2005 14:18:09

Which jchem version are you using?





Please, could upload <tomcat-home>/logs/catalina.out?

User 4140faeba5

19-07-2005 05:39:42

Hi.


I'm running Jchem version 3.0.13


Oracle 9.2.0.6


Java vm 1.4.2_08


Tomcat 4.1.31





Attached is catalina.out

User 4140faeba5

20-07-2005 06:05:10

Hi.


I also tried to do this query using varchar columns and jc_contains, but that resulted in the same error.





/Mikael

User 4140faeba5

20-07-2005 07:21:01

Hi.


It seems to have something to do with my base Jchem table, because this


statement also fails.


SQL> select jc_molconvert(c_molfile,'smiles') from temp_mol where pkey=96;





JC_MOLCONVERT(C_MOLFILE,'SMILES')


--------------------------------------------------------------------------------


CCN(CC)CC





SQL> select count(cd_id) from JCHEMTEST.BVTCIMS where


2 jc_contains(cd_smiles,'CCN(CC)CC')=1;


select count(cd_id) from JCHEMTEST.BVTCIMS where


*


ERROR at line 1:


ORA-29902: error in executing ODCIIndexStart() routine


ORA-29532: Java call terminated by uncaught Java exception:


java.lang.Exception: The following exception has been thrown by the servlet:


Exception: java.io.IOException: Cannot read empty molecule file


ORA-06512: at "JCHEM.JCHEM_CORE_PKG", line 0


ORA-06512: at "JCHEM.JC_IDXTYPE_IM", line 158


ORA-06512: at line 1

User 4140faeba5

20-07-2005 07:29:11

I had some "no-structs" in my base Jchem table.


Removing those still creates the error message.

User 4140faeba5

20-07-2005 08:38:35

I've solved this myself.


It turned out that I needed to re-generate the table after modifying non- cd_ columns through sqlplus.

ChemAxon aa7c50abf8

20-07-2005 08:41:56

Hi,





Sorry for not replying to your postings earlier, but I had a day off work yesterday.





Thank you for help!


Peter