[erlang-questions] Cant't start odbc from .app file

Michael McDaniel <>
Sun May 11 01:29:58 CEST 2008


On Sun, May 11, 2008 at 06:38:11AM +0800, wenew zhang wrote:
> authserver.app
> {application, authserver,
>  [
>   {description, "Authory TCP server"},
>   {vsn, "1.0"},
>   {id, "authserver"},
>   {modules,      [authserver]},
>   {registered,   [authserver]},
>   {applications, [kernel, stdlib, odbc]},
>   %%
>   %% mod: Specify the module name to start the application, plus args
>   %%
>   {mod, {auth_sup, []}},
>   {env, []}
>  ]
> }.
> i try put odbc in modules,registered ,it doesn't  work too,
> my os is:Ubuntu 8.04
> 
> Best Regards
> 
> Wenew Zhang

> _______________________________________________

 Look at release file documentation.

 For example (adjust versions for your installation) ...

{release, {"OTP  APN 181 01","R12B"}, {erts, "5.6"},
 [  {kernel,"2.12"}
  , {stdlib,"1.15"}
  , {sasl,"2.1.5.2"}
  , {my_app, "0.9"}
  , {mnesia,"4.4"}
%  , {odbc, "2.0.9"}
%  , {os_mon,"2.1.3"}
%  , {ssl,"3.9"}
 ]
}.

 Then (if above filename was start_my_app.rel)
 
erl> systools:make_script("start_my_app",[]).

 which creates start_my_app.boot and start_my_app.script both
 of which I copy to the ebin directory.


 Example sys.config ...
 Copied in part or based on elog3.config from Joe Armstrong's new book,
 _Programming_Erlang_ ...


[{mnesia, [{dir,"./Mnesia.my_app"}  ,
%%           {debug, trace}                   ,            
             {schema_location, disc}]},
 {kernel,
  [    
   {start_timer, true} ,
   {inet_dist_listen_min, 4369},
   {inet_dist_listen_max, 4371}   
  ]} ,

{sasl, [
         {sasl_error_logger, false},
         %% define the parameters of the rotating log
         %% the log file directory
         {error_logger_mf_dir,"./error_logs"},
         %% # bytes per logfile
         {error_logger_mf_maxbytes,10485760}, % 10 MB
         %% maximum number of logfiles
         {error_logger_mf_maxfiles, 10}
        ]}
].


 Then, from the command line,

$ erl  -name my_app  -heart  -pa my_app/ebin  -boot my_app/ebin/start_my_app
  -config my_app/ebin/sys.config  -home ${HOME}  -setcookie fake  -detached


 The above presumes the starting directory is just above my_app directory
 which has typical OTP structure
 my_app/
        ebin/
     include/
        priv/
         src/


~Michael



More information about the erlang-questions mailing list