Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » EclipseStore And Postgres Demo Application(EclipseStore And Postgres Demo Application)
EclipseStore And Postgres Demo Application [message #1863589] Wed, 14 February 2024 07:17 Go to next message
Snehal Pokharkar is currently offline Snehal PokharkarFriend
Messages: 1
Registered: February 2024
Junior Member
Hi Team,
I am currently trying to perform basic operations like create,update,fetch and delete using eclipsestore and postgres.
These basic operations working fine.
To connect to postgres and create storage every time using below:
SqlFileSystem fileSystem = SqlFileSystem.New(SqlConnector.Caching(SqlProviderPostgres.New(dataSource)));
EmbeddedStorageManager storageManager = EmbeddedStorage.start(fileSystem.ensureDirectoryPath(name));

However if I start java application in multiple instances and try to add or update records to root and perform storeroot operation,facing below issue:

Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "UserDemo$channel_0_pk"
Detail: Key (identifier, start)=(channel_0_1.dat, 256280) already exists.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2532)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2267)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:312)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:448)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:369)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:153)
at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:119)
at org.eclipse.store.afs.sql.types.SqlConnector$Default.lambda$writeData$19(SqlConnector.java:902)
at org.eclipse.store.afs.sql.types.SqlProvider$Abstract.execute(SqlProvider.java:390)

I am unable to fetch latest storageManager and root content, before storing root. How to get latest storagemanger so that while storing data latest start and end values from User$channel_0 will be available and next offset value will be stored ?
Re: EclipseStore And Postgres Demo Application [message #1863594 is a reply to message #1863589] Wed, 14 February 2024 13:04 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

You might want to try posting in https://github.com/eclipse-store/store/discussions . There's not a lot of discussion related to that project here or in its actual Forum at https://www.eclipse.org/forums/index.php/f/630/ .

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:When i run my emf ecore model project, what classes run and where can i find those?
Next Topic:Eclipse IDE font change broken
Goto Forum:
  


Current Time: Sun Apr 28 15:29:09 GMT 2024

Powered by FUDForum. Page generated in 0.11349 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top