GithubHelp home page GithubHelp logo

Comments (1)

johnjohndoe avatar johnjohndoe commented on August 17, 2024

With the help of @CarstenHollmann and the SOS server log level set to TRACE I found an BatchUpdateException and ... duplicate key value ... in /var/log/tomcat7/52n-sos-webapp.log:

ERROR [http-bio-8080-exec-15] [SqlExceptionHelper.java:146] 
  Batch entry 0 insert into ... was aborted.  Call getNextException to see the cause.
WARN [http-bio-8080-exec-15] [SqlExceptionHelper.java:144] SQL Error: 0, SQLState: 23505
ERROR [http-bio-8080-exec-15] [SqlExceptionHelper.java:146] 
  ERROR: duplicate key value violates unique constraint "observationidentity"
  Detail: Key (seriesid, phenomenontimestart, phenomenontimeend, resulttime)=
  (112, 2015-01-02 00:00:00, 2015-01-02 00:00:00, 2015-01-02 00:00:00) already exists.
ERROR [http-bio-8080-exec-15] [BatchingBatch.java:137] HHH000315: Exception executing batch [could not execute batch]
WARN [http-bio-8080-exec-15] [ExceptionLogger.java:73] Exception thrown
org.n52.sos.exception.ows.NoApplicableCodeException: Observation with same values already contained in database
    at org.n52.sos.ds.hibernate.InsertObservationDAO.checkContainsAndThrow(InsertObservationDAO.java:281) ~[hibernate-dao-4.3.0.jar:na]
    at org.n52.sos.ds.hibernate.InsertObservationDAO.insertObservation(InsertObservationDAO.java:239) ~[hibernate-dao-4.3.0.jar:na]
    at org.n52.sos.request.operator.SosInsertObservationOperatorV20.receive(SosInsertObservationOperatorV20.java:116) ~[transactional-v20-4.3.0.jar:na]
    at org.n52.sos.request.operator.SosInsertObservationOperatorV20.receive(SosInsertObservationOperatorV20.java:92) ~[transactional-v20-4.3.0.jar:na]
    ...

Caused by: org.hibernate.exception.ConstraintViolationException: could not execute batch
    at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:129) ~[hibernate-core-4.3.5.Final.jar:4.3.5.Final]
    at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) ~[hibernate-core-4.3.5.Final.jar:4.3.5.Final]
    ...
    at org.n52.sos.ds.hibernate.InsertObservationDAO.insertObservation(InsertObservationDAO.java:217) ~[hibernate-dao-4.3.0.jar:na]
    ... 64 common frames omitted

Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into ... was aborted.  
Call getNextException to see the cause.
    at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2740) ~[postgresql-9.3-1101-jdbc4.jar:na]
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1891) ~[postgresql-9.3-1101-jdbc4.jar:na]
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:405) ~[postgresql-9.3-1101-jdbc4.jar:na]
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2889) ~[postgresql-9.3-1101-jdbc4.jar:na]
    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1135) ~[c3p0-0.9.2.1.jar:0.9.2.1]
    at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:123) ~[hibernate-core-4.3.5.Final.jar:4.3.5.Final]
    ... 77 common frames omitted

Looking at the sensordata.csv.52n-sos-import-config-0.5.xml we discovered that I was using the same identifier for multiple columns in the .csv file.


I am going to create a new configuration file. Please decide if you want to use the above information to enhance the error output of the importer.

from sos-importer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.