Unexpected error

User d8da4712c1

01-07-2013 14:17:27

Hi,


I want to make sure that you understand that my script works with most of molfiles, I already inserted hundreds without any errors.


but with some of mofiles and when my php script tries to insert using jc_insert I get this error and those are the lines causing the error:


ORA-29532: Java call terminated by uncaught Java exception: java.lang.RuntimeException: Error while getting the next hits: ORA-00600: internal error code, arguments: [kollasg-2], [], [], [], [], [], [], [], [], [], [], []
ORA-06512: at "SYSADMIN.JCHEM_TABLE_PKG", line 45
ORA-06512: at "SYSADMIN.JCHEM_TABLE_PKG", line 50

								setserveroutputon($link);
$ins_query = "DECLARE
cd_id cd_id_array;
BEGIN
cd_id := sysadmin.jchem_table_pkg.jc_insert(:molfile1,'sysadmin.sub_structure', 'sysadmin.JCHEMPROPERTIES','true','false');
dbms_output.put_line(cd_id(1));
END;";
$stmt = OCIParse($link, $ins_query);
$blob2=OCINewDescriptor($link, OCI_D_LOB);
OCIBindByName($stmt, ':molfile1', $blob2, -1, OCI_B_BLOB);
$blob2->writetemporary($molfile1, OCI_TEMP_BLOB);

ociexecute($stmt);
ocicommit($link);
$tab = getdbmsoutput_do($link);

User d8da4712c1

01-07-2013 14:19:30

The full error message


Warning: ociexecute(): ORA-29532: Java call terminated by uncaught Java exception: java.lang.RuntimeException: Error while getting the next hits: ORA-00600: internal error code, arguments: [kollasg-2], [], [], [], [], [], [], [], [], [], [], []


ORA-06512: at "SYSADMIN.JCHEM_TABLE_PKG", line 45


ORA-06512: at "SYSADMIN.JCHEM_TABLE_PKG", line 50


ORA-06512: at line 4 in /www-data-dev/cn/admin/sdfile/myscript_name.php on line 461


line 461 is the ociexecute function call line.

ChemAxon aa7c50abf8

01-07-2013 14:42:29

Hi,


Are you able to consistently reproduce the error?


Thanks,


Peter

User d8da4712c1

01-07-2013 14:44:30

yes

User d8da4712c1

01-07-2013 14:47:29

with 1260 structures in an sdf file I get arround 16 of those errors.

ChemAxon aa7c50abf8

01-07-2013 14:50:12

Can you prepare a test case so we can reproduce the error internally?


Thanks


Peter

User d8da4712c1

01-07-2013 15:03:17

Ok I'll do that, do you have any ideas about the error now?

ChemAxon aa7c50abf8

01-07-2013 15:19:55

The error itself is an Oracle bug. We may be able to find a work-around. It is also possible that this Oracle error is a result of something illegal that the JCC implementation is doing, which Oracle is unable to handle. If we can't find an easy work-around, we will report this to Oracle and will see what to do next.


Peter

User d8da4712c1

02-07-2013 10:05:37

Yesterday after having around 20000 molecules in my database, the error message didn't stop comming and I coundn't no longer insert new molecules.


Now with a fresh table I didn't get any error on the first sdf file ( 228 inserted, one was not inserted)


The second sdf file (database already contains 228 structure,  209 new structure inserted without any error)


Thrid one with 601 structures 588 were inserted and 3 were not)


with always the same error.

ChemAxon aa7c50abf8

02-07-2013 14:03:17

Thank you for the test data!


Before I start testing, a few questions:


1. Does the table contain any structure when the test starts or should we able to reproduce the issue by inserting the structures attached into an empty table?


2. Not knowing php, I speculate that the line $blob2->writetemporary($molfile1, OCI_TEMP_BLOB); is where you write the content to a temporary BLOB. Two questions related to this:


2.a Did you try to write the BLOB content before binding it to the statement in OCIBindByName($stmt, ':molfile1', $blob2, -1, OCI_B_BLOB); ? I'd instinctively would do like this in Java...


2.b Do you release the temporary blob after done with exuting jc_insert?


