- setup a multiple repositories (check attached template to setup Oracle DB in this case)
- login in
- select the second repository
- create a workspace
- create a file
- add a comment
- it is not visible
- check the DB table COMMENT, the comment has been created
- there is nothing in the RELATION table though
- check the logs, it shows:
The error is due to problems while retrieving comments in the CommentManagerImpl.getComments method. While debugging it shows that the default repository is used. For example id secondrepo/47b5fd33-3a30-4524-8d23-94f39679136a becomes default/47b5fd33-3a30-4524-8d23-94f39679136a.
Check around this code in CommentManagerImpl.getComments:
The resulting statementList contains mismatched repositories.
Looking at CoreGraph.run(), a call to createId returns wrong localName in QNameResource objects. While graph.getStatements passes oldDocResource to the Graph, it is not used to create the QName Resource:
Since the session is not passed as a parameter to the graph, it is created in the graph itself:
As a result, the default repository is used.
maybe adding methods taking the session as a parameter could fix this:
This way the StatementFinder would be created with the proper session, using the right repository.
Also please note that this may be only one issue. After fixing this, one has to check a comment is correctly created and read.