Estou com problemas ao tentar inserir um array de bytes em um campo do tipo oid.
Caused by: org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not insert: [br.com.atlantico.maragato.cadastrosauxiliares.model.ImagemTO]; uncategorized SQLException for SQL [insert into imagem (arquivo_imagem, tipo, titulo, id) values (?, ?, ?, ?)]; SQL state [25P01]; error code [0]; Objetos Grandes não podem ser usados no modo de efetivação automática (auto-commit).; nested exception is org.postgresql.util.PSQLException: Objetos Grandes não podem ser usados no modo de efetivação automática (auto-commit). at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:96) at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:257) at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424) at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:411) at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:370) at org.springframework.orm.hibernate3.HibernateTemplate.persist(HibernateTemplate.java:719) at br.com.atlantico.framex.dao.hibernate.GenericHibernateDAO.create(GenericHibernateDAO.java:70) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148) at org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.invoke(ThrowsAdviceInterceptor.java:118) ... 27 more
essa é a excessão gerada pelo meu código java.
CREATE TABLE imagem ( id int8 NOT NULL, arquivo_imagem oid NOT NULL, tipo int4 NOT NULL, titulo varchar(100) NOT NULL, CONSTRAINT imagem_pkey PRIMARY KEY (id), CONSTRAINT imagem_titulo_key UNIQUE (titulo) ) WITHOUT OIDS; ALTER TABLE imagem OWNER TO postgres;