Bob MacCallum wrote:
> Hi,
> 
> I'm just guessing that this data type is limited to 255 characters.
> If you really need more, then "text" is probably what you want.

Hmmm.... it shouldn't be. "text" is not an allowed value in the xml 
file. The definitions in this file are passed on to Hibernate which 
should select a column type that can hold at least the specified number 
of characters. If this is so or not in this case I can't tell. We are 
mainly using length="255" or length="65535" and they come out as 
"varchar(255)" and "text" column types. Can you check that the 
"genename" column is of a type that is able to hold at least 300 characters?

There is also an old ticket in our trac server 
(http://base.thep.lu.se/ticket/438) which is about a bug that is related 
to a rather old MySQL version and a character encoding issue. I don't 
know if this could be the problem. It all depends on your MySQL version 
and connection settings and also on the actual data in the file.

Also note that the this error happens during a flush operation which 
means that the actual line number (4506) may not be the line with the 
problematic data. The flush interval is configured by the db.batch-size 
setting in base.config. The default value is 50 which means that the 
data that is causing the problem can be anywhere between line 4457 and 4506.

Hope this helps. Otherwise please post some more information regarding 
your server environment (MySQL version etc.). It would also be useful 
with parts of the file that is causing the problems.

/Nicklas

> 
> HTH
> 
> Bob.
> 
> flap...@free.fr writes:
>  > Hello,
>  > 
>  > I'm using the base-2.14.1 and I'm trying to import a genepix GAL file.
>  > 
>  > I've add in the file named "extended-properties.xml", this :
>  > 
>  >            <property
>  >                    name="genename"
>  >                    title="GeneName"
>  >                    description="The identifier for the Gene name"
>  >                    column="genename"
>  >                    type="string"
>  >                    length="300"
>  >            />
>  > 
>  > I was planning to have the gene name linked to the reporter.
>  > 
>  > But i got this error :
>  > 
>  > net.sf.basedb.core.BaseException: Data truncation: Data too long for 
> column 'genename' at row 1 on line 4506 in file 'placenta_cto_sghm.gal': 6 11 
> 4 IMAGE:1473...
>  > at 
> net.sf.basedb.plugins.AbstractFlatFileImporter.doImport(AbstractFlatFileImporter.java:731)
>  > at 
> net.sf.basedb.plugins.AbstractFlatFileImporter.run(AbstractFlatFileImporter.java:468)
>  > at 
> net.sf.basedb.core.PluginExecutionRequest.invoke(PluginExecutionRequest.java:110)
>  > at 
> net.sf.basedb.core.InternalJobQueue$JobRunner.run(InternalJobQueue.java:506)
>  > at java.lang.Thread.run(Thread.java:619)
>  > Caused by: net.sf.basedb.core.BaseException: Data truncation: Data too 
> long for column 'genename' at row 1
>  > at net.sf.basedb.core.BasicBatcher.flushUpdate(BasicBatcher.java:453)
>  > at net.sf.basedb.core.BasicBatcher.update(BasicBatcher.java:352)
>  > at 
> net.sf.basedb.plugins.ReporterFlatFileImporter.handleData(ReporterFlatFileImporter.java:656)
>  > at 
> net.sf.basedb.plugins.AbstractFlatFileImporter.doImport(AbstractFlatFileImporter.java:699)
>  > ... 4 more
>  > Caused by: java.sql.BatchUpdateException: Data truncation: Data too long 
> for column 'genename' at row 1
>  > at 
> com.mysql.jdbc.ServerPreparedStatement.executeBatchSerially(ServerPreparedStatement.java:814)
>  > at 
> com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1452)
>  > at 
> com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723)
>  > at net.sf.basedb.core.BasicBatcher.flushUpdate(BasicBatcher.java:445)
>  > ... 7 more
>  > 
>  > the data for the column genename on line 4506 is almost the shorter of the 
> GAL file ... I can delete/switch/mix the line, the import is stopping on this 
> line every time.
>  > 
>  > Where's the problem ?
>  > 
>  > Thanks for the help,
>  > 
>  > Flavien
>  > 
>  > 
> ------------------------------------------------------------------------------
>  > This SF.Net email is sponsored by the Verizon Developer Community
>  > Take advantage of Verizon's best-in-class app development support
>  > A streamlined, 14 day to market process makes app distribution fast and 
> easy
>  > Join now and get one step closer to millions of Verizon customers
>  > http://p.sf.net/sfu/verizon-dev2dev 
>  > _______________________________________________
>  > The BASE general discussion mailing list
>  > basedb-users@lists.sourceforge.net
>  > unsubscribe: send a mail with subject "unsubscribe" to
>  > basedb-users-requ...@lists.sourceforge.net
> 


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
The BASE general discussion mailing list
basedb-users@lists.sourceforge.net
unsubscribe: send a mail with subject "unsubscribe" to
basedb-users-requ...@lists.sourceforge.net

Reply via email to