Issue 17263

Checklist imports throw name_usage_metrics mybatis exception

17263
Reporter: mdoering
Type: Bug
Summary: Checklist imports throw name_usage_metrics mybatis exception
Priority: Critical
Resolution: CantReproduce
Status: Closed
Created: 2015-02-19 13:23:35.516
Updated: 2015-02-20 17:50:15.878
Resolved: 2015-02-20 17:50:15.857
        
Description: ERROR [2015-02-19 13:16:55,937+0100] [pool-10-thread-3] org.gbif.checklistbank.cli.importer.Importer: Failed to sync taxonID '1076-sp2' from dataset 4fbe8c40-8690-4b7e-99b1-60d5d90cab60
ERROR [2015-02-19 13:16:56,038+0100] [pool-10-thread-3] org.gbif.checklistbank.cli.importer.Importer: Aborting sync of dataset 4fbe8c40-8690-4b7e-99b1-60d5d90cab60
ERROR [2015-02-19 13:16:56,138+0100] [pool-10-thread-3] org.gbif.checklistbank.cli.importer.ImporterService: Unknown error while importing dataset [4fbe8c40-8690-4b7e-99b1-60d5d90cab60]
org.apache.ibatis.exceptions.PersistenceException:
### Error updating database.  Cause: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block
### The error may involve org.gbif.checklistbank.service.mybatis.mapper.NameUsageMetricsMapper.update-Inline
### The error occurred while setting parameters
### SQL: UPDATE name_usage_metrics     SET (count_descendants, count_children, count_synonyms,       count_p, count_c, count_o, count_f, count_g, count_sg, count_s)     = (?, ?, ?,        ?, ?, ?, ?, ?, ?, ?)     WHERE usage_fk = ?
### Cause: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block
	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26) ~[checklistbank-cli.jar:2.12-SNAPSHOT]
	at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:154) ~[checklistbank-cli.jar:2.12-SNAPSHOT]
	at sun.reflect.GeneratedMethodAccessor126.invoke(Unknown Source) ~[na:na]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_75]
	at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_75]
	at org.apache.ibatis.session.SqlSessionManager$SqlSessionInterceptor.invoke(SqlSessionManager.java:278) ~[checklistbank-cli.jar:2.12-SNAPSHOT]
	at com.sun.proxy.$Proxy34.update(Unknown Source) ~[na:na]
	at org.apache.ibatis.session.SqlSessionManager.update(SqlSessionManager.java:206) ~[checklistbank-cli.jar:2.12-SNAPSHOT]
	at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:54) ~[checklistbank-cli.jar:2.12-SNAPSHOT]
	at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52) ~[checklistbank-cli.jar:2.12-SNAPSHOT]
	at com.sun.proxy.$Proxy37.update(Unknown Source) ~[na:na]
	at org.gbif.checklistbank.service.mybatis.DatasetImportServiceMyBatis.updateUsage(DatasetImportServiceMyBatis.java:315) ~[checklistbank-cli.jar:2.12-SNAPSHOT]
	at org.gbif.checklistbank.service.mybatis.DatasetImportServiceMyBatis.syncUsage(DatasetImportServiceMyBatis.java:148) ~[checklistbank-cli.jar:2.12-SNAPSHOT]
	at org.mybatis.guice.transactional.TransactionalMethodInterceptor.invoke(TransactionalMethodInterceptor.java:101) ~[checklistbank-cli.jar:2.12-SNAPSHOT]
	at org.gbif.checklistbank.cli.importer.DatasetImportServiceCombined.syncUsage(DatasetImportServiceCombined.java:40) ~[checklistbank-cli.jar:2.12-SNAPSHOT]
	at org.gbif.checklistbank.cli.importer.Importer.syncDataset(Importer.java:86) ~[checklistbank-cli.jar:2.12-SNAPSHOT]
	at org.gbif.checklistbank.cli.importer.Importer.run(Importer.java:61) ~[checklistbank-cli.jar:2.12-SNAPSHOT]
	at org.gbif.checklistbank.cli.importer.ImporterService.handleMessage(ImporterService.java:105) [checklistbank-cli.jar:2.12-SNAPSHOT]
	at org.gbif.checklistbank.cli.importer.ImporterService.handleMessage(ImporterService.java:38) [checklistbank-cli.jar:2.12-SNAPSHOT]
	at org.gbif.common.messaging.MessageConsumer.handleCallback(MessageConsumer.java:101) [checklistbank-cli.jar:2.12-SNAPSHOT]
	at org.gbif.common.messaging.MessageConsumer.handleDelivery(MessageConsumer.java:65) [checklistbank-cli.jar:2.12-SNAPSHOT]
	at com.rabbitmq.client.impl.ConsumerDispatcher$4.run(ConsumerDispatcher.java:121) [checklistbank-cli.jar:2.12-SNAPSHOT]
	at com.rabbitmq.client.impl.ConsumerWorkService$WorkPoolRunnable.run(ConsumerWorkService.java:76) [checklistbank-cli.jar:2.12-SNAPSHOT]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_75]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_75]
	at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
Caused by: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157) ~[checklistbank-cli.jar:2.12-SNAPSHOT]
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886) ~[checklistbank-cli.jar:2.12-SNAPSHOT]
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) ~[checklistbank-cli.jar:2.12-SNAPSHOT]
	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555) ~[checklistbank-cli.jar:2.12-SNAPSHOT]
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417) ~[checklistbank-cli.jar:2.12-SNAPSHOT]
	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:410) ~[checklistbank-cli.jar:2.12-SNAPSHOT]
	at com.zaxxer.hikari.proxy.PreparedStatementProxy.execute(PreparedStatementProxy.java:44) ~[checklistbank-cli.jar:2.12-SNAPSHOT]
	at com.zaxxer.hikari.proxy.PreparedStatementJavassistProxy.execute(PreparedStatementJavassistProxy.java) ~[checklistbank-cli.jar:2.12-SNAPSHOT]
	at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:44) ~[checklistbank-cli.jar:2.12-SNAPSHOT]
	at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:69) ~[checklistbank-cli.jar:2.12-SNAPSHOT]
	at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:48) ~[checklistbank-cli.jar:2.12-SNAPSHOT]
	at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:105) ~[checklistbank-cli.jar:2.12-SNAPSHOT]
	at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:152) ~[checklistbank-cli.jar:2.12-SNAPSHOT]
	... 24 common frames omitted]]>
    


Author: mdoering@gbif.org
Comment: This appears to be caused by the related and just fixed media insert bug http://dev.gbif.org/issues/browse/POR-2665
Created: 2015-02-19 14:01:09.476
Updated: 2015-02-19 14:01:09.476