[Geoserver-devel] [JIRA] (GEOS-8009) Saving requests withs errors fails in Postgres due to LOB usage

Andreas W created an issue

GeoServer / BugGEOS-8009

Saving requests withs errors fails in Postgres due to LOB usage

Issue Type:

BugBug

Affects Versions:

2.7.1.1

Assignee:

Unassigned

Components:

Monitoring

Created:

01/Mar/17 9:41 AM

Priority:

MediumMedium

Reporter:

Andreas W

Saving request data to a Postgresql backend fails if an error occured with the request: The writing of the error into a LOB column fails:

2017-03-01 08:19:42,480 ERROR [def.AbstractFlushingEventListener] - Could not synchronize database state with session
org.hibernate.exception.GenericJDBCException: could not update: [org.geoserver.monitor.RequestData#80643]
        at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
        at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2453)
        at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2335)
        at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2635)
        at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:115)
        at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
        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.springframework.orm.hibernate3.HibernateAccessor.flushIfNecessary(HibernateAccessor.java:390)
        at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:407)
        at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:339)
        at org.geoserver.monitor.hib.HibernateMonitorDAO2$Insert.run(HibernateMonitorDAO2.java:641)
        at org.geoserver.monitor.hib.HibernateMonitorDAO2$Save.run(HibernateMonitorDAO2.java:624)
        at org.geoserver.monitor.hib.HibernateMonitorDAO2$Async.run(HibernateMonitorDAO2.java:598)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.postgresql.util.PSQLException: Large Objects may not be used in auto-commit mode.
        at org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:304)
        at org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:291)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.createBlob(AbstractJdbc2Statement.java:3079)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.setBlob(AbstractJdbc2Statement.java:3132)
        at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.setBlob(DelegatingPreparedStatement.java:184)
        at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.setBlob(DelegatingPreparedStatement.java:184)
        at org.geoserver.monitor.hib.ErrorUserType.nullSafeSet(ErrorUserType.java:100)
        at org.hibernate.type.CustomType.nullSafeSet(CustomType.java:169)
        at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:2025)
        at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2399)
        ... 20 more

I supposed this could be solved by using a transaction instead of auto-commit mode.

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v1000.789.2#100032-sha1:1297bd3)

Atlassian logo