db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Farrukh Najmi <Farrukh.Na...@Sun.COM>
Subject Re: A truncation error was encountered tryin,g to shrink BLOB 'XX-RESOLVE-XX' to length 1048576.
Date Tue, 06 Jun 2006 12:06:04 GMT
Farrukh Najmi wrote:
>
> Dear Derby team,
>
> I am storing a blob into Derby 10.1.2.1 using hibernate 

In case it is helpful, here is the source code in stack trace below that 
uses hibernate to insert the blob:

http://ebxmlrr.cvs.sourceforge.net/ebxmlrr/omar/src/java/org/freebxml/omar/server/repository/hibernate/HibernateRepositoryManager.java?view=log

Thanks.
> and getting this SQLException from Derby (see second stack trace below).
> The blob is just a gig image of size 1.4MB. This seems well within the 
> 2GB limit for blobs. What is wrong and how can I fix it?
> Thanks for your help.
>
> 2006-06-06 07:22:37,191 ERROR 
> org.freebxml.omar.server.repository.hibernate.HibernateRepositoryManager[http-8443-Processor25]

> - Failed to insert RepositoryItem 
> urn:uuid:a552cac2-cab0-4042-b973-f1568c1d4bfd.
> net.sf.hibernate.JDBCException: could not insert: 
> [org.freebxml.omar.server.repository.hibernate.RepositoryItemBean#RepositoryItemKey:

> lid=urn:uuid:a552cac2-cab0-4042-b973-f1568c
> 1d4bfd versionName=1.1]
>        at 
> net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:478) 
>
>        at 
> net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:442) 
>
>        at 
> net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29) 
>
>        at 
> net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2418)
>        at 
> net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2371)
>        at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2240)
>        at 
> net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61) 
>
>        at 
> org.freebxml.omar.server.repository.hibernate.HibernateRepositoryManager.insert(HibernateRepositoryManager.java:202)

>
>
> ....
>
> Caused by: SQL Exception: A truncation error was encountered trying to 
> shrink BLOB 'XX-RE
> SOLVE-XX' to length 1048576.
>        at 
> org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java)
>        at 
> org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java)

>
>        at 
> org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java)

>
>        at 
> org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java) 
>
>        at 
> org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java) 
>
>        at 
> org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java) 
>
>        at 
> org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java)

>
>        at 
> org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(EmbedPreparedStatement.java)

>
>        at 
> org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)

>
>        at 
> org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)

>
>        at 
> net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22) 
>
>        at 
> net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:468) 
>
>        ... 60 more
>


-- 
Regards,
Farrukh



Mime
View raw message