3. Could you, please, send the output of the following command: select jchem_core_pkg.getenvironment from dual;


Thanks,


Peter

User d8da4712c1

02-07-2013 15:02:36

Yeh in PHP I use :


$blob2->close();


$blob2->free();


For the structure I use default php output echo, for example in the first sdf file (1.sdf) the structure that causes the error is( the spacing is caused by copy past, but in my output it's the right mol)


  -ISIS-  05230814062D



23 24 0 0 0 0 0 0 0 0999 V2000

1.1875 -3.4709 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0

2.0708 -3.4709 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0

2.3443 -2.6284 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0

1.6291 -2.1125 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0

0.9141 -2.6284 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0

1.6291 -1.2292 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0

2.3941 -0.7875 0.0000 N 0 0 3 0 0 0 0 0 0 0 0 0

3.1984 -1.1456 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0

3.7895 -0.4891 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0

3.3477 0.2759 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0

2.4838 0.0921 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0

3.8167 -1.7625 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0

4.6667 -1.5333 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0

5.2875 -2.1542 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0

3.1917 -2.8500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0

4.0417 -2.6208 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0

3.4167 -3.7000 0.0000 N 0 0 3 0 0 0 0 0 0 0 0 0

2.7902 -4.3227 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0

4.2692 -3.9312 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0

4.4952 -4.7851 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0

5.3478 -5.0163 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0

3.0162 -5.1766 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0

2.3897 -5.7994 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0

11 7 1 0 0 0 0

1 2 1 0 0 0 0

8 12 1 6 0 0 0

4 6 1 0 0 0 0

12 13 1 0 0 0 0

13 14 1 0 0 0 0

6 7 1 0 0 0 0

3 15 1 0 0 0 0

7 8 1 0 0 0 0

15 16 2 0 0 0 0

2 3 1 0 0 0 0

15 17 1 0 0 0 0

3 4 2 0 0 0 0

17 18 1 0 0 0 0

4 5 1 0 0 0 0

17 19 1 0 0 0 0

5 1 1 0 0 0 0

19 20 1 0 0 0 0

8 9 1 0 0 0 0

20 21 2 0 0 0 0

9 10 1 0 0 0 0

18 22 1 0 0 0 0

10 11 1 0 0 0 0

22 23 2 0 0 0 0

M END














pkovacs wrote:

Thank you for the test data!


Before I start testing, a few questions:


1. Does the table contain any structure when the test starts or should we able to reproduce the issue by inserting the structures attached into an empty table?


2. Not knowing php, I speculate that the line $blob2->writetemporary($molfile1, OCI_TEMP_BLOB); is where you write the content to a temporary BLOB. Two questions related to this:


2.a Did you try to write the BLOB content before binding it to the statement in OCIBindByName($stmt, ':molfile1', $blob2, -1, OCI_B_BLOB); ? I'd instinctively would do like this in Java...


2.b Do you release the temporary blob after done with exuting jc_insert?


3. Could you, please, send the output of the following command: select jchem_core_pkg.getenvironment from dual;


Thanks,


Peter


User d8da4712c1

02-07-2013 15:04:47

forgot to tell you that the table didn't contain any thing when I started this last test.

ChemAxon aa7c50abf8

02-07-2013 15:27:28

If the PHP Oracle access API has semantics similar to that of JDBC, $blob2->close(); should be called before execute, IMHO (and $blob2->free(); some time after the statement has been executed).


Does the following re-ordered sequence look like valid PHP-code? If it does, does the issue persist with this sequence?


$stmt = OCIParse($link, $ins_query);
$blob2=OCINewDescriptor($link, OCI_D_LOB);
$blob2->writetemporary($molfile1, OCI_TEMP_BLOB);
$blob2->close();
OCIBindByName($stmt, ':molfile1', $blob2, -1, OCI_B_BLOB);
ociexecute($stmt);
ocicommit($link);
$blob2->free();

(Isn't there a try-catch block or the like in PHP for safe resource handling?)


Thanks,


Peter

User d8da4712c1

02-07-2013 16:18:04

I think if it's problem with php code it would be explained by errors with all molfiles but you can see that with more 200 structure only this one gives an errors, I can give you more example with other sdf files if you need that, did you try it on your system configuration?

User d8da4712c1

03-07-2013 08:51:20

any update thanks.

ChemAxon aa7c50abf8

03-07-2013 11:44:06

did you try it on your system configuration?


Not yet. Thank you for your patience.


Peter

User d8da4712c1

03-07-2013 13:03:33

Thanks Peter, I'm using PHP 5.3.25 with OCI8 and this is oracle information:


Oracle Database 11g Release 11.2.0.3.0 - 64bit Production                        


PL/SQL Release 11.2.0.3.0 - Production                                           


CORE 11.2.0.3.0 Production                                                         


TNS for Linux: Version 11.2.0.3.0 - Production                                   


NLSRTL Version 11.2.0.3.0 - Production 


And this is jchem info:


JChem owner: SYSADMIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

JChem Server environment:
Java VM vendor: Oracle Corporation
Java version: 1.7.0_19
Java VM version: 23.7-b01
JChem version: 6.0.1
JChem Index version: 6000000
JDBC driver version: 11.1.0.7.0-Production


User d8da4712c1

03-07-2013 13:05:43

Jchem full info:




GETENVIRONMENT
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Oracle environment:
Oracle Database 11g Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production

JChem owner: SYSADMIN

JChem Server environment:
Java VM vendor: Oracle Corporation
Java version: 1.7.0_19
Java VM version: 23.7-b01
JChem version: 6.0.1
JChem Index version: 6000000
JDBC driver version: 11.1.0.7.0-Production

ChemAxon aa7c50abf8

03-07-2013 15:08:02

Thank you for the additional information!


I did some more work on a reproducible test case...one more missing piece of information: how do you parse the input files? (For example, there are 601 structures in 3.sdf leaving us with 601 calls to jc_insert for that file...)


Thanks,


Peter

User d8da4712c1

03-07-2013 15:13:13

Using php functions like strpos, I think I found it, I installed Jchem cartridge again and seems working fine now, I'll update you when I finish the tests

User d8da4712c1

03-07-2013 15:25:46

Update, unfortunatly I was wrong the error still the same, nothing changed, do you get the same error?

ChemAxon aa7c50abf8

04-07-2013 10:27:53

Hi I cannot reprodcue the problem. The attached program could successfully process 1039 structures, of which 1035 has been inserted.


Note that the attached program creates a stored procedure as the first step and calls it to insert the structure. Creating an anonymous block each time you insert a structure doesn't seem to be a good idea per se. I also removed the calls to the dbms_output package.


The attached program also uses the sequence I was earler suggesting (i.e. fully create/populate the temporary blob first, bind it only thereafter).


Peter

User d8da4712c1

05-07-2013 08:59:59

Thanks Peter but still not finiding any solution

ChemAxon aa7c50abf8

05-07-2013 09:09:09

As this is an Oracle error, I think Oracle would be able to most efficiently help you.


Peter

User d8da4712c1

05-07-2013 09:21:20

I think it's more cartridge function error cause it's java exception please look at:


ORA-06512: at "SYSADMIN.JCHEM_TABLE_PKG", line 45
ORA-06512: at "SYSADMIN.JCHEM_TABLE_PKG", line 50

ChemAxon aa7c50abf8

05-07-2013 09:27:33

The root error is this:


ORA-00600: internal error code, arguments: [kollasg-2], [], [], [], [], [], [], [], [], [], [], []

User d8da4712c1

05-07-2013 09:31:13

Ok

User d8da4712c1

08-07-2013 16:03:38

Thanks Peter, I think that with java the process works fine, can you tell me the list of programming languages that you did try it with cartridge.


regards,


idris.

ChemAxon aa7c50abf8

08-07-2013 17:19:57

Hi Idris,


We have an ASP example application to show case the use of JCC on Windows platforms. It is implemented in Visual Basic script which was somewhat desuet already at the time the sample application was written.


We don't have statistics, but I think most users use JCC from Java and a smaller proportion uses with (ASP).NET.


We had an early user a couple of years ago, who used it with mod_plsql -- an apache plugin allowing to write complete WEB applications in PL/SQL.


Peter