Apache Directory Project - Custom partition deployment process

This is Interesting: Free IT Magazines  
Home > Archive > Apache Directory Project > March 2006 > Custom partition deployment process





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Custom partition deployment process
MartinZaidel-1I9K1FznhJHvnOemgxGiVw@public.gma

2006-03-22, 2:45 am

I've developed a custom partition for Apache directory server, which I'm
trying to deploy with the 1.0-RC1 distribution. I've taken the naive
approach of just copying my jars to $INSTALL_DIR/lib/ext and my
configuration files to $INSTALL_DIR/conf. And it *almost* works---the
logging configuation fails due to a classpath problem (I'm using a custom
log4j appender class).

Is there any documentation on how to deploy custom code to the standard
distribution package (ie., using bin/apacheds.exe and not maven or ant)?

Thanks,

Martin
Ersin Er

2006-03-23, 8:46 pm

MartinZaidel-1I9K1FznhJHvnOemgxGiVw@public.gmane.org wrote:
>
> I've developed a custom partition for Apache directory server, which
> I'm trying to deploy with the 1.0-RC1 distribution. I've taken the
> naive approach of just copying my jars to $INSTALL_DIR/lib/ext and my
> configuration files to $INSTALL_DIR/conf. And it *almost* works---the
> logging configuation fails due to a classpath problem (I'm using a
> custom log4j appender class).
>
> Is there any documentation on how to deploy custom code to the
> standard distribution package (ie., using bin/apacheds.exe and not
> maven or ant)?
>
> Thanks,
>
> Martin

A bit out of date (m1) but here it's:

https://svn.safehaus.org/repos/sand...econ/partition/

HTH,
--
Ersin

MartinZaidel-1I9K1FznhJHvnOemgxGiVw@public.gma

2006-03-23, 8:46 pm



Sorry, I wasn't clear: I'm trying to run Directory Server standalone (not
embedded), using the Daemon bootstrappers via the apacheds executable in
$INSTALL_DIR/bin. That is, the server will be kicked off from
/etc/init.d/apacheds (ie., not via the command-line using maven). On a
lark---since it seemed like the right thing to do---I installed my custom
directory partition classes in jar files in $INSTALL_DIR/lib/ext and the
server configuration files into $INSTALL_DIR/conf. And the good news is
that the server *appears* to be configured correctly (at least no
ClassNotFoundExceptions for the directory partition classes in the server
logs with debugging turned up.)

The problem I have is that my log4j.properties file references a Log4J SNMP
appender (built on top of opennms---also in $INSTALL_DIR/lib/ext, if you're
keeping score at home) whose class is in my jar file (in
$INSTALL_DIR/lib/ext): that is, it appears that the classloader shuffling
by the daemon bootstrapping classes has the consequence of disconnecting
the log4j LogFactory class from the appender in my jar file.

I'm trying to find documentation/help on how to package/deploy the appender
so that log4j is properly configured. That is, what the apacheds
executable does via classloaders and not on how to implement a custom
partition.

Thanks again.

Martin Zaidel

-----Ersin Er <ersin.er-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: -----


To: Apache Directory Developers List <dev-aYN4UCa7k1r1N9kud6OZbmD2FQJk+8+b@public.gmane.org>
From: Ersin Er <ersin.er-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: 23/03/2006 08:06AM
Subject: Re: Custom partition deployment process

MartinZaidel-1I9K1FznhJHvnOemgxGiVw@public.gmane.org wrote:
>
> I've developed a custom partition for Apache directory server, which
> I'm trying to deploy with the 1.0-RC1 distribution. I've taken the
> naive approach of just copying my jars to $INSTALL_DIR/lib/ext and my
> configuration files to $INSTALL_DIR/conf. And it *almost* works---the
> logging configuation fails due to a classpath problem (I'm using a
> custom log4j appender class).
>
> Is there any documentation on how to deploy custom code to the
> standard distribution package (ie., using bin/apacheds.exe and not
> maven or ant)?
>
> Thanks,
>
> Martin

A bit out of date (m1) but here it's:

https://svn.safehaus.org/repos/sand...econ/partition/

HTH,
--
Ersin
Alex Karasulu

2006-03-23, 8:46 pm

MartinZaidel-1I9K1FznhJHvnOemgxGiVw@public.gmane.org wrote:
>
> Sorry, I wasn't clear: I'm trying to run Directory Server standalone
> (not embedded), using the Daemon bootstrappers via the apacheds
> executable in $INSTALL_DIR/bin. That is, the server will be kicked
> off from /etc/init.d/apacheds (ie., not via the command-line using
> maven). On a lark---since it seemed like the right thing to do---I
> installed my custom directory partition classes in jar files in
> $INSTALL_DIR/lib/ext
>

