refactoring-ai / predicting-refactoring-ml

Refactoring recommendation via ML
MIT License
28 stars 8 forks source link

Too long filepath for database #180

Closed jan-gerling closed 4 years ago

jan-gerling commented 4 years ago

This caused more than 1000 persistence exceptions:

Caused by: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'filePath' at row 1 at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:104) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1092) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1040) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1347) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:1025) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:410) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:175) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3079) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3673) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:645) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:282) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:263) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:317) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:332) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:289) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:196) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:127) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:192) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:135) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:62) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:804) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] ... 11 more

Caused by: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'filePath' at row 1 at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:104) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1092) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1040) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1347) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:1025) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:410) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:175) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3079) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3673) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:645) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:282) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:263) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:317) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:332) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:289) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:196) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:127) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:192) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:135) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:62) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:804) ~[data-collection-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?] ... 11 more