Hello forum, I am developing with v0.9.pre-alpha-2 version of ChicagoBoss, 
when a record is inserted, the famework throws 

[error] Error in controller exit:{noproc,{gen_server,call,
                         [{global,boss_news},
                          {created,"wallet_type-11",
                                   [{id,"wallet_type-11"},
                                    {description,"test123"},
                                    {created_at,{{2016,9,7},{12,46,28}}},
                                    {updated_at,undefined}]}]}} Stacktrace: 
[{gen_server,call,2,[{file,"gen_server.erl"},{line,204}]},{boss_record_lib,run_after_hooks,3,[{file,"src/boss_record_lib.erl"},{line,45}]},{boss_db,save_record,2,[{file,"src/boss_db.erl"},{line,423}]},{platform_wallet_types_controller,create,3,[{file,"/home/rgiucich/platform/src/controller/platform_wallet_types_controller.erl"},{line,39}]},{boss_web_controller,call_controller_action,3,[{file,"src/boss/boss_web_controller.erl"},{line,305}]},{boss_web_controller,apply_action,4,[{file,"src/boss/boss_web_controller.erl"},{line,297}]},{boss_web_controller,execute_action_inner,9,[{file,"src/boss/boss_web_controller.erl"},{line,276}]},{boss_web_controller_handle_request,process_dynamic_request,5,[{file,"src/boss/boss_web_controller_handle_request.erl"},{line,255}]}]
08:46:28.963 [error] "Error in controller, see console.log for details\n"
08:46:29.057 [error] POST /wallet_types/create [platform] 500 768ms

But, running boss_news:start() from console, the problem dessapear.

In another post I read that boss_news starts automatically, but in my 
installation is not true.

My boss_config

% vim: ts=4 sw=4 et ft=erlang
%%%
%%% CHICAGO BOSS PROJECT SKELETON
%%%
%%% This file can be modified by you to avoid you needing to reenter
%%% defaults when creating new projects.  For full configuration
%%% details, please visit
%%% https://github.com/ChicagoBoss/ChicagoBoss/wiki/Configuration

%%% When running tests, you may want to create a separate configuration file
%%% "boss.test.config" which, if present, will be read instead of boss.config.

