ZODB.POSException.Unsupported: Storing Blobs

When creating content type File or Image with a file or an image I get the following Exception:

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 173, in transaction_pubevents
  Module transaction._manager, line 257, in commit
  Module transaction._manager, line 134, in commit
  Module transaction._transaction, line 282, in commit
  Module transaction._compat, line 49, in reraise
  Module transaction._transaction, line 273, in commit
  Module transaction._transaction, line 456, in _commitResources
  Module transaction._compat, line 49, in reraise
  Module transaction._transaction, line 430, in _commitResources
  Module ZODB.Connection, line 498, in commit
  Module ZODB.Connection, line 545, in _commit
  Module ZODB.Connection, line 582, in _store_objects
ZODB.POSException.Unsupported: Storing Blobs in <ZODB.mvccadapter.MVCCAdapterInstance 
    object at 0x000001ED5A77A6D0> is not supported.

I get the Exception both in linux and in windows.

The zope.conf is generated with cookiecutter-zope-instance with following configuration:

default_context:
    target: '%ZOPE_INSTANCE_NAME%'
    wsgi_listen: '%ZOPE_INSTANCE_HOST%:%ZOPE_INSTANCE_PORT%'
    initial_user_name: 'admin'
    initial_user_password: 'admin'
    db_storage: 'zeo'
    db_zeo_server: '%ZEO_HOST%:%ZEO_PORT%'
    #db_filestorage_location: "filestorage/Data.fs"
    db_blobs_location: "blobstorage"
# This file was generated by "cookiecutter-zope-instance"
%define INSTANCEHOME S:/Plone_6.0.0rc1/parts/client1
instancehome $INSTANCEHOME
%define CLIENTHOME S:/Plone_6.0.0rc1/parts/client1/var
clienthome $CLIENTHOME
debug-mode off
security-policy-implementation C
verbose-security off
default-zpublisher-encoding utf-8
<environment>
    CHAMELEON_CACHE S:/Plone_6.0.0rc1/parts/client1/var/cache
    zope_i18n_compile_mo_files true
</environment>
# Database
<zodb_db main>
    mount-point /
    cache-size 30000
    # ZEO storage
    <zeoclient>
        # blobs
        shared-blob-dir true
        blob-dir S:/Plone_6.0.0rc1/parts/blobstorage
        # general settings
        server 127.0.0.1:8100
        name 1
        cache-size 128MB
        # Advanced options
        read-only-fallback true
        read-only true
        drop-cache-rather-verify False
    </zeoclient>
</zodb_db>

I get the same error no matter if read-only and read-only-fallback are set to true or false

@yurj Thanks. I've read this one and other hints. But I don't understand it.

I've read and re-read Configuring and Running Zope and specially the Zope configuration reference and I get the feeling that I don't understand anything at all.

What I see is a list of directives with specific meanings but I don't have any idea how to put them together.

I've studied different running configurations. But when I change something (like above) it stops to work.

Can someone help understanding how to configure Zope? Is there some usefull documentation?

Where can I read why <filestorage> is a child element of <blobstorage> which is a child element of <zodb_db> (see below)? I cannot follow it from the documentation.

In the Zope configuration reference the elements <filestorage> and <blobstorage> are simply listed under zodb.storage* without any information about how to embed them. None of them is listed under <zodb_db>.

<zodb_db main>
    # Main database
    cache-size $(ZODB_CACHE_SIZE)
    # Blob-enabled FileStorage database
    <blobstorage>
      blob-dir $INSTANCE/var/blobstorage
      # FileStorage database
      <filestorage>
        path $INSTANCE/var/filestorage/Data.fs
      </filestorage>
    </blobstorage>
    mount-point /
</zodb_db>

I'v solved this issue:

I'm using a <zeoclient>. The key blob-dir has a different meaning as the key with the same name in <filestorage>. This was the cause of my confusion.

Since I use <zeoclient> which refers to a <filestorage> defined in the file zeo.conf the blob-dir can be declared there (i.e. in zeo.conf) to provide blob support.

I've got some very useful answers and explanations to these questions from @dieter here