Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#438 closed defect (worksforme)

BASE 1 lowess plugin description too long for BASE 2 migrate tool

Reported by: base Owned by: Gregory Vincic
Priority: major Milestone:
Component: migrate Version:
Keywords: Cc:


I've patched the migrate tools to handle a customized Reporter table, but when I run it, it falls over before it gets to the Reporters. It's something to do with the description of the Lowess plugin being too long. I've tried to delve into the code but I'm not getting very far, sorry! It seems that the description is plenty small enough to fit in PluginConfigurations' description column of type 'text'.

Here's the stack trace:

15:44:46,454 INFO migration:77 - Migrater: startTransfer: Plugins 15:44:46 Plugins 15:44:46,622 INFO migration:68 - Free memory : 383 MByte 15:44:46 Left Done Items/s ETE 15:44:46 5 : 0 0% 15:44:46,678 INFO migration:77 - PluginTransfer: createItem: Base1 name=Normalization: Global median ratio; id=1 15:44:46,984 INFO migration:77 - PluginTransfer: createItem: Ok 15:44:47,067 INFO migration:77 - PluginTransfer: createItem: Base1 name=Normalization: Lowess; id=2 15:44:47,211 INFO migration:77 - PluginTransfer: createItem: Ok 15:44:47,245 INFO migration:77 - PluginTransfer: commit(): could not insert: [] commit() net.sf.basedb.core.BaseException: could not insert: []

at net.sf.basedb.core.HibernateUtil.saveData( at net.sf.basedb.core.DbControl.commit( at net.sf.basedb.clients.migrate.Transfer.commit( at net.sf.basedb.clients.migrate.PluginTransfer.createItem( at net.sf.basedb.clients.migrate.Transfer.runUnBatched( at net.sf.basedb.clients.migrate.PluginTransfer.start( at net.sf.basedb.clients.migrate.Migrater.startTransfer( at at net.sf.basedb.clients.migrate.Migrater.main(

Caused by: org.hibernate.exception.GenericJDBCException: could not insert: []

at org.hibernate.exception.SQLStateConverter.handledNonSpecificException( at org.hibernate.exception.SQLStateConverter.convert( at org.hibernate.exception.JDBCExceptionHelper.convert( at at org.hibernate.persister.entity.AbstractEntityPersister.insert( at org.hibernate.persister.entity.AbstractEntityPersister.insert( at org.hibernate.action.EntityIdentityInsertAction.execute( at org.hibernate.engine.ActionQueue.execute( at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate( at org.hibernate.event.def.AbstractSaveEventListener.performSave( at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId( at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId( at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId( at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient( at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate( at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate( at org.hibernate.impl.SessionImpl.fireSave( at at at net.sf.basedb.core.HibernateUtil.saveData( ... 8 more

Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'description' at row 1

at com.mysql.jdbc.MysqlIO.checkErrorPacket( at com.mysql.jdbc.MysqlIO.sendCommand( at com.mysql.jdbc.ServerPreparedStatement.serverExecute( at com.mysql.jdbc.ServerPreparedStatement.executeInternal( at com.mysql.jdbc.PreparedStatement.executeUpdate( at com.mysql.jdbc.PreparedStatement.executeUpdate( at com.mysql.jdbc.PreparedStatement.executeUpdate( at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate( at$GetGeneratedKeysDelegate.executeAndExtract( at ... 24 more

Users, groups etc have transfered OK it seems. So has the Normalization: Global median ratio plugin (which has a shorter description).

Has anyone else found this? I'm 99.9% sure I didn't alter the BASE 1 plugins.

Other than my patches to and the BASE1/2 schemas, this is a fresh BASE 2.1 install from source.

Please reply to Bob MacCallum via basedb-devel list or dig up my email. Happy to give more info if you tell me where to look. Thanks!

Change History (6)

comment:1 by Nicklas Nordborg, 17 years ago

I googled around for the error message: MysqlDataTruncation: Data truncation: Data too long.

It could be caused by a bug in MySQL: I think it is very unlikely that the description is longer than 64K characters, which a text column should be able to handle, and if the description was longer, it would be caught in the code.

In fact, when I look at the description the lowess plugin contains the character 'ö', but the median ratio plugin doesn't.

I am running MySQL 5.0.15 and it seems not to be affected by the bug. The latest release is 5.0.27

comment:2 by base, 17 years ago

Hi Nicklas,

Thanks very much for looking - I'll also do some more work on it today and keep you informed. We're on MySQL 5.0.21 by the way.

keep you posted. Bob

comment:3 by base, 17 years ago

fixed - thanks to your help - will post more details tomorrow - have some suggestions for improving documentation!

comment:4 by base, 17 years ago

OK. So I read the info in doc/configure_unicode_support.txt and added characterEncoding=utf8 to the db.url in base.config, however that didn't help.

I then read some JDBC docs and decided to try characterEncoding=UTF-8 and it worked.

Note that the database is created with default charset = utf8, however the MySQL server's default charset is latin1 (it's also running BASE 1). I suspect that at BASE HQ you have a dedicated BASE 2 MySQL server which has utf8 as default, so you wouldn't encounter these problems.

Thanks again for pointing me in the right direction, Nicklas.

comment:5 by Nicklas Nordborg, 17 years ago

Resolution: worksforme
Status: newclosed

I'll change it in the docs. We have used characterEncoding=utf8 without problem so far but the MySQL docs says that UTF-8 should be used. The use of UTF-8 is not something we have spent much time on exploring. All our servers are running with default settings which probably is ISO-8859-1.

comment:6 by Nicklas Nordborg, 17 years ago

(In [2940]) References #438

Note: See TracTickets for help on using tickets.