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
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