[Solved] XWiki 10.9 stores on file instead of hibernate

Hello,

I just upgraded from XWiki 10.3 and configured xwiki.cfg the following way. The problem is that attachments are still stored on file system (“Tomcat90\work\Catalina\localhost\xwiki\storage\xwiki”). What’s the problem? :disappointed_relieved: Thank you.

#-# Stores with both "hibernate" and "file" support in XWiki Standard.
#-# [Since 10.5RC1] The default is "file" for all of them.
#-# 
#-# [Since 9.0RC1] The default document content recycle bin storage.
#-# This property is only taken into account when deleting a document and has no effect on already deleted documents.
# xwiki.store.recyclebin.content.hint=file
#-# The attachment storage.
# xwiki.store.attachment.hint=file
#-# The attachment versioning storage. Use 'void' to disable attachment versioning.
# xwiki.store.attachment.versioning.hint=file
#-# [Since 9.9RC1] The default attachment content recycle bin storage.
#-# This property is only taken into account when deleting an attachment and has no effect on already deleted documents.
# xwiki.store.attachment.recyclebin.content.hint=file
#-# 
#-# Stores with only "hibernate" support by default
#-# 
#-# The main (documents) storage. [Since 3.4M1] default is hibernate.
 xwiki.store.main.hint=hibernate
#-# The document versioning storage. [Since 3.4M1] default is hibernate.
 xwiki.store.versioning.hint=hibernate
#-# The document recycle bin storage. [Since 3.4M1] default is hibernate.
 xwiki.store.recyclebin.hint=hibernate
#-# The attachment recycle bin storage. [Since 3.4M1] default is hibernate.
 xwiki.store.attachment.recyclebin.hint=hibernate
#-# [Since 3.4M1] The Migration manager.
 xwiki.store.migration.manager.hint=hibernate

#-# Whether the document recycle bin feature is activated or not
# xwiki.recyclebin=1
#-# Whether the attachment recycle bin feature is activated or not
# storage.attachment.recyclebin=1
#-# Whether the document versioning feature is activated or not
 xwiki.store.versioning=1
#-# Whether the attachment versioning feature is activated or not
 xwiki.store.attachment.versioning=1
#-# Whether the attachments should also be rolled back when a document is reverted.
 xwiki.store.rollbackattachmentwithdocuments=1

#-# The path to the hibernate configuration file.
 xwiki.store.hibernate.path=/WEB-INF/hibernate.cfg.xml

Hi, did you follow the doc at https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Attachments#HAttachmentStorage ?

I see for example:

xwiki.store.attachment.hint = file
xwiki.store.attachment.versioning.hint = file

## Since 9.10RC1
xwiki.store.attachment.recyclebin.content.hint=file
## Before 9.10RC1
xwiki.store.attachment.recyclebin.hint = file

# Attachments being also stored in the deleted documents it's safer to also enable filesystem storage
xwiki.store.recyclebin.content.hint = file

Are all these set to hibernate? Your sample config file doesn’t show the value for xwiki.store.attachment.hint for example. It does have:

#-# The attachment storage.
# xwiki.store.attachment.hint=file

But as you can see it’s commented out and defaults to file.

Thanks

As indicated in the documentation those properties indicate the default store to use for new content, what’s already in the filesystem stay there. Did not had time to write a migration tool for people who want to more content from one store to another.

I will check that and give feedback!
I’ve already tried “old” and “new” attachments so I think the advice from Vincent should be the solution.

Now it works. I’ve ignored the outcommented parameters.
Thank you very much!