hi Roy,
I have updated the webapp archetype to the latest version (1.5.8-SNAPSHOT).
There was a bug which affects the way schema loader extracts the
schema in a container
environment (this was fixed after releasing 1.5.7 hence I used
the latest version)
Please follow the below instructions to build the sample web app
(note: many steps are identical to those present on the webpage[1] )
1. either do a complete checkout and build or just run 'svn up' if
you have already checked it out
svn co
http://svn.apache.org/repos/asf/directory/samples/trunk/apacheds-archetype-webapp
cd apacheds-archetype-webapp
mvn install
2. mvn archetype:generate -DarchetypeGroupId=org.apache.directory.samples \
-DarchetypeArtifactId=apacheds-archetype-webapp \
-DarchetypeVersion=1.5.8-SNAPSHOT \
-DgroupId=org.apache.directory.samples.embed.webapp \
-DartifactId=ApacheDS -Dversion=1.0-SNAPSHOT
(note: only the archetype's version was changed, remaining all are same)
3. running
jetty:
mvn jetty:run
-Dschema.resource.location=<complete-path-to>/pacheds-all-1.5.8-SNAPSHOT.jar
tomcat:
a. copy the app folder from ApacheDS/target to the webapps folder
b. set/export
JAVA_OPTS="-Dschema.resource.location=<complete-path-to>/pacheds-all-1.5.8-SNAPSHOT.jar"
c. start the tomcat
HTH
Kiran Ayyagari
[1]
http://directory.apache.org/apacheds/1.5/43-embedding-apacheds-as-a-web-application.html
On Fri, Jul 30, 2010 at 12:21 AM, Benjamin, Roy <[email protected]> wrote:
> Hi,
>
> I have ApacheDS 1.5.7 installed. I also have sources.
>
> I've found two similar examples on the ApacheDS site for running the server
> embedded
> in a servlet. I can't get either one to work...
>
> ---
> One example is at:
> http://directory.apache.org/apacheds/1.5/43-embedding-apacheds-as-a-web-application.html
>
> I've been unable to build the example. The first problem was that it uses
> org.apache.directory.server.core.DefaultDirectoryService
> which is not a public class. So I changed the StartStopListener package to
> org.apache.directory.server.core,
> one compile problem solved.
>
> The example also uses:
> org.apache.directory.server.ldap.LdapServer
> org.apache.directory.server.protocol.shared.transport.TcpTransport
> I cannot find these classes anywhere, in 1.5.7 they seem to be a part of
> 1.5.6 only. BUT
> I cannot build 1.5.6 (which would load the jars to my local repository)
> because the project
> parent pom no longer exists, seems not to be in svn, or in some maven repo
> somewhere..
>
>
> btw. The parent pom for the apacheds-archetype-webapp also does not seem to
> exist... ahg...
>
>
> ---
> Another example is at:
> https://cwiki.apache.org/DIRxSRVx10/embedding-apacheds-as-a-web-application.html
>
> I've been able to build this example, however it cannot be started in Tomcat.
> The example uses javax.naming.directory.InitialDirContext
> and Tomcat 5.5.29 explodes with exceptions trying to use this class.
>
>
> +++
> I can send stack traces etc... but first am I using the correct list?
>
> Should these examples work? What release of ApacheDS ? How to build ?
>
> Thanks
> Roy
>
>
>