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.



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 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(
    at chemaxon.jchem.db.UpdateHandler.deleteRows(
    at chemaxon.jchem.db.UpdateHandler.deleteRows(
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.openide.util.RequestProcessor$
[catch] at org.openide.util.RequestProcessor$

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?


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!



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