Ooops this is not enabled yet sorry. Try just putting it into the lib
directory and it should get picked up.
>
> and the server configuration files into $INSTALL_DIR/conf. And the
> good news is that the server *appears* to be configured correctly (at
> least no ClassNotFoundExceptions for the directory partition classes
> in the server logs with debugging turned up.)
>
> The problem I have is that my log4j.properties file references a Log4J
> SNMP appender (built on top of opennms---also in $INSTALL_DIR/lib/ext,
> if you're keeping score at home) whose class is in my jar file (in
> $INSTALL_DIR/lib/ext): that is, it appears that the classloader
> shuffling by the daemon bootstrapping classes has the consequence of
> disconnecting the log4j LogFactory class from the appender in my jar file.
>

Sounds complicated ... again I don't know how this is getting picked
up. Try dropping your jars into the lib directory for now disregard the
ext directory. Sorry about the confusion but I did not have time to rig
it yet. Give that a try and call me in the morning.

Good luck,
Alex


MartinZaidel-1I9K1FznhJHvnOemgxGiVw@public.gma

2006-03-27, 11:56 pm

FYI,

I fixed this by splitting my classes into two jars: one for the directory
partition (in $INSTALL_DIR/lib) and one for the logging appender classes.
I then added the logging appender jar (plus opennms.jar) to the CLASSPATH
in /etc/init.d/apacheds (well, actually /etc/sysconfig/apacheds).

Martin Zaidel




MartinZaidel-1I9K1FznhJHvnOemgxGiVw@public.gmane.org
23/03/2006 12:33 PM
Please respond to
"Apache Directory Developers List" <dev-aYN4UCa7k1r1N9kud6OZbmD2FQJk+8+b@public.gmane.org>


To
"Apache Directory Developers List" <dev-aYN4UCa7k1r1N9kud6OZbmD2FQJk+8+b@public.gmane.org>
cc
Apache Directory Developers List <dev-aYN4UCa7k1r1N9kud6OZbmD2FQJk+8+b@public.gmane.org>
Subject
Re: Custom partition deployment process






Sorry, I wasn't clear: I'm trying to run Directory Server standalone (not
embedded), using the Daemon bootstrappers via the apacheds executable in
$INSTALL_DIR/bin. That is, the server will be kicked off from
/etc/init.d/apacheds (ie., not via the command-line using maven). On a
lark---since it seemed like the right thing to do---I installed my custom
directory partition classes in jar files in $INSTALL_DIR/lib/ext and the
server configuration files into $INSTALL_DIR/conf. And the good news is
that the server *appears* to be configured correctly (at least no
ClassNotFoundExceptions for the directory partition classes in the server
logs with debugging turned up.)

The problem I have is that my log4j.properties file references a Log4J
SNMP appender (built on top of opennms---also in $INSTALL_DIR/lib/ext, if
you're keeping score at home) whose class is in my jar file (in
$INSTALL_DIR/lib/ext): that is, it appears that the classloader
shuffling by the daemon bootstrapping classes has the consequence of
disconnecting the log4j LogFactory class from the appender in my jar file.

I'm trying to find documentation/help on how to package/deploy the
appender so that log4j is properly configured. That is, what the apacheds
executable does via classloaders and not on how to implement a custom
partition.

Thanks again.

Martin Zaidel

-----Ersin Er <ersin.er-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: -----


To: Apache Directory Developers List <dev-aYN4UCa7k1r1N9kud6OZbmD2FQJk+8+b@public.gmane.org>
From: Ersin Er <ersin.er-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: 23/03/2006 08:06AM
Subject: Re: Custom partition deployment process

MartinZaidel-1I9K1FznhJHvnOemgxGiVw@public.gmane.org wrote:
>
> I've developed a custom partition for Apache directory server, which
> I'm trying to deploy with the 1.0-RC1 distribution. I've taken the
> naive approach of just copying my jars to $INSTALL_DIR/lib/ext and my
> configuration files to $INSTALL_DIR/conf. And it *almost* works---the
> logging configuation fails due to a classpath problem (I'm using a
> custom log4j appender class).
>
> Is there any documentation on how to deploy custom code to the
> standard distribution package (ie., using bin/apacheds.exe and not
> maven or ant)?
>
> Thanks,
>
> Martin

A bit out of date (m1) but here it's:

https://svn.safehaus.org/repos/sand...econ/partition/

HTH,
--
Ersin

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com