[{boss, [
    {path, "./deps/boss"},
    {applications, [platform, cb_admin]},
    {assume_locale, "en"},

%%%%%%%%%%%%
%% System %%
%%%%%%%%%%%%

%% vm_cookie - Erlang cookie, must be the same for all nodes in the
%%   cluster.

%% vm_name - Node name to use in production. Must be unique for all
%%   nodes in the cluster. Defaults to <application_name>@<host_name>.
%% vm_sname - Node name to use if you wish to use a "short name" instead of a
%%   full name.
%% vm_max_processes - The limit of processes that the VM is allowed to
%%   spawn. Defaults to 32768 (the usual system default).

%    {vm_cookie, "secret"},
%    {vm_name, "leader@localhost"}
%    {vm_sname, "shortname"},
%    {vm_max_processes, 32768},


%%%%%%%%%%%%%%%%%%%%%%%%
%% Controller Filters %%
%%%%%%%%%%%%%%%%%%%%%%%%

%% controller_filter_config - Specify defaults for controller filters
%%   Sub-key 'lang' can be set to the atom 'auto' to autodetermine language
%%     universally, or can be set to a specific language by setting a string 
(e.g.
%%     "en" or "de")

%    {controller_filter_config, [
%        {lang, auto}
%    ]},

%%%%%%%%%%%%%%
%% Compiler %%
%%%%%%%%%%%%%%

%% See compile(3) for a full list of options

%    {compiler_options, [return_errors]},

%%%%%%%%%%%
%% Cache %%
%%%%%%%%%%%

%% cache_adapter - Which cache adapter to use. Currently the only
%%   valid value is memcached_bin.
%% cache_enable - Whether to enable the cache. Defaults to false.
%% cache_servers - A list of cache servers ({Host, Port,
%%   PoolSize}). Defaults to [{"localhost", 11211, 1}].
%% cache_exp_time- The maximum time to keep a cache entry, in
%%   seconds. Defaults to 60.

%    {cache_adapter, memcached_bin},
%    {cache_enable, false},
%    {cache_servers, [{"localhost", 11211, 1}]},
%    {cache_exp_time, 60}, 

%%%%%%%%%%%%%%
%% Database %%
%%%%%%%%%%%%%%

%% db_host - The hostname of the database. Defaults to "localhost".
%% db_port - The port of the database. Defaults to 1978.
%% db_adapter - The database adapter to use. Valid values are: 
%%     mock - In-memory (non-persistent) database, useful for testing
%%     mnesia - Mnesia
%%     mongodb- MongoDB
%%     mysql - MySQL
%%     pgsql - PostgreSQL
%%     riak - Riak
%%     tyrant - Tokyo Tyrant
%% db_username - The username used for connecting to the database (if
%%   needed).
%% db_password - The password used for connecting to the database (if
%%   needed).
%% db_database - The name of the database to connect to (if needed).
%% db_cache_enable - Whether to enable the cache in boss_db. Defaults 
%%   to false. Requires cache_enable to be set to true.
%% db_configure - Database adapter specific configuration options. Defaults to 
[].

    {db_host, "xxx.xxx.xxx.xxx"},
    {db_port, 30001},
    {db_adapter, pgsql},
    {db_username, "xxxxr"},
    {db_password, "xxxx"},
    {db_database, "xxxx"},
%    {db_configure, []},

%%  PostgreSQL only
%%
%% db_ssl - If enabled a secured SSL connection will be established to the 
database server. Requires db_ssl to be set to
%%   true or required. Defaults to false.
%%   See https://github.com/epgsql/epgsql/blob/2.0.0/README for more details.
%    {db_ssl, required},

%%  MongoDB only
%%
%% Read https://github.com/TonyGen/mongodb-erlang#readme for details
%% db_write_mode - defaults to safe
%% db_read_mode - defaults to master
%    {db_write_mode, safe},
%    {db_read_mode, master},

%% Database sharding
%% A list of proplists with per-shard database configuration. 
%% The proplists override the above options, and should contain two
%% additional options: 
%%  {db_shards, [ 
%%      [ 
%%          {db_host, "localhost"}, 
%%          {db_adapter, mysql}, 
%%          {db_port, 3306}, 
%%          {db_username, "dbuser"}, 
%%          {db_password, "dbpass"}, 
%%          {db_database, "database"},
%%          {db_shard_id, shard_id_atom}, 
%%          {db_shard_models, [model_atom_1, model_atom_2,
%%                             model_atom_3, etc]}  
%%      ] 
%%  ]},

%%%%%%%%%%
%% Mail %%
%%%%%%%%%%

%% mail_driver - The email delivery driver to use. Valid values are:
%%   boss_mail_driver_smtp - SMTP delivery. If mail_relay is present, 
%%     it is used as a relay, otherwise direct delivery is attempted.
%%   boss_mail_driver_mock - A black hole, useful for testing.
%% mail_relay_host - The relay server for SMTP mail deliveries.
%% mail_relay_username -The username used for connecting to the SMTP
%%   relay (if needed).
%% mail_relay_password -The password used for connecting to the SMTP
%%   relay (if needed).

%    {mail_driver, boss_mail_driver_mock},
%    {mail_relay_host, "smtp.example.com"},
%    {mail_relay_username, "webmas...@example.com"},
%    {mail_relay_password, "mailpassword"},


%%%%%%%%%%%%%%%%%%
%% Master Node  %%
%%%%%%%%%%%%%%%%%%


%% master_node - 
%%   For distributed configurations, the name of the master node. 
%%   The master node runs global services (incoming mail, message
%%   queue, events, sessions).
%%   Should be an atom, e.g. somenode@somehost. 
%%   The node name is specified in the -sname or -name argument in the
%%   startup script.

    %%{master_node, 'platf...@unnaki.net'},

%%%%%%%%%%%%%%
%% Websocket %%
%%%%%%%%%%%%%%
    %% you can specify a global timeout for your websocket connection
    %% when a websocket is idle more than the timeout, it is closed by the 
webserver
    %% and you receive in your handle_close function  {normal, timeout} as the
    %% reason.

    %{websocket_timeout, 5000},

%%%%%%%%%%%%%%
%% Sessions %%
%%%%%%%%%%%%%%

%% session_adapter - Selects the session driver to use. Valid values:
%%   cache - Store sessions in the configured cache
%%     servers. Requires cache_enable to be set to true.
%%   ets (default)
%%   mnesia

%% session_enable - Whether to enable sessions. Defaults to true.
%% session_key - Cookie key for sessions. Defaults to "_boss_session".
%% session_exp_time - Expiration time in seconds for the session
%%   cookie. Defaults to 525600, i.e. 6 days, 2 hours.
%% session_cookie_http_only - Instructs the web browser that the session
%%   cookie can not be accessed by javascripts, reducing the impact of
%%   XSS attacks.
%% session_cookie_secure - Instructs the web browser that the session
%%   cookie can only be sent over a secure connection.
%% session_mnesia_nodes, for {session_adapter, mnesia} only - List of
%%   Mnesia nodes, defaults to node(). 
%% session_domain - (optional, sets the Domain=x cookie option), 
%%   this can be used by ex: to enable subdomain apps 
%%     (*.domain.com) with the param ".domain.com" => {session_domain,
%%     ".domain.com"}

    {session_adapter, mock},
    {session_key, "_boss_session"},
    {session_exp_time, 525600},
    {session_cookie_http_only, true},
    {session_cookie_secure, false},
%    {session_enable, true},
%    {session_mnesia_nodes, [node()]}, % <- replace "node()" with a node name
%    {session_domain, ".domain.com"},

%%%%%%%%%%%%%%%
%% Templates %%
%%%%%%%%%%%%%%%

%% template_tag_modules - List of external modules to search for
%%   custom ErlyDTL tags.
%% template_filter_modules - List of external modules to search for
%%   custom ErlyDTL filters.
%% template_auto_escape - Controls automatic HTML escaping of template
%%   values. Enabled by default.
    {template_tag_modules, []},
    {template_filter_modules, []},
    {template_auto_escape, true},

%%%%%%%%%%%%%%%%%%%%%
%% Incoming Emails %%
%%%%%%%%%%%%%%%%%%%%%

%% smtp_server_enable - Enable the SMTP server for incoming mail
%% smtp_server_address - The address that the SMTP server should bind
%%   to. Defaults to {0, 0, 0, 0} (all interfaces).
%% smtp_server_domain - The host name of the SMTP server
%% smtp_server_port - The port that the SMTP server should listen
%%   on. Defaults to 25.

%    {smtp_server_enable, false},
%    {smtp_server_address, {0, 0, 0, 0}},
%    {smtp_server_domain, "smtp.example.com"},
%    {smtp_server_port, 25},

%% smtp_server_protocol - The protocol that the SMTP server should
%%   use. Valid values are:
%%     tcp (default)
%%     ssl
%    {smtp_server_protocol, tcp},

%%%%%%%%%
%% SSL %%
%%%%%%%%%

%% ssl_enable - Enable HTTP over SSL
%% ssl_options - SSL options; see ssl(3erl)

%    {ssl_enable, true},
%    {ssl_options, []},

%%%%%%%%%%%%%%%%%%%%
%% LOG FORMATTING %%
%%%%%%%%%%%%%%%%%%%%

%% Set log_stack_multiline to true to make stack traces more readable at the
%% cost of spanning multiple lines

%    {log_stack_multiline, true},

     {dummy, true} % a final dummy option so we don't have to keep track of 
commas
]},
{cb_admin, [
        {path, "/home/rgiucich/ChicagoBoss-0.9.pre-alpha-2/cb_admin"},
        {allow_ip_blocks, ["127.0.0.1"]},
        {base_url, "/admin"}
    ]},

%% MESSAGE QUEUE

{ tinymq, [
%% max_age- Maximum age of messages in the [message queue], in
%%   seconds. Defaults to 60.
    % {max_age, 60}
]},

%%%%%%%%%%%%%
%% Logging %%
%%%%%%%%%%%%%

%% Lager default config. 
%% More info: https://github.com/basho/lager 

  {lager, [
    {handlers, [
      {lager_udp_backend,
        [info,
          {host, "xxx.xxx.xxx.xxx"},
          {port, 12202},
          {level, info},
          {formatter, lager_gelf_formatter},
          {formatter_config, [{metadata, [{service, "platform"}]}]}
        ]},{lager_console_backend, info},
      {lager_file_backend, [{file, "log/error.log"}, {level, error}, {size, 
10485760}, {date, "$D0"}, {count, 500}]},
      {lager_file_backend, [{file, "log/console.log"}, {level, info}, {size, 
10485760}, {date, "$D0"}, {count, 500}]}
  ]},
    {colored, true}
    ]},

%%%%%%%%%%%%%%%
%% Webserver %%
%%%%%%%%%%%%%%%

{simple_bridge, [

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %% STANDARD SETTINGS
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    {server_name, boss_webserver},
    %% You can call this whatever you want. Name it after your application
    %% is probably best

    {handler, boss_simple_bridge_handler},
    %% the name of the simple_bridge handler module, which is expected to
    %% export run/1, ws_init/1, ws_message/1, ws_info/1, and terminate/1

    {backend, cowboy},
    %% cowboy | inets | mochiweb | webmachine | yaws
    %% It's not necessary to specify this in the confiugration unless you
    %% want to start simple_bridge with application:start(simple_bridge) or
    %% simple_bridge:start/0

    {address, "127.0.0.1"},
    %% IP address to bind, either in tuple format or string
    %% use "0.0.0.0" to start on all interfaces available

    {port, 8001},
    %% Port to bind

    {document_root, "./priv/static"},
    %% The path on the local machine to handle static files

    {static_paths, ["js/"]},
    %% The list of paths to be automatically translated to static paths by
    %% simple_bridge

    %% {anchor, AnchorModule},
    %% If not provided or set to undefined, will use
    %% BACKEND_simple_bridge_anchor. This is the backend-specific module
    %% for handling the requests from your chosen backend.

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %% FILE UPLOAD SETTINGS
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    {max_post_size, 100},
    %% No multipart request greater than above will be accepted. Units are
    %% MB

    {max_file_size, 100},
    %% No single uploaded file will be accepted greater than  the above.
    %% Units are MB.

    {max_file_in_memory_size,  0},
    %% If a file is less than the above, then instead of writing the file
    %% to disk, it'll be retained in memory and can be retrieved by
    %% sb_uploaded_file:data/1. See the README for more info.

    {scratch_dir, "./scratch"},
    %% This is the location of the temp directory where uploaded files will
    %% be placed.

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %% BACKEND-SPECIFIC DISPATCH TABLES:
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    %% {webmachine_dispatch, DispatchTable},
    %% Webmachine dispatch table override (ignores static_paths above)

    %% {webmachine_dispatch_fun, {Module, Function}},
    %% A Module:Function() that when evaluated will return a dispatch table
    %% for Webmachine, again ignores the static_paths above

    %% {cowboy_dispatch, DispatchTable},
    %% Cowboy dispatch table override (ignores static_paths)

    {cowboy_dispatch_fun, {boss_cowboy_dispacher, build_and_compile}},
    %% A Module:Function() that when evaluated will return a dispatch table
    %% for Cowboy, again ignoring the static_paths above. You'll likely
    %% want to add a dispatch rule pointing at the standard simple_bridge
    %% anchor (unless you're using your own custom anchor): 
    %% 
    %%      {'_', cowboy_simple_bridge_anchor,[]}

    {dummy, true}
]},


%% APPLICATION CONFIGURATIONS

%% domains - A list of domains to serve the application on
%% static_prefix - The URL prefix of static assets
%% doc_prefix - The URL prefix for developer documentation
{ platform, [
    {path, "../platform"},
    {base_url, "/"},
%    {domains, all},
%    {static_prefix, "/static"},
%    {doc_prefix, "/doc"},

    {dummy, true}
]}
].


-- 
You received this message because you are subscribed to the Google Groups 
"ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to chicagoboss+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/chicagoboss.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/chicagoboss/b055a937-6d61-44f9-9171-3be4b397dcd7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to