Opengamma version dev 1.2.x branch maven build 1.2.2
the code works fine with HSQLDB but not with postgresql.
code used
ManageableHistoricalTimeSeriesInfo info = new ManageableHistoricalTimeSeriesInfo();
info.setDataField(dataField);
info.setDataProvider(dataProvider);
info.setObservationTime(observationTime);
info.setDataSource(dataSource);
ManageableSecurity security = ConfigSource.getOGSecurityResource().getSecurity(idb);
info.setExternalIdBundle(ExternalIdBundleWithDates.of(security.getExternalIdBundle()));
info.setName(dataField + " " +idb.toString()));
HistoricalTimeSeriesInfoDocument addedDoc = htsMaster.add(new HistoricalTimeSeriesInfoDocument(info));
htsMaster.updateTimeSeriesDataPoints(addedDoc.getInfo().getTimeSeriesObjectId(), timeSeries);
error:
com.opengamma.OpenGammaRuntimeException: Server threw exception: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [CALL NEXT VALUE FOR hts_master_seq]; nested exception is org.postgresql.util.PSQLException: ERROR: syntax error at or near “CALL” Position: 1
at com.opengamma.util.rest.ExceptionThrowingClientFilter.handle(ExceptionThrowingClientFilter.java:75)
at com.sun.jersey.api.client.Client.handle(Client.java:648)
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:680)
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:568)
at com.opengamma.master.historicaltimeseries.impl.RemoteHistoricalTimeSeriesMaster.add(RemoteHistoricalTimeSeriesMaster.java:105)
at com.opengamma.master.historicaltimeseries.impl.RemoteHistoricalTimeSeriesMaster.add(RemoteHistoricalTimeSeriesMaster.java:35)
at com.algotree.ogloader.timeseries.TimeSeriesResource.addOrUpdate(TimeSeriesResource.java:281)
Caused by: com.sun.jersey.api.client.UniformInterfaceException: POST http://localhost:8080/jax/components/HistoricalTimeSeriesMaster/central/infos returned a response status of 500 Internal Server Error
at com.opengamma.util.rest.ExceptionThrowingClientFilter.handle(ExceptionThrowingClientFilter.java:64)
… 13 more