Accessing JChemManager DB using IJC

User bf3dbc99cf

30-10-2009 06:57:15

Dear users,
I wanna access the DB table made by JChemManager but failed. Can any one help me?
Thanks in advance.
Chong Hak Chae,


---------------------------------------------
I am using JChem 5.2.06 and InstantJChem 3.0.0, oracle 11g on Windows2003.
I created user 'DBUSER' in oracle and gave appropriate jchem priviledges.
Using JChemManager, I made a database table of molecules.
I was able to connect to this database table using InstantJChem, substructure search, and so on.
Now, I created domain index to this database table, and was able to substructure search using Queries in SQLPlus.
select cd_smiles from DBTABLE where 1=jc_contains( cd_smiles, 'c1ccccc1NC=O' );
After that, I can access this database table and browse.
But I cannot substructure search on this table with error :


java.sql.SQLException: ORA-20101: Please, create domain index on the column referenced in the operator jc_compare of the table with DATA_OBJECT_ID=73752. You can find out the name of the table by executing:
SELECT owner, object_name INTO schema_name, table_name
FROM sys.dba_objects WHERE DATA_OBJECT_ID = 73752
ORA-06512: "JCHEM.JCHEM_CORE_PKG", at line 58
ORA-06512: "JCHEM.COMPARE_FUNCB", at line 7


 at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
 at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:131)
 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:204)
 at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
 at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
 at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
 at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
 at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)
 at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)
 at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
 at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
 at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3431)
 at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1203)
 at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
 at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
 at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:648)
 at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:591)
Caused: org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT DISTINCT AR_ANTAGONIST.CD_ID FROM AR_ANTAGONIST WHERE jc_compare(AR_ANTAGONIST.CD_STRUCTURE, ?, ?) = 1]; SQL state [72000]; error code [20101]; ORA-20101: Please, create domain index on the column referenced in the operator jc_compare of the table with DATA_OBJECT_ID=73752. You can find out the name of the table by executing:
SELECT owner, object_name INTO schema_name, table_name
FROM sys.dba_objects WHERE DATA_OBJECT_ID = 73752
ORA-06512: "JCHEM.JCHEM_CORE_PKG", at line 58
ORA-06512: "JCHEM.COMPARE_FUNCB", at line 7
; nested exception is java.sql.SQLException: ORA-20101: Please, create domain index on the column referenced in the operator jc_compare of the table with DATA_OBJECT_ID=73752. You can find out the name of the table by executing:
SELECT owner, object_name INTO schema_name, table_name
FROM sys.dba_objects WHERE DATA_OBJECT_ID = 73752
ORA-06512: "JCHEM.JCHEM_CORE_PKG", at line 58
ORA-06512: "JCHEM.COMPARE_FUNCB", at line 7


 at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
 at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
 at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
 at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:607)
 at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:641)
 at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:666)
 at com.im.ijcs.impl.query.Executor.executeQuery(Executor.java:255)
 at com.im.ijcs.impl.query.Executor.visitSqlQuery(Executor.java:214)
 at com.im.ijcs.impl.query.Executor.execute(Executor.java:141)
 at com.im.df.server.local.LocalQueryExecutor.access$001(LocalQueryExecutor.java:15)
 at com.im.df.server.local.LocalQueryExecutor$1.doInTransactionWithoutResult(LocalQueryExecutor.java:49)
 at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)
 at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
 at com.im.df.server.local.LocalQueryExecutor.execute(LocalQueryExecutor.java:47)
 at com.im.ijcs.impl.query.DefaultQueryService.findIDs(DefaultQueryService.java:33)
 at com.im.df.impl.db.DBSchemaDataProviderImpl.queryForIdsImpl(DBSchemaDataProviderImpl.java:402)
 at com.im.df.impl.db.DBEntityDataProviderImpl.queryForIds(DBEntityDataProviderImpl.java:141)
 at com.im.df.impl.db.ResultSetImpl.applyQueryInternal(ResultSetImpl.java:190)
 at com.im.df.impl.db.ResultSetImpl.applyWorkingQuery(ResultSetImpl.java:143)
 at com.im.ijc.core.api.actions.ExecuteWorkingQueryAction.phase1(ExecuteWorkingQueryAction.java:54)
 at com.im.ijc.core.api.actions.AbstractExecuteQueryAction$1.phase1InRequestProcessor(AbstractExecuteQueryAction.java:46)
 at com.im.commons.progress.BackgroundRunner.processTheTask(BackgroundRunner.java:126)
 at com.im.commons.progress.BackgroundRunner$1.run(BackgroundRunner.java:90)
 at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:577)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1030)



 

ChemAxon fa971619eb

30-10-2009 10:17:07

The problem is that IJC is expecting the index to be on the cd_structure column.


If you can drop the jchem index and add it back using the cd_structure column rather than the cd_smiles column then it should work in IJC OK.


We will investigate whey the cd_smiles column is not accepted, but actually it is really more correct to use the cd_structure column anyway.


 


Tim

User bf3dbc99cf

02-11-2009 09:38:56

Dear Tim,


As you mentioned, changing the index from cd_smiles to cd_structure corrected the problem.


Thank you.


Chong Hak Chae.