Comments (1)
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)
- skipping records after successful/unsuccessful import HOT 1
- "main" java.lang.NullPointerException
- DataFile#getCSVReader ignores DataFileEncoding
- Error: Unable to access jarfile
- Feeder fails to read FoI position HOT 6
- Null Pointer Exception (NPE) when feeder tries to register a sensor
- Number of read lines not stored HOT 1
- Cannot build importer when host in timezone MST (-07:00)
- Parsing Unix time fails
- Bad srsName forging in insertObservation request HOT 1
- Provide basic authentication for secure SOS HOT 8
- NPE when optional parameter -d is not used
- Server generated offering identifier HOT 6
- Cannot open configuration file: UnsupportedOperationException
- NullPointerException when parsing Date/Time HOT 5
- Multi-Phenomenon InsertObservation HOT 3
- Transactional authorization token support HOT 1
- Wizard module ClassCastException HOT 6
- Failed import of new sensor HOT 2
- NoSuchMethodException SOS Importer Wizard Module
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sos-importer.