-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error running ejabberd_app on eclipse #299
Comments
Have you been able to compile and run ejabberd from outside Eclipse? The lines in that error message are not matching my version (the latest master commit 6808865068), which one are you using? |
Actually I am using windows os, on which I have downloaded the windows installer from processone's site.I was able to successfully install and run ejabberd through command line and through desktop icons on my system.But in the process I actually never had to use individual modules of ejabberd like ejabeerd_app or ejabberd.erl. |
The thing is that erlide needs to be able to compile the code in order to have it running. Ejabberd has a special way of building that is not supported by erlide. So when not all code gets compiled, there will be errors. In short, for ejabberd you can use erlide for browsing the code, but not for compiling and running it. Sorry. |
so what should I do in order to run the ejabberd's source code in order to understand how the control and data flows from one ejabberd module to other. |
You can always use the OTP debugger. Or use tracing to display the sequence of calls. For systems like ejabberd it may be difficult to run it through a debugger anyway, because if the code uses timeouts (including gen_server calls), then they will trigger while you are stepping through the code. If you manage to get the project structure recognised by the IDE, then you can also browse manually through the calls (with "jump to definition"). |
I have read about debugger in erlang's documentation, but wasn't able to understand that how to use it to test any one module like ejabberd_app or ejabberd.erl. Can you please explain how to run a given module say ejabberd_app using debugger or tracing. |
Sorry for the delay. If you can launch ejabberd from the Erlang shell, then yo ucan also launch de debugger with debugger:start(). The details are at http://erlang.org/doc/man/debugger.html. The tracing API is described at http://erlang.org/doc/man/dbg.html. |
I have created a erlang project on eclipse IDE with ejabberd source code in it.I was trying to run the ejabberd_app module from eclipse console with the call ejabberd_app:start(normal,[]).But I got the following error:
** exception error: no function clause matching ejabberd_config:'-merge_configs/2-fun-1-'({host_config, <<"ldap.localhost">>, [{auth_method, ldap}, {ldap_servers, [<<"localhost">>]}, {ldap_port, 1389}, {ldap_rootdn, <<"cn=admin,dc=localhost">>}, {ldap_password, <<"password">>}, {ldap_base, <<"ou=users,dc=localhost">>}, {{add,modules}, [{mod_vcard_ldap, []}]}]}, #{}) (c:/Users/Abhishek/workspace/actErlang/src/ejabberd_config.erl, line 484) in function lists:foldl/3 (lists.erl, line 1262) in call from ejabberd_config:include_config_files/1 (c:/Users/Abhishek/workspace/actErlang/src/ejabberd_config.erl, line 518) in call from ejabberd_config:read_file/2 (c:/Users/Abhishek/workspace/actErlang/src/ejabberd_config.erl, line 165) in call from ejabberd_config:start/0 (c:/Users/Abhishek/workspace/actErlang/src/ejabberd_config.erl, line 65) in call from ejabberd_app:start/2 (ejabberd_app.erl, line 58)
Anyone with any suggestions?
The text was updated successfully, but these errors were encountered: