User 180e9fcb04
26-07-2011 18:16:52
Hello, I have a column for InChI, and it uses the VARCHAR length 1000, ERROR 22001: A truncation error was encountered trying to shrink VARCHAR 'InChI=1S/C34H30O8S/c1-22-17-19-26(20-18-22)43-34-30(42-33(38&' to length 1000. Sometimes I can avoid the error by removing a few elements from the molecule, so it's not generated 100% of the time. However, I essentially can't add the structures I need to anymore. These are all "small molecules" of FW 500 or less. When I hover over the InChI column entries in grid view, it shows a lot of "AuxInfo=" in addition to just the InChI= data, which I don't think I'd noticed before - is that what is making the entries too long? Thank you, Barbara
and although I had created a database of about 200 structures without problems, now every time I try to add a new structure, of very similar size to the existing ones, I get Error 22001:
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.iapi.types.SQLChar.hasNonBlankChars(Unknown Source)
at org.apache.derby.iapi.types.SQLVarchar.normalize(Unknown Source)
at org.apache.derby.iapi.types.SQLVarchar.normalize(Unknown Source)
at org.apache.derby.iapi.types.DataTypeDescriptor.normalize(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: A truncation error was encountered trying to shrink VARCHAR 'InChI=1S/C34H30O8S/c1-22-17-19-26(20-18-22)43-34-30(42-33(38&' to length 1000.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
Caused: java.sql.SQLDataException: A truncation error was encountered trying to shrink VARCHAR 'InChI=1S/C34H30O8S/c1-22-17-19-26(20-18-22)43-34-30(42-33(38&' to length 1000.
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.EmbedPreparedStatement.executeStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown Source)
at chemaxon.jchem.db.UpdateHandler.execute(UpdateHandler.java:2248)
at com.im.df.impl.db.dao.jchem.AbstractJChemDao$UpdateHandlerImpl.insert(AbstractJChemDao.java:303)
Caused: org.springframework.dao.DataIntegrityViolationException: A truncation error was encountered trying to shrink VARCHAR 'InChI=1S/C34H30O8S/c1-22-17-19-26(20-18-22)43-34-30(42-33(38&' to length 1000.; SQL []; A truncation error was encountered trying to shrink VARCHAR 'InChI=1S/C34H30O8S/c1-22-17-19-26(20-18-22)43-34-30(42-33(38&' to length 1000.; nested exception is java.sql.SQLDataException: A truncation error was encountered trying to shrink VARCHAR 'InChI=1S/C34H30O8S/c1-22-17-19-26(20-18-22)43-34-30(42-33(38&' to length 1000.
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.insert(AbstractJChemDao.java:313)
at com.im.df.impl.db.dao.DFDaoSupport.insert(DFDaoSupport.java:118)
at com.im.df.impl.db.dao.DFDaoWrapper.insert(DFDaoWrapper.java:66)
at com.im.df.impl.db.DBEntityDataProviderImpl.doInsertRow(DBEntityDataProviderImpl.java:354)
at com.im.df.impl.db.DBEntityDataProviderImpl.access$5(DBEntityDataProviderImpl.java:294)
at com.im.df.impl.db.DBEntityDataProviderImpl$3.doInTransaction(DBEntityDataProviderImpl.java:285)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
at com.im.df.impl.db.DBEntityDataProviderImpl.insertOrFindRow(DBEntityDataProviderImpl.java:281)
at com.im.df.impl.db.InsertionHandler.doInsertData(InsertionHandler.java:307)
at com.im.df.impl.db.InsertionHandler.doInTransaction(InsertionHandler.java:267)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
at com.im.df.impl.db.DBSchemaDataProviderImpl.insert(DBSchemaDataProviderImpl.java:204)
at com.im.ijc.core.api.actions.InsertRowAction$3.phase1InRequestProcessor(InsertRowAction.java:420)
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)