another problem with pocketchange

4 views
Skip to first unread message

Tim P

unread,
Apr 20, 2009, 12:25:39 PM4/20/09
to The Lift Book
Hi
This time I've added a picture to my Add Expense operation but it
looks like it doesn't fit.
Tim

Exception occured while processing /index
Message: java.sql.SQLDataException: A truncation error was encountered
trying to shrink LONG VARCHAR FOR BIT DATA 'XX-RESOLVE-XX' to length
32700.
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException
(Unknown Source)
org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown
Source)
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException
(Unknown Source)
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException
(Unknown Source)
org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown
Source)
org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown
Source)
org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown
Source)
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement
(Unknown Source)
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate
(Unknown Source)
net.liftweb.mapper.MetaMapper$$anonfun$12.prepStat$1(MetaMapper.scala:
642)
net.liftweb.mapper.MetaMapper$$anonfun$12$$anonfun$19.apply
(MetaMapper.scala:659)
net.liftweb.mapper.MetaMapper$$anonfun$12$$anonfun$19.apply(Meta

TylerWeir

unread,
Apr 20, 2009, 12:31:52 PM4/20/09
to The Lift Book
We changed the default database to derby, but if you'd like to play
with attachments, I'd recommend setting up a postgres or mysql DB.

Derek Chen-Becker

unread,
Apr 22, 2009, 4:38:25 PM4/22/09
to the-li...@googlegroups.com
This may be a bug in Lift. The Derby driver config in Mapper says that Binary fields in Derby are "LONG VARCHAR FOR BIT DATA" instead of "BLOB". "LONG VARCHAR..." has a limit of 32762 bytes, so that's where this is breaking. I'm going to ask on the Lift list why we're not using BLOB. Hopefully this will be something that we can fix.

Derek

TylerWeir

unread,
Apr 23, 2009, 1:33:20 PM4/23/09
to The Lift Book
Maybe we need to switch to H2 as the default DB.

I test it out on the weekend.

Derek Chen-Becker

unread,
Apr 23, 2009, 1:51:50 PM4/23/09
to the-li...@googlegroups.com
I was just thinking that, although I'm not thrilled about leaving Derby users in the cold for binary support.

TylerWeir

unread,
Apr 23, 2009, 1:59:55 PM4/23/09
to The Lift Book
What do you think the likelihood of someone *needing* to use Derby?

I understand where you're coming from though.

Derek Chen-Becker

unread,
Apr 23, 2009, 2:07:00 PM4/23/09
to the-li...@googlegroups.com
I'll just change the ticket on Lift to a wontfix and we can reopen in the future if needed. I'll see if I can change PocketChange to H2 so that it Just Works.

Derek

David Pollak

unread,
Apr 23, 2009, 2:56:00 PM4/23/09
to the-li...@googlegroups.com
On Thu, Apr 23, 2009 at 11:07 AM, Derek Chen-Becker <dchen...@gmail.com> wrote:
I'll just change the ticket on Lift to a wontfix and we can reopen in the future if needed. I'll see if I can change PocketChange to H2 so that it Just Works.

That's my preference.  If someone must have Derby, they can send us a patch.
 



--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp
Reply all
Reply to author
Forward
0 new messages