Estou recebendo este erro quando executo algumas querys com hibernate:
could not execute native bulk manipulation query
Tem como pegar o erro “real”? ou alguma outra coisa que ajude mais no debug?
Estou recebendo este erro quando executo algumas querys com hibernate:
could not execute native bulk manipulation query
Tem como pegar o erro “real”? ou alguma outra coisa que ajude mais no debug?
Olá
Tente coloca try{}catch(){}, no trecho de código que esta ocorrendo,
e se possível colocar aqui o código e stacktrace, dai fica mais fácil de
localizar o erro…
Blz… Flwsss
Coloquei o stacktrace e recebi este erro:
org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:365)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:137)
at br.com.acotel.cdr.model.MessageDAO.insert(Unknown Source)
at br.com.acotel.cdr.collector.CollectorMessage.getMessage(Unknown Source)
at br.com.acotel.cdr.collector.Main.main(Unknown Source)
Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into "10_2_100_31".message_temp (flag, field_1, field_2, field_3, field_4, field_5, field_6, field_7, field_8, field_9, "from", group_name, message, message_id, sc_connection, si_protocol, status, "timestamp", "to", id_type_message, id_message_temp) values ('0', 'BR09020', NULL, NULL, NULL, '5477c2a9', '0100', NULL, 'SMsadPerPas', '0', '969645454', 'oiasdtiasdm1', 'JAVA TESTANDO 2 !!! V_O_V', '122411216854243427575
', 'ch8130martx01', '0000', 'ACK', '2008-10-15 20:09:28', '559881462681', 1, 650) was aborted. Call getNextException to see the cause.
at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2530)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1317)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:350)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2592)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
... 10 more
Saberia dizer pq está dando este erro?
Sendo que quando eu pego a query e executo na mão ela roda
Tive o mesmo problema em um cliente.
O sql estava correto, porém, o usuário não tinha permissões necessarias.
A tradução deste erro:
Não foi possível executar consulta nativa de manipulação em massa
Comigo acontece no Oracle!