Bug 1004780

Summary: Data truncation: Data too long for column 'result' at row 1
Product: [Community] Candlepin Reporter: Jesus M. Rodriguez <jesusr>
Component: candlepinAssignee: Jesus M. Rodriguez <jesusr>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.9CC: bkearney
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-07 16:48:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jesus M. Rodriguez 2013-09-05 13:15:41 UTC
[2013-09-04T14:39:06-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:] ERROR org.hibernate.jdbc.AbstractBatcher - Exception executing batch: 
[2013-09-04T14:39:06.562969-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:java.lang.RuntimeException] java.sql.BatchUpdateException: Data truncation: Data too long for column 'result' at row 1
[2013-09-04T14:39:06.562978-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:2443)
[2013-09-04T14:39:06.562978-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
[2013-09-04T14:39:06.563065-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
[2013-09-04T14:39:06.563065-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)
[2013-09-04T14:39:06.563072-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
[2013-09-04T14:39:06.563072-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
[2013-09-04T14:39:06.563076-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
[2013-09-04T14:39:06.563076-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1030)
[2013-09-04T14:39:06.563081-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:367)
[2013-09-04T14:39:06.563081-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:137)
[2013-09-04T14:39:06.563285-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:54)
[2013-09-04T14:39:06.563285-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:87)
[2013-09-04T14:39:06.563296-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
[2013-09-04T14:39:06.563296-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52)
[2013-09-04T14:39:06.563298-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at org.candlepin.model.JobCurator$$EnhancerByGuice$$6e7ab748.merge(<generated>)
[2013-09-04T14:39:06.563298-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at org.candlepin.pinsetter.core.PinsetterJobListener.updateJob(PinsetterJobListener.java:117)
[2013-09-04T14:39:06.563301-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at org.candlepin.pinsetter.core.PinsetterJobListener.updateJob(PinsetterJobListener.java:102)
[2013-09-04T14:39:06.563301-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at org.candlepin.pinsetter.core.PinsetterJobListener.jobToBeExecuted(PinsetterJobListener.java:68)
[2013-09-04T14:39:06.563303-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at org.quartz.core.QuartzScheduler.notifyJobListenersToBeExecuted(Unknown Source)
[2013-09-04T14:39:06.563303-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at org.quartz.core.JobRunShell.notifyListenersBeginning(Unknown Source)
[2013-09-04T14:39:06.563306-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at org.quartz.core.JobRunShell.run(Unknown Source)
[2013-09-04T14:39:06.563306-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(Unknown Source)
[2013-09-04T14:39:06.563310-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    aused by: java.sql.BatchUpdateException: Data truncation: Data too long for column 'result' at row 1
[2013-09-04T14:39:06.563310-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2054)
[2013-09-04T14:39:06.563315-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1467)
[2013-09-04T14:39:06.563315-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:2429)
[2013-09-04T14:39:06.563319-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    ... 21 more
[2013-09-04T14:39:06.563319-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    aused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'result' at row 1
[2013-09-04T14:39:06.563323-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4072)
[2013-09-04T14:39:06.563323-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006)
[2013-09-04T14:39:06.563327-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2468)
[2013-09-04T14:39:06.563327-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2629)
[2013-09-04T14:39:06.563331-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2719)
[2013-09-04T14:39:06.563331-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
[2013-09-04T14:39:06.563335-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2450)
[2013-09-04T14:39:06.563335-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2006)
[2013-09-04T14:39:06.563340-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:]    ... 23 more
[2013-09-04T14:39:06-04:00] [host:s04.candlepin.stage.ext.phx2.redhat.com] [app:] ERROR org.candlepin.pinsetter.core.PinsetterJobListener - jobToBeExecuted encountered a problem. Usually means there was a problem storing the job status. Job will run.

Comment 1 Jesus M. Rodriguez 2013-09-05 13:17:02 UTC
result field in JobStatus must never be set directly, it should always go through the setResult method so that it can be properly trimmed to the appropriate size before storing to the database.

Comment 2 Jesus M. Rodriguez 2013-09-05 15:40:55 UTC
PR filed: https://github.com/candlepin/candlepin/pull/370

Comment 3 Bryan Kearney 2014-11-07 16:48:58 UTC
This was delivered on 0.8.26. I am closing this out> if you still have isues, please feel free to re-open.