[Mapbender-users] ContextErrorException: Warning: class_exists() expects parameter 1 to be string, array given in ApplicationYAMLMapper.php line 145

Selina Patelas Selina.Patelas at steuernagel-ing.de
Tue Jan 9 00:04:33 PST 2018

Dear mapbender users,

I am trying to build up a web solution for our "Planauskunft".
Mapbender3 seems to be the perfect tool. I would like to use the already implemented:

-          digitizer

-          search router

-          self registration

Therefore I installed Mapbender3  (, Xampp (7.2.0) with PHP 5.6.24,
as well as Postgresql (PGAdmin 4) and QGIS at a Windows 7 (64bit) test PC.

So far I followed the steps from https://doc.mapbender3.org/de/book/installation/installation_windows.html
Before I emptyed the cache I could use the frontend to desing the UI for the search router and the digitzer,
but I did not manage to connect them to my databases so far.

After I added some changes to the config.yml and parameter.yml according to the instructions for building up a databaseconnection,
the self registration is acitvated and the login works fine, but after that, following error occours using .../app.php or .../app_dev.php:

ContextErrorException: Warning: class_exists() expects parameter 1 to be string, array given
in C:\mapbender3\mapbender\src\Mapbender\CoreBundle\Component\ApplicationYAMLMapper.php line 145

The changes in config.yml and parameter.yml look like this:
(I commented the additional databases for search router and digitzier out so that only the default database created by the symfony installation part
is activated to minimize the source of errors but the error still exists) I emptyed the cache several times after adding the changes.

    - { resource: parameters.yml }
    - { resource: security.yml }

    #esi:             ~
    translator:      { fallback: %fallback_locale% }
    secret:          %secret%
        resource: "%kernel.root_dir%/config/routing.yml"
        strict_requirements: %kernel.debug%
    form:            true
    csrf_protection: true
    validation:      { enable_annotations: true }
    templating:      { engines: ['twig'] } #assets_version: SomeVersionScheme
    default_locale:  %locale%
        cookie_httponly: true
        cookie_secure: %cookie_secure%
        cookie_lifetime: %cookie_lifetime%

# Twig Configuration
    debug:            %kernel.debug%
    strict_variables: %kernel.debug%
        fom:    %fom%
            - 'FOMCoreBundle:Form:fields.html.twig'

# Assetic Configuration
    debug: %kernel.debug%
    use_controller: true
        cssrewrite: ~
        sass: ~

# Doctrine Configuration
        default_connection: default
        #Datenbankverbindung "default"
                driver:   %database_driver%
                host:     %database_host%
                port:     %database_port%
                dbname:   %database_name%
                path:     %database_path%
                user:     %database_user%
                password: %database_password%
                charset:  UTF8
                logging: %kernel.debug%
                profiling: %kernel.debug%
#       #Datenbankverbindung "search_router"
#           search_router:
#               driver:   %database2_driver%
#               host:     %database2_host%
#               port:     %database2_port%
#               dbname:   %database2_name%
#               path:     %database2_path%
#               user:     %database2_user%
#               password: %database2_password%
#               charset:  UTF8
#               logging: %kernel.debug%
#               profiling: %kernel.debug%
#       #Datenbankverbindung "digitizer"
#           digitizer:
#               driver:   %database3_driver%
#               host:     %database3_host%
#               port:     %database3_port%
#               dbname:   %database3_name%
#               path:     %database3_path%
#               user:     %database3_user%
#               password: %database3_password%
#               charset:  UTF8
#               logging: %kernel.debug%
#               profiling: %kernel.debug%

        auto_generate_proxy_classes: %kernel.debug%
        auto_mapping: true

# Swiftmailer Configuration
    transport: %mailer_transport%
    host:      %mailer_host%
    username:  %mailer_user%
    password:  %mailer_password%
    spool:     { type: memory }

# FOM Manager Configuration
    route_prefix: /manager

# FOM User Configuration
    selfregister: true
    reset_password: true
    max_registration_time: 1
    max_reset_time: 1
    mail_from_address: Planauskunft at xxx.de<mailto:Planauskunft at xxx.de>
    mail_from_name: xxx_Planauskunft
    profile_entity: FOM\UserBundle\Entity\BasicProfile
    profile_formtype: FOM\UserBundle\Form\Type\BasicProfileType
    profile_template: FOMUserBundle:User:basic_profile.html.twig
        - Self Registered
        - Demo Group

    # Allow to create user log table on the fly if the table doesn't exits.
    # Default: true
    auto_create_log_table: false

    # Time between to check login tries
    login_check_log_time: "-5 minutes"

    # Login attemps before delay starts
    login_attempts_before_delay: 3

    # Login delay after all attemps are failed
    login_delay_after_fail: 5 # Seconds

# OWSProxy Configuration
    logging: %ows_proxy3_logging%
    obfuscate_client_ip: %ows_proxy3_obfuscate_client_ip%
        host: %ows_proxy3_host%
        port: %ows_proxy3_port%
        connecttimeout: %ows_proxy3_connecttimeout%
        timeout: %ows_proxy3_timeout%
        user: %ows_proxy3_user%
        password: %ows_proxy3_password%
        checkssl: true
        noproxy: %ows_proxy3_noproxy%

# Mapbender Configuration
mapbender_core: ~


    #Datenbankverbindung "default"
    database_driver:   pdo_pgsql
    database_host:     localhost
    database_port:     5432
    database_name:     mapbender3
    database_path:     ~
    database_user:     postgres
    database_password: xxx

#    #Datenbankverbindung "Search_Router"
#    database2_driver:   pdo_pgsql
#    database2_host:     localhost
#    database2_port:     5432
#    database2_name:     search_router
#    database2_path:     ~
#    database2_user:     postgres
#    database2_password: xxx
#    #Datenbankverbindung "Digitizer"
#    database3_driver:   pdo_pgsql
#    database3_host:     localhost
#    database3_port:     5432
#    database3_name:     digitizer
#    database3_path:     ~
#    database3_user:     postgres
#    database3_password: xxx

    mailer_transport:  smtp
    mailer_host:       localhost
    mailer_user:       ~
    mailer_password:   ~

    # locale en, de, it, es, ru, nl, pt are available
    fallback_locale:   en
    locale:            en
    secret:            ThisTokenIsNotSoSecretChangeIt

        server_name:   Mapbender3
        server_logo:   bundles/mapbendercore/image/logo_mb3.png

    # framework : http://symfony.com/doc/2.1/reference/configuration/framework.html#cookie-lifetime
    cookie_secure: false
    cookie_lifetime: 3600

# OWSProxy Configuration
    ows_proxy3_logging: false
    ows_proxy3_obfuscate_client_ip: true
    ows_proxy3_host: ~
    ows_proxy3_port: ~
    ows_proxy3_connecttimeout: 60
    ows_proxy3_timeout: 90
    ows_proxy3_user: ~
    ows_proxy3_password: ~
    ows_proxy3_noproxy: ~

I  would be very pleased to hear from anybody that could help me with this. :)
Please feel free to let me know if you need any more information on this.

Best regards
Selina Patelas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapbender_users/attachments/20180109/5ea7d3e2/attachment-0001.html>

More information about the Mapbender_users mailing list