Intercept data too long for column errors when entering too long orcids

Create issue
Issue #2543 wontfix
Daniel Zoller created an issue
--- The error occurred in Person.xml.  
--- The error occurred while applying a parameter map.  
--- Check the updatePerson-InlineParameterMap.  
--- Check the statement (update failed).  
--- Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'orcid' at row 1
        at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:107)
        at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.insert(SqlMapExecutorDelegate.java:393)
        at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.insert(SqlMapSessionImpl.java:82)
        at org.bibsonomy.database.common.impl.DBSessionImpl.insert(DBSessionImpl.java:257)

Comments (15)

  1. Tom Völker

    In the current Bibsonomy version, the user is already blocked from entering ORCID IDs that are too long by corresponding input field, so it is no longer necessary to intercept the error.

  2. Tom Völker

    The formatting is only checked in JS. If the updateOrcid method is somehow called with an illegal orcid argument, the usual database error handling is used (since the orcid column can contain a maximum of 16 characters) and no update takes place.

  3. Log in to comment