Hi! I'd like to know how to make jabberd2 work with Oracle backend
included in the latest version of jabberd2, 2.2.4.
I like this server and made a few installations using MySQL, sqlite,
Berkeley DB as backends.
At my work there's a Linux server with Oracle 11g installed. I
downloaded jabberd-2.2.4, configured:
$ ./configure --prefix=$HOME \
--enable-debug \
--enable-ssl \
--enable-mysql=/usr \
--enable-db \
--enable-oracle \
--with-oracle-home=/opt/oracle/11
(I created special user 'jabber' and all installation done in it's
home folder) configured OK
$ make
got this error:
------------------
authreg_oracle.c: In function �ar_init�:
authreg_oracle.c:576: error: �struct authreg_st� has no member named
�get_authreg_user�
make[2]: *** [authreg_oracle_la-authreg_oracle.lo] Error 1
make[2]: Leaving directory `/srv/jabber/jabberd-2.2.4-a/storage'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/srv/jabber/jabberd-2.2.4-a'
make: *** [all] Error 2
------------------
to solve line 576 in storage/autherg_oracle.c was commented out:
// ar->get_authreg_user = _ar_oracle_get_authreg_user;
compiled OK, installed
Both c2s and sm configured to use Oracle, but sm doesn't work this way:
$ router &
$ sm -D
------------------
Wed Oct 15 09:38:22 2008 [notice] starting up
Wed Oct 15 09:38:22 2008 [notice] id: jabber.polt.ua
Wed Oct 15 09:38:22 2008 [info] process id is 18020, written to
/srv/jabber/var/jabberd/pid/sm.pid
Wed Oct 15 09:38:22 2008 storage.c:94 adding arbitrary types to driver 'oracle'
Wed Oct 15 09:38:22 2008 storage.c:117 driver not loaded, trying to init
Wed Oct 15 09:38:22 2008 [info] loading 'oracle' storage module
Wed Oct 15 09:38:22 2008 storage.c:139 preloaded module 'oracle' (not
initialized yet)
Wed Oct 15 09:38:22 2008 storage.c:158 calling driver initializer
Wed Oct 15 09:38:22 2008 [error] (st_oracle_init: Connect to Server)
Error - ORA-12504: TNS:listener was not given the SERVICE_NAME in
CONNECT_DATA
Wed Oct 15 09:38:22 2008 [notice] initialisation of storage driver
'oracle' failed
Wed Oct 15 09:38:22 2008 [error] failed to initialise one or more
storage drivers, aborting
------------------
When c2s uses Oracle and sm uses Berkeley DB, almost everything works fine.
I can register new users using any client software (I saw records in
Oracle tables), but can't connect later (not authoirsed).
I copied part of code from authreg_oracle.c, function ar_init to
function st_init in storage_oracle.c to make it work seamlessly. Error
disappeared. Connects fine. But registered clients still can't connect
after registration.
What's wrong with Oracle backend? I googled a few days but did not
find any solution. Backend needs deep hack? Who has experience?
--
Viva Open Source!