Error 23502 when deleting row

User 180e9fcb04

30-07-2013 18:04:41

I'm using Instant JChem 5.3.1


When I try to delete a record in either form view or grid view, I get Error 23502. The full error message follows.


Thanks!


Barbara


ERROR 23502: Column 'CACHE_ID'  cannot accept a NULL value.
    at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
    at org.apache.derby.impl.sql.execute.NormalizeResultSet.normalizeColumn(Unknown Source)
    at org.apache.derby.impl.sql.execute.NormalizeResultSet.normalizeRow(Unknown Source)
    at org.apache.derby.impl.sql.execute.NormalizeResultSet.getNextRowCore(Unknown Source)
    at org.apache.derby.impl.sql.execute.DMLWriteResultSet.getNextRowCore(Unknown Source)
    at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
    at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
    at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
Caused: java.sql.SQLException: Column 'CACHE_ID'  cannot accept a NULL value.
    at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
    at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
Caused: java.sql.SQLIntegrityConstraintViolationException: Column 'CACHE_ID'  cannot accept a NULL value.
    at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
    at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
    at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
    at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
    at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
    at chemaxon.jchem.db.UpdateHandler.storeUpdate(UpdateHandler.java:2457)
    at chemaxon.jchem.db.UpdateHandler.deleteRows(UpdateHandler.java:2594)
    at chemaxon.jchem.db.UpdateHandler.deleteRows(UpdateHandler.java:2483)
    at com.im.df.impl.db.dao.jchem.AbstractJChemDao$UpdateHandlerImpl.deleteIds(AbstractJChemDao.java:501)
Caused: org.springframework.dao.DataIntegrityViolationException: Molecule deletion; SQL [WHERE cd_id = 62]; Column 'CACHE_ID'  cannot accept a NULL value.; nested exception is java.sql.SQLIntegrityConstraintViolationException: Column 'CACHE_ID'  cannot accept a NULL value.
    at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:228)
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
    at com.im.df.impl.db.dao.jchem.AbstractJChemDao$UpdateHandlerImpl.deleteIds(AbstractJChemDao.java:503)
    at com.im.df.impl.db.dao.DFDaoSupport.deleteIds(DFDaoSupport.java:108)
    at com.im.df.impl.db.dao.DFDaoWrapper.deleteIds(DFDaoWrapper.java:77)
    at com.im.df.impl.db.DBEntityDataProviderImpl$4.doInTransaction(DBEntityDataProviderImpl.java:419)
    at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
    at com.im.df.impl.db.DBEntityDataProviderImpl.doDeleteIds(DBEntityDataProviderImpl.java:416)
    at com.im.df.impl.db.DBEntityDataProviderImpl.deleteIdsImpl(DBEntityDataProviderImpl.java:384)
    at com.im.df.impl.db.DBEntityDataProviderImpl.deleteIds(DBEntityDataProviderImpl.java:362)
    at com.im.ijc.core.api.actions.DeleteRowsAction$2.phase1InRequestProcessor(DeleteRowsAction.java:169)
    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 2bdd02d1e5

02-08-2013 15:33:50

Hi Barbara,


in fact IJC 5.3.1 is very old. I would recommend an update to the latest release. Moreover it does look that restarting/reconnecting IJC could help?


Filip

User 180e9fcb04

02-08-2013 15:58:06

Hi Filip,


I did update to 6.x but I couldn't locate my project in the new version - there was no grid view or form view for my existing entries. I really couldn't figure it out, so I went back to the previous version I had.


The problem with deleting did not happen in the past. But now it happens each time I open this version.


I can open another thread about how to retrieve my existing work in the newest version...


For now, my solution is to add new entries by editing the existing ones I can't delete. Not a long-term solution!


Thanks,


~Barbara

ChemAxon 26d92e5dcd

08-08-2013 11:28:36

Dear Barbara,


 


Instant JChem should provide backwards compatibility to older (with exception of versions older than 3.x). What exactly happens when you try to open the project? The project is not possible to open, or it opens and loads the schemas, but without datatrees, or it opens as an empty project? Is there any error message present, if not could you send us the output of IJC Log File? (this can be accessed in View -> Instant JChem Log File)


 


Regarding the deletion of records, this bug appeared as a regression in early 6.0 development stage too, but it was fixed. If you encounter this problem in the latest 6.x version with some other data (as you can not load your old projects right now), do not hesitate to let us know :)


 


All the Best


